Skip to content

DurableStateWatchExtensions.WatchAsync(IDurableValue<T>, CancellationToken)

WatchAsync(IDurableValue<T>, CancellationToken)

staticextension
View source
public static IAsyncEnumerable<ValueChange<T>> WatchAsync<T>(this IDurableValue<T> value, CancellationToken cancellationToken = default(CancellationToken))
Watches the committed value of a durable value.

Parameters

valueIDurableValue<T>
The durable value.
cancellationTokenCancellationToken
The token which ends the watch.

Returns

A stream which begins with the current committed value and delivers the latest value after each committed change.

Exceptions

System.NotSupportedException
value is not a built-in durable value registered with a journaled state manager.