Exemple #1
0
        public Transaction(RequestParams reqPrms, ResponseParams resPrms, Action<Transaction> callBack)
        {
            if (callBack==null)
                throw new ArgumentNullException("Transaction callback can not be null");

            _callBack = callBack;

            Result = TransactionResult.Initialized;
            Stage = TransactionStage.Initial;
        }
Exemple #2
0
        public Transaction(RequestParams reqPrms, ResponseParams resPrms, Action <Transaction> callBack)
        {
            if (callBack == null)
            {
                throw new ArgumentNullException("Transaction callback can not be null");
            }

            _callBack = callBack;

            Result = TransactionResult.Initialized;
            Stage  = TransactionStage.Initial;
        }
Exemple #3
0
        private void StartNewTransaction(RequestParams reqPrmsPattern, ResponseParams resPrmsPattern)
        {
            Transaction tr = new Transaction(reqPrmsPattern, resPrmsPattern, TransactionCallback);

            Transactions.Add(tr);

            if (Attempts > 0)
            {
                tr.Begin();
            }
            else
            {
                SessionCallback();
            }
        }
Exemple #4
0
 public void BeginSession(RequestParams reqPrmsPattern, ResponseParams resPrmsPattern)
 {
     StartNewTransaction(reqPrmsPattern, resPrmsPattern);
 }
Exemple #5
0
        private void StartNewTransaction(RequestParams reqPrmsPattern, ResponseParams resPrmsPattern)
        {
            Transaction tr = new Transaction(reqPrmsPattern, resPrmsPattern, TransactionCallback);
            Transactions.Add(tr);

            if (Attempts > 0)
            {
                tr.Begin();
            }
            else
            {
                SessionCallback();
            }
        }
Exemple #6
0
 public void BeginSession(RequestParams reqPrmsPattern, ResponseParams resPrmsPattern)
 {
     StartNewTransaction(reqPrmsPattern, resPrmsPattern);
 }