Table of Contents

Method SetMdlcId

Namespace
WhalesSecret.TradeScriptLib.Logging
Assembly
WhalesSecret.TradeScriptLib.dll

SetMdlcId(uint)

Sets a given value as the unique NLog Mapped Diagnostics Logical Context with a newly created execution context. This method is forcing the given MDLC ID to be used and circumvent the normal hierarchical flow that is achieved using SetMdlc(string?) and SetMdlc(ushort, string).

public IDisposable SetMdlcId(uint mdlcId)

Parameters

mdlcId uint

Identifier of the new MDLC.

Returns

IDisposable

IDisposable interface that should be used to release the MDLC context properties.

Remarks

This method should only be used in special cases where the call is initiated from such an asynchronous context that is not derived from the main program entry.