IActorStateManager.AddStateAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an actor state with given state name.
public System.Threading.Tasks.Task AddStateAsync<T> (string stateName, T value, System.Threading.CancellationToken cancellationToken = default);
abstract member AddStateAsync : string * 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AddStateAsync(Of T) (stateName As String, value As T, Optional cancellationToken As CancellationToken = Nothing) As Task
Type Parameters
- T
Type of value associated with given state name.
Parameters
- stateName
- String
Name of the actor state to add.
- value
- T
Value of the actor state to add.
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests.
Returns
A task that represents the asynchronous add operation.
Exceptions
An actor state with given state name already exists.
The specified state name is null.
The operation was canceled.
Remarks
The type of state value T
must be Data Contract serializable.
Applies to
Azure SDK for .NET
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin