ILogger.BeginScope<TState>(TState) 方法

定義

開始邏輯作業範圍。Begins a logical operation scope.

public:
generic <typename TState>
 IDisposable ^ BeginScope(TState state);
public IDisposable BeginScope<TState> (TState state);
abstract member BeginScope : 'State -> IDisposable
Public Function BeginScope(Of TState) (state As TState) As IDisposable

類型參數

TState

要開始範圍的狀態類型。The type of the state to begin scope for.

參數

state
TState

範圍的識別項。The identifier for the scope.

傳回

IDisposable

在處置時結束邏輯作業範圍的可處置物件。A disposable object that ends the logical operation scope on dispose.

適用於