ConfigurationReloadToken Class

Implements Microsoft.Extensions.Primitives.IChangeToken

Namespace
Microsoft.Extensions.Configuration
Assemblies
  • Microsoft.Extensions.Configuration

Syntax

public class ConfigurationReloadToken : IChangeToken
class Microsoft.Extensions.Configuration.ConfigurationReloadToken

Properties

Microsoft.Extensions.Configuration.ConfigurationReloadToken.ActiveChangeCallbacks

Indicates if this token will proactively raise callbacks. Callbacks are still guaranteed to be invoked, eventually.

Return type:System.Boolean
public bool ActiveChangeCallbacks { get; }
Microsoft.Extensions.Configuration.ConfigurationReloadToken.HasChanged

Gets a value that indicates if a change has occured.

Return type:System.Boolean
public bool HasChanged { get; }

Methods

OnReload()

Used to trigger the change token when a reload occurs.

public void OnReload()
RegisterChangeCallback(System.Action<System.Object>, System.Object)

Registers for a callback that will be invoked when the entry has changed. Microsoft.Extensions.Primitives.IChangeToken.HasChanged MUST be set before the callback is invoked.

Arguments:
  • callback (System.Action<System.Object>) – The callback to invoke.
  • state (System.Object) – State to be passed into the callback.
Return type:

System.IDisposable

public IDisposable RegisterChangeCallback(Action<object> callback, object state)