IActorStateManager.TryRemoveStateAsync(String, CancellationToken) Method

Definition

Attempts to remove an actor state with specified state name.

public System.Threading.Tasks.Task<bool> TryRemoveStateAsync (string stateName, System.Threading.CancellationToken cancellationToken = null);
abstract member TryRemoveStateAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>

Parameters

stateName
System.String

Name of the actor state to remove.

cancellationToken
System.Threading.CancellationToken

The token to monitor for cancellation requests.

Returns

System.Threading.Tasks.Task<System.Boolean>

A task that represents the asynchronous remove operation. The value of TResult parameter indicates if the state was successfully removed.

Exceptions

System.ArgumentNullException

The specified state name is null.

System.OperationCanceledException

The operation was canceled.

Applies to