Click or drag to resize

TargetWithContextCaptureScopeContextProperties Method

Takes snapshot of ScopeContext dictionary for the LogEventInfo

Namespace:  NLog.Targets
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
protected virtual IDictionary<string, Object?>? CaptureScopeContextProperties(
	LogEventInfo logEvent,
	IDictionary<string, Object?>? contextProperties
)

Parameters

logEvent
Type: NLogLogEventInfo
contextProperties
Type: System.Collections.GenericIDictionaryString, Object
Optional pre-allocated dictionary for the snapshot

Return Value

Type: IDictionaryString, Object
Dictionary with ScopeContext properties if any, else null
See Also