State Manager. Try Add State Async<T>(String, T, CancellationToken) Method
Attempts to add an actor state with given state name and value. Returns false if an actor state with the same name already exists.
public System.Threading.Tasks.Task<bool> TryAddStateAsync<T> (string stateName, T value, System.Threading.CancellationToken cancellationToken = null);
abstract member TryAddStateAsync : string * 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Type of value associated with given state name.
Name of the actor state to add.
Value of the actor state to add.
The token to monitor for cancellation requests. This is optional and defaults to None
A boolean task that represents the asynchronous add operation. Returns true if the value was successfully added and false if an actor state with the same name already exists.
The specified state name is null. Provide a valid state name string.
The request was canceled using the specified
The type of state value
T must be
Data Contract serializable.