예제 #1
0
        public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEventData eventData, DbDataReader result)
        {
            if (command?.CommandText != null)
            {
                ExecutedReaderCommands.Add(command.CommandText);
            }

            return(base.ReaderExecuted(command, eventData, result));
        }
예제 #2
0
        public override ValueTask <DbDataReader> ReaderExecutedAsync(DbCommand command, CommandExecutedEventData eventData, DbDataReader result, CancellationToken cancellationToken = default)
        {
            if (command?.CommandText != null)
            {
                ExecutedReaderCommands.Add(command.CommandText);
            }

            return(base.ReaderExecutedAsync(command, eventData, result, cancellationToken));
        }
예제 #3
0
        public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEventData eventData, DbDataReader result)
        {
            if (command?.CommandText != null)
            {
                lock (ExecutedReaderCommands)
                {
                    ExecutedReaderCommands.Add(BuildCommandInformation(command));
                }
            }

            return(base.ReaderExecuted(command, eventData, result));
        }