Share via


ITransactionalState<TState> 介面

定義

遵守一元交易語意的狀態,並允許讀取/寫入鎖定

public interface ITransactionalState<TState> where TState : class, new()
type ITransactionalState<'State (requires 'State : null and 'State : (new : unit -> 'State))> = interface
Public Interface ITransactionalState(Of TState)

類型參數

TState

狀態的類型

衍生

方法

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

執行讀取作業並傳回結果,而不需修改狀態。

PerformUpdate<TResult>(Func<TState,TResult>)

執行更新作業並傳回結果。

擴充方法

PerformUpdate<TState>(ITransactionalState<TState>, Action<TState>)

執行更新作業,而不傳回任何結果。

適用於