public override void Close() { Stats.CommandRowCount(ConnectionId, CommandId, RowCount); var inner = this.InnerDataReader as SqlDataReader; if (!Disposed && inner != null && InnerCommand.Transaction == null && inner.Read()) { InnerCommand.Cancel(); } Disposed = true; this.InnerDataReader.Close(); }
public override void Close() { if (MessageBroker != null) { MessageBroker.Publish( new CommandRowCountMessage(ConnectionId, CommandId, RowCount) .AsTimedMessage(TimeSpan.Zero)); } var inner = InnerDataReader as SqlDataReader; if (!Disposed && inner != null && InnerCommand.Transaction == null && inner.Read()) { InnerCommand.Cancel(); } Disposed = true; InnerDataReader.Close(); }
public override void Cancel() { InnerCommand.Cancel(); }