PostSharp 6.7 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Backends.​Microsoft Namespace / Microsoft­Logging­Backend Class / Microsoft­Logging­Backend Methods / Microsoft­Logging­Backend.​Create­Type­Source­By­Source­Name Method

MicrosoftLoggingBackend.CreateTypeSourceBySourceName Method

Creates a LoggingTypeSource for the given role and logger name.

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Microsoft
Assembly:  PostSharp.Patterns.Diagnostics.Backends.Microsoft (in PostSharp.Patterns.Diagnostics.Backends.Microsoft.dll) Version: 6.7.12.0 (6.7.12.0)
Syntax
C#
protected override LoggingTypeSource CreateTypeSourceBySourceName(
	LoggingNamespaceSource parent,
	string sourceName
)

Parameters

parent
Type: PostSharp.Patterns.Diagnostics.LoggingNamespaceSource
Parent namespace source.
sourceName
Type: System.String
Name for the log source.

Return Value

Type: LoggingTypeSource
The new log source.
Exceptions
ExceptionCondition
NotSupportedExceptionWhen the backend is cannot create log sources based on names.
See Also