PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Context­Id­Generation­Strategy Enumeration

ContextIdGenerationStrategy Enumeration

Enumerates the different strategies to generate the value of the Id strategy.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public enum ContextIdGenerationStrategy
Members
  Member nameValueDescription
Default0 The default value is LazyGlobal.
LazyGlobal0 The same as Global, but the Id property is generated lazily the first time it is being evaluated. This strategy is a bit slower than Global in cases where the Id property is always evaluated.
Global1 Uses a global static incremental counter shared with all LoggingBackend instances in the current AppDomain. In heavily multi-threaded applications, this strategy can cause thread contention because of the need to serialize the access to the global counter.
Hierarchical2 Uses a counter in the ParentContext.
See Also