Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        private void OnTransactionRollbackEnd(DateTimeOffset startTime, DateTimeOffset endTime, Exception exception)
        {
            var args = new ProfilingEventEndArgs <DbTransaction>(InnerTransaction, startTime, endTime, exception);

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

            TransactionCommitEnd?.Invoke(this, args);
        }