Exemple #1
0
        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();
        }
Exemple #3
0
 public override void Cancel()
 {
     InnerCommand.Cancel();
 }