Beispiel #1
0
 internal void OnTransReplyCall(TransactionReply reply)
 {
     OnTransReply?.Invoke(reply);
     // this should happen only once per transaction id
     Trace.Assert(TransactionReply == null);
     TransactionReply = reply;
 }
Beispiel #2
0
 internal void OnTransReplyCall(TransactionReply reply)
 {
     if (OnTransReply != null) { OnTransReply(reply); }
     // this should happen only once per transaction id
     Trace.Assert(TransactionReply == null);
     TransactionReply = reply;
 }
Beispiel #3
0
        internal void OnTransReplyCall(TransactionReply reply)
        {
            if (OnTransReply != null) OnTransReply(reply);

            // invoke event specific for the transaction
            if (string.IsNullOrEmpty(reply.Comment))//"Initialization user successful" transaction doesn't contain comment
                return;

            if (QuikService.Storage.Contains(reply.Comment)) {
                var tr = QuikService.Storage.Get<Transaction>(reply.Comment);
                lock (tr) {
                    tr.OnTransReplyCall(reply);
                }
            } else {
                // NB ignore unmatched transactions
                //Trace.Fail("Transaction must exist in persistent storage until it is completed and its reply is recieved");
            }
        }
Beispiel #4
0
 internal void OnTransReplyCall(TransactionReply reply)
 {
     if (OnTransReply != null) OnTransReply(reply);
     // invoke event specific for the transaction
     var tr = QuikService.Storage.Get<Transaction>(reply.Comment);
     if (tr != null) {
         lock (tr)
         {
             tr.OnTransReplyCall(reply);
             // persist transaction with added reply
             QuikService.Storage.Set(reply.Comment, tr);
         }
     }
     Trace.Assert(tr != null, "Transaction must exist in persistent storage until it is completed and its reply is recieved");
 }