Skip to content

IDurableStateManager.TryGetState(string, TState?)

TryGetState(string, TState?)

abstract
public abstract bool TryGetState<TState>(string name, out TState? state)
Attempts to retrieve an existing state component without creating it.

Parameters

namestring
The stable, ordinal, case-sensitive state name.
stateTState?
The existing state, if found.

Returns

true if a compatible state exists; otherwise, false.

Exceptions

System.InvalidOperationException
The name has an incompatible state type.