Amqp.Listener.ListenerLink.InitializeReceiver C# (CSharp) Метод

InitializeReceiver() публичный Метод

Initializes the receiver state for the link.
public InitializeReceiver ( uint credit, Action onMessage, object state ) : void
credit uint The link credit to send to the peer.
onMessage Action The callback to be invoked for received messages.
state object The user state attached to the link.
Результат void
        public void InitializeReceiver(uint credit, Action<ListenerLink, Message, DeliveryState, object> onMessage, object state)
        {
            ThrowIfNotNull(this.linkEndpoint, "endpoint");
            ThrowIfNotNull(this.onMessage, "receiver");
            this.credit = credit;
            this.autoRestore = true;
            this.onMessage = onMessage;
            this.state = state;
        }

Usage Example

Пример #1
0
            public void AddLink(ListenerLink link, string address)
            {
                if (!link.Role)
                {
                    throw new AmqpException(ErrorCode.NotAllowed, "Only sender link can be attached at " + address);
                }

                link.InitializeReceiver((uint)processor.Credit, dispatchMessage, this);
                link.Closed += OnLinkClosed;
                lock (this.links)
                {
                    this.links.Add(link);
                }
            }
All Usage Examples Of Amqp.Listener.ListenerLink::InitializeReceiver