Skip to content

ITransactionalState<TState> Methods

State that respects Orleans transaction semantics, and allows read/write locking

PerformRead(Func<TState, TResult>)

abstract
public abstract Task<TResult> PerformRead<TResult>(Func<TState, TResult> readFunction)
Performs a read operation and returns the result, without modifying the state.

Parameters

readFunctionFunc<TState, TResult>
A function that reads the state and returns the result. MUST NOT modify the state.

PerformUpdate(Func<TState, TResult>)

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

Parameters

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