/// <summary>The add confirm listener.</summary> /// <param name="ackListener">The ack listener.</param> /// <param name="nackListener">The nack listener.</param> public void AddConfirmListener(BasicAckEventHandler ackListener, BasicNackEventHandler nackListener) { this.ackListeners.Add(ackListener); this.nackListeners.Add(nackListener); this.channelDelegate.BasicAcks += ackListener; this.channelDelegate.BasicNacks += nackListener; }
/// <summary>The remove confirm listener.</summary> /// <param name="ackListener">The ack listener.</param> /// <param name="nackListener">The nack listener.</param> public void RemoveConfirmListener(BasicAckEventHandler ackListener, BasicNackEventHandler nackListener) { if (this.ackListeners.Contains(ackListener)) { this.ackListeners.Remove(ackListener); this.channelDelegate.BasicAcks -= ackListener; } if (this.nackListeners.Contains(nackListener)) { this.nackListeners.Remove(nackListener); this.channelDelegate.BasicNacks -= nackListener; } }