Class ChangeToken
- Namespace
- Acuit.Pinpoint.Primitives
- Assembly
- Acuit.Pinpoint.Configuration.dll
Propagates notifications that a change has occurred.
public static class ChangeToken
- Inheritance
-
ChangeToken
- Inherited Members
Methods
OnChange(Func<IChangeToken>, Action)
Registers the changeTokenConsumer
action to be called whenever the token produced changes.
public static IDisposable OnChange(Func<IChangeToken> changeTokenProducer, Action changeTokenConsumer)
Parameters
changeTokenProducer
Func<IChangeToken>Produces the change token.
changeTokenConsumer
ActionAction called when the token changes.
Returns
OnChange<TState>(Func<IChangeToken>, Action<TState>, TState)
Registers the changeTokenConsumer
action to be called whenever the token produced changes.
public static IDisposable OnChange<TState>(Func<IChangeToken> changeTokenProducer, Action<TState> changeTokenConsumer, TState state)
Parameters
changeTokenProducer
Func<IChangeToken>Produces the change token.
changeTokenConsumer
Action<TState>Action called when the token changes.
state
TStatestate for the consumer.
Returns
Type Parameters
TState