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 注册。

实现

适用于