Struct TraceScope
A ref struct returned by Trace(Scope, LevelOfDetail, ref InstrumentsInterpolatedStringHandler) that closes the active trace
scope when disposed. Intended for use with using.
public ref struct TraceScope : IDisposable
- Implements
- Inherited Members
Constructors
TraceScope(IInstrumentsSink?)
Initializes a new TraceScope that will call EndTrace() on the given sink when disposed.
public TraceScope(IInstrumentsSink? sink)
Parameters
sinkIInstrumentsSinkThe sink to notify on dispose, or
nullfor a no-op scope.
Methods
Dispose()
Ends the active trace scope on the sink.
public void Dispose()