protected AmqpLink(AmqpSession session, AmqpLinkSettings linkSettings) { if (linkSettings == null) { throw new ArgumentNullException("linkSettings"); } this.Session = session; this.settings = linkSettings; this.linkCredit = this.settings.TransferLimit; this.settings.AutoSendFlow = this.linkCredit > 0; this.syncRoot = new object(); Source source = (Source)this.settings.Source; if (source != null) { this.defaultOutcome = source.DefaultOutcome; } if (this.defaultOutcome == null) { this.defaultOutcome = AmqpConstants.ReleasedOutcome; } this.unsettledMap = new Dictionary <ArraySegment <byte>, Delivery>(ByteArrayComparer.Instance); this.pendingDeliveries = new SerializedWorker <Delivery>(this.TrySendDelivery, this.AbortDelivery, false); session.AttachLink(this); }
protected AmqpLink(AmqpSession session, AmqpLinkSettings linkSettings) { if (linkSettings == null) { throw new ArgumentNullException("linkSettings"); } this.Session = session; this.settings = linkSettings; this.linkCredit = this.settings.TransferLimit; this.settings.AutoSendFlow = this.linkCredit > 0; this.syncRoot = new object(); Source source = (Source)this.settings.Source; if (source != null) { this.defaultOutcome = source.DefaultOutcome; } if (this.defaultOutcome == null) { this.defaultOutcome = AmqpConstants.ReleasedOutcome; } this.unsettledMap = new Dictionary<ArraySegment<byte>, Delivery>(ByteArrayComparer.Instance); this.pendingDeliveries = new SerializedWorker<Delivery>(this.TrySendDelivery, this.AbortDelivery, false); session.AttachLink(this); }
public void AttachTo(AmqpSession session) { this.MaxFrameSize = session.Connection.Settings.MaxFrameSize(); this.Session = session; session.AttachLink(this); }