Exemplo n.º 1
0
        /// <summary>
        /// Registers a transaction stop event that occured within the connection.
        /// </summary>
        /// <param name="transaction">The transaction itself.</param>
        public void RegisterTransactionEnd(TransactionMetadata transaction)
        {
            var command = Commands.LastOrDefault(x => x.Value.Offset <= transaction.Offset + transaction.Duration);

            if (command.Value != null)
            {
                command.Value.TailTransaction = transaction;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Registers a transaction start event that occured within the connection.
        /// </summary>
        /// <param name="transaction">The transaction itself.</param>
        public void RegisterTransactionStart(TransactionMetadata transaction)
        {
            Transactions.Add(transaction.Id, transaction);

            var command = Commands.FirstOrDefault(x => x.Value.Offset >= transaction.Offset);

            if (command.Value != null)
            {
                command.Value.HeadTransaction = transaction;
            }
        }
Exemplo n.º 3
0
        private TransactionMetadata GetOrCreateTransactionFor(AdomdTransactionMessage message)
        {
            TransactionMetadata transaction;
            var connectionId  = message.ConnectionId.ToString();
            var transactionId = message.TransactionId.ToString();

            if (!Metadata.Transactions.TryGetValue(transactionId, out transaction))
            {
                transaction = new TransactionMetadata(transactionId, connectionId);
                Metadata.Transactions.Add(transactionId, transaction);
            }

            return(transaction);
        }
        /// <summary>
        /// Registers a transaction start event that occured within the connection.
        /// </summary>
        /// <param name="transaction">The transaction itself.</param>
        public void RegisterTransactionStart(TransactionMetadata transaction)
        {
            Transactions.Add(transaction.Id, transaction);

            var command = Commands.FirstOrDefault(x => x.Value.Offset >= transaction.Offset);
            if (command.Value != null)
            {
                command.Value.HeadTransaction = transaction;
            }
        }
 /// <summary>
 /// Registers a transaction stop event that occured within the connection.
 /// </summary>
 /// <param name="transaction">The transaction itself.</param>
 public void RegisterTransactionEnd(TransactionMetadata transaction)
 {
     var command = Commands.LastOrDefault(x => x.Value.Offset <= transaction.Offset + transaction.Duration);
     if (command.Value != null)
     {
         command.Value.TailTransaction = transaction;
     }
 }
Exemplo n.º 6
0
        private TransactionMetadata GetOrCreateTransactionFor(AdomdTransactionMessage message)
        {
            TransactionMetadata transaction;
            var connectionId = message.ConnectionId.ToString();
            var transactionId = message.TransactionId.ToString();

            if (!Metadata.Transactions.TryGetValue(transactionId, out transaction))
            {
                transaction = new TransactionMetadata(transactionId, connectionId);
                Metadata.Transactions.Add(transactionId, transaction);
            }

            return transaction;
        }