Interface IExternalScopeProvider
- Namespace
- Microsoft.Extensions.Logging
- Assembly
- Microsoft.Extensions.Logging.Abstractions.dll
Represents a storage of common scope data.
public interface IExternalScopeProvider
Methods
ForEachScope<TState>(Action<object, TState>, TState)
Executes callback for each currently active scope objects in order of creation. All callbacks are guaranteed to be called inline from this method.
void ForEachScope<TState>(Action<object, TState> callback, TState state)
Parameters
callback
Action<object, TState>The callback to be executed for every scope object
state
TStateThe state object to be passed into the callback
Type Parameters
TState
Push(object)
Adds scope object to the list
IDisposable Push(object state)
Parameters
state
objectThe scope object
Returns
- IDisposable
The IDisposable token that removes scope on dispose.