Open sandboxFocus

Method GetSource

GetSource(string, Type)

Returns a LoggingTypeSource for the given role and type.

Declaration
[Obsolete("Use methods from DefaultContextLocalConfiguration.Verbosity")]
public LoggingTypeSource GetSource(string role, Type type)
Parameters
Type Name Description
string role

The role. Typically one of the constants of the LoggingRoles type, or a custom role.

Type type

The type.

Returns
Type Description
LoggingTypeSource

The LoggingTypeSource for role and type. If no LoggingTypeSource exists for this role and type, this method shall create a new LoggingTypeSource.

GetSource(string, string)

Returns a LoggingNamespaceSource for the given role and, optionally, namespace.

Declaration
[Obsolete("Use methods from DefaultContextLocalConfiguration.Verbosity")]
public LoggingNamespaceSource GetSource(string role, string ns = null)
Parameters
Type Name Description
string role

The role. Typically one of the constants of the LoggingRoles type, or a custom role.

string ns

The namespace for which the LoggingNamespaceSource is requested, or null if the LoggingNamespaceSource is requested for the root namespace.

Returns
Type Description
LoggingNamespaceSource

The LoggingNamespaceSource for role and ns. If no LoggingNamespaceSource exists for this role and type, this method shall create a new LoggingNamespaceSource.