IChangeToken Interface¶
Propagates notifications that a change has occured.
- Namespace
Microsoft.Extensions.Primitives
- Assemblies
- Microsoft.Extensions.Primitives
Properties¶
-
Microsoft.Extensions.Primitives.IChangeToken.
ActiveChangeCallbacks
¶ Indicates if this token will pro-actively raise callbacks. Callbacks are still guaranteed to fire, eventually.
Return type: System.Boolean bool ActiveChangeCallbacks { get; }
-
Microsoft.Extensions.Primitives.IChangeToken.
HasChanged
¶ Gets a value that indicates if a change has occured.
Return type: System.Boolean bool HasChanged { get; }
-
Methods¶
-
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
System.Action`1
to invoke. - state (System.Object) – State to be passed into the callback.
Return type: System.IDisposable
Returns: An
System.IDisposable
that is used to unregister the callback.IDisposable RegisterChangeCallback(Action<object> callback, object state)
- callback (System.Action<System.Object>) – The
-