private void OnCommandExecuteEnd(DateTimeOffset startTime, DateTimeOffset endTime, Exception exception)
        {
            if (isEnded)
            {
                // Do not fire this event twice
                return;
            }

            isEnded = true;

            var args = new ProfilingEventEndArgs <DbCommand>(null, startTime, endTime, exception);

            CommandExecuteEnd?.Invoke(this, args);
        }
Beispiel #2
0
        private void OnTransactionRollbackEnd(DateTimeOffset startTime, DateTimeOffset endTime, Exception exception)
        {
            var args = new ProfilingEventEndArgs <DbTransaction>(InnerTransaction, startTime, endTime, exception);

            TransactionRollbackEnd?.Invoke(this, args);
        }
Beispiel #3
0
        private void OnTransactionCommitEnd(DateTimeOffset startTime, DateTimeOffset endTime)
        {
            var args = new ProfilingEventEndArgs <DbTransaction>(InnerTransaction, startTime, endTime);

            TransactionCommitEnd?.Invoke(this, args);
        }