AppContextExtensionsLogNextMapperSource Method |
Extension method to
IAppContext object to set a one-time-use logSource to be used on the next IMapper Init().
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public static void LogNextMapperSource(
this IAppContext cxt,
string logSource
)
<ExtensionAttribute>
Public Shared Sub LogNextMapperSource (
cxt As IAppContext,
logSource As String
)
Parameters
- cxt
- Type: NetQuarryIAppContext
The application context, may be null. - logSource
- Type: SystemString
The source of the operation, to be logged to the devlog on the next mapper load.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAppContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
This is a kludgy mechanism used because it's impractical to add logSource to all Mapper.Load paths. To
instrument a mapper load the caller should call the
LogNextMapperSource(IAppContext, String) extension method to
set the property. The property will be consumed (and cleared) during the next Mapper.Init() call and used
in the Mapper.Load()
TimerLogger.
See Also