Repository navigation
#7105 Trace when query is done. This is needed in order to get Select… - #7106
Conversation
|
Hi @fitzchak, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
|
@anpete I applied requested changes. |
| [NotNull] DbCommand command, | ||
| [NotNull] DbDataReader reader) | ||
| [NotNull] DbDataReader reader, | ||
| [NotNull] DiagnosticSource diagnosticSource) |
| connection, | ||
| dbCommand, | ||
| dbCommand.ExecuteReader()); | ||
| dbCommand.ExecuteReader(), DiagnosticSource); |
| { | ||
| if (!_disposed) | ||
| { | ||
| _diagnosticSource.WriteDataReaderDisposed(this); |
There was a problem hiding this comment.
Looks like we are firing the event before disposing the underlying reader, which is probably more useful anyway. I think we should tweak the event name to reflect that. I.e. "Disposing" instead of "Disposed".
There was a problem hiding this comment.
Do you actually need the reader instance for your use case?
There was a problem hiding this comment.
Yes, we need it before the disposing. So I changed the name to "Disposing".
Also we need just the instance of DbDataReader, which has the command with the statistics and the connection. So I changed this also to send just the DbDataReader.
|
I amended the commit with the requested changes. |
Fix #7105