Skip to content

TransactionalState<TState> Methods

Stateful facet that respects Orleans transaction semantics

Participate(IGrainLifecycle)

View source
public void Participate(IGrainLifecycle lifecycle)
Adds the provided observer as a participant in the lifecycle.

Parameters

lifecycleIGrainLifecycle
The observer.

PerformUpdate(Func<TState, TResult>)

View source
public Task<TResult> PerformUpdate<TResult>(Func<TState, TResult> updateAction)
Performs an update operation and returns the result.

Parameters

updateActionFunc<TState, TResult>
A function that can read and update the state, and return a result