Class ResourceChangeToken
- Namespace
- Acuit.Pinpoint.ResourceManagement
- Assembly
- Acuit.Pinpoint.ResourceManagement.Abstractions.dll
A resource change token.
public sealed class ResourceChangeToken : IChangeToken, IDisposable
- Inheritance
-
ResourceChangeToken
- Implements
- Inherited Members
Constructors
ResourceChangeToken()
Initializes a new instance of the ResourceChangeToken class.
public ResourceChangeToken()
Properties
ActiveChangeCallbacks
Indicates if this token will pro-actively raise callbacks. If false, the token consumer must poll HasChanged to detect changes.
public bool ActiveChangeCallbacks { get; }
Property Value
HasChanged
Gets a value that indicates if a change has occurred.
public bool HasChanged { get; }
Property Value
Methods
Dispose()
Closes and releases all resources used by the object.
public void Dispose()
OnResourceChange()
Triggers the change token when a resource change occurs.
public void OnResourceChange()
Exceptions
- ObjectDisposedException
This ResourceChangeToken has been disposed.
RegisterChangeCallback(Action<object>, object)
Registers for a callback that will be invoked when the entry has changed. HasChanged MUST be set before the callback is invoked.
public IDisposable RegisterChangeCallback(Action<object> callback, object state)
Parameters
Returns
- IDisposable
An IDisposable that is used to unregister the callback.