共用方式為


ConfigurationReloadToken.RegisterChangeCallback 方法

定義

註冊回呼,該回呼會在項目變更時叫用。 HasChanged 「必須」在叫用回呼之前設定。

public:
 virtual IDisposable ^ RegisterChangeCallback(Action<System::Object ^> ^ callback, System::Object ^ state);
public IDisposable RegisterChangeCallback (Action<object?> callback, object? state);
abstract member RegisterChangeCallback : Action<obj> * obj -> IDisposable
override this.RegisterChangeCallback : Action<obj> * obj -> IDisposable
Public Function RegisterChangeCallback (callback As Action(Of Object), state As Object) As IDisposable

參數

callback
Action<Object>

要叫用的回呼。

state
Object

要傳遞至回呼的狀態。

傳回

CancellationToken 註冊。

實作

適用於