Skip to content

TransactionalState<TState>.PerformRead(Func<TState, TResult>)

PerformRead(Func<TState, TResult>)

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

Parameters

operationFunc<TState, TResult>
A function that reads the state and returns the result. The function must not modify the state.

Returns

A task whose result is the value returned by readFunction.