PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Contexts Namespace / Logging­Context Class / Logging­Context Methods / Logging­Context.​Create­Correlation­Cookie Method

LoggingContext.CreateCorrelationCookie Method

Creates a cookie that can be used to correlate, using the SetCorrelation(CorrelationCookie) method, another context to the current context.

Namespace:  PostSharp.Patterns.Diagnostics.Contexts
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 2023.0.3.0 (2023.0.3.0)
public virtual CorrelationCookie CreateCorrelationCookie()

Return Value

Type: CorrelationCookie
A CorrelationCookie, or Null if the current context (and the current back-end) does not support correlations.
See Also