Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​Extensions.​Primitives.​IChangeToken

Assembly: Microsoft.Extensions.Primitives

Propagates notifications that a change has occurred.

Properties

bool
ActiveChangeCallbacks
Indicates if this token will proactively raise callbacks. If <c>false</c> , the token consumer must poll <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> to detect changes.
bool
HasChanged
Gets a value that indicates if a change has occurred.

Methods

RegisterChangeCallback​(System.​Action<​object> callback, object state)
Registers for a callback that will be invoked when the entry has changed. <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> MUST be set before the callback is invoked.
Returns An <see cref="T:System.IDisposable" /> that is used to unregister the callback.
callback The <see cref="T:System.Action`1" /> to invoke.
state State to be passed into the callback.