예제 #1
0
 public static Transaction ExecuteTransaction(TransactionDelegate transactionDelegate, TransactionOptions options)
 {
     return(ExecuteTransaction(transactionDelegate, null, options));
 }
예제 #2
0
        public static Transaction ExecuteTransaction(TransactionDelegate transactionDelegate, RetryDelegate retryDelegate, TransactionOptions options)
        {
            _trasaction = new Transaction(transactionDelegate, retryDelegate);


            _trasaction.TransactionDelegate.Invoke(_trasaction);

            while (_trasaction.State == TransactionState.Aborted && _trasaction.RetryDelegate != null && _trasaction.RetryDelegate.Invoke(_trasaction))
            {
                _trasaction.TransactionDelegate.Invoke(_trasaction);
            }

            return(_trasaction);
        }
예제 #3
0
        public static Transaction BeginTransaction(TransactionOptions options)
        {
            _trasaction = new Transaction(options);

            return(_trasaction);
        }