共用方式為


ITransactionAgent.StartTransaction(Boolean, TimeSpan) 方法

定義

啟動新的交易

public System.Threading.Tasks.Task<Orleans.Transactions.ITransactionInfo> StartTransaction (bool readOnly, TimeSpan timeout);
public System.Threading.Tasks.Task<Orleans.Transactions.TransactionInfo> StartTransaction (bool readOnly, TimeSpan timeout);
abstract member StartTransaction : bool * TimeSpan -> System.Threading.Tasks.Task<Orleans.Transactions.ITransactionInfo>
abstract member StartTransaction : bool * TimeSpan -> System.Threading.Tasks.Task<Orleans.Transactions.TransactionInfo>
Public Function StartTransaction (readOnly As Boolean, timeout As TimeSpan) As Task(Of ITransactionInfo)
Public Function StartTransaction (readOnly As Boolean, timeout As TimeSpan) As Task(Of TransactionInfo)

參數

readOnly
Boolean

它是否為唯讀交易

timeout
TimeSpan

如果交易在此時間內未完成,則會自動中止交易

傳回

新交易的資訊

適用於