public RelayedOnewayChannelListener(BindingContext context, RelayedOnewayTransportBindingElement transportBindingElement) : base(context.Binding)
        {
            this.nameSettings = context.BindingParameters.Find <Microsoft.ServiceBus.NameSettings>();
            if (this.nameSettings == null)
            {
                this.nameSettings = new Microsoft.ServiceBus.NameSettings();
                this.nameSettings.ServiceSettings.ListenerType = ListenerType.Unicast;
            }
            this.scheme         = context.Binding.Scheme;
            this.messageVersion = context.Binding.MessageVersion;
            switch (context.ListenUriMode)
            {
            case ListenUriMode.Explicit:
            {
                this.SetUri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
                break;
            }

            case ListenUriMode.Unique:
            {
                this.SetUniqueUri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
                break;
            }
            }
            this.channel  = new RelayedOnewayChannelListener.RelayedOnewayInputChannel(this, new EndpointAddress(this.Uri, new AddressHeader[0]));
            base.Acceptor = new Microsoft.ServiceBus.Channels.InputChannelAcceptor(this, () => this.GetPendingException());
            this.ChannelAcceptor.EnqueueAndDispatch(this.channel, new Action(this.OnChannelDequeued));
            this.connection = RelayedOnewayManager.RegisterListener(context, transportBindingElement, this);
        }
 public RelayedOnewayListener(BindingContext context, RelayedOnewayTransportBindingElement transportBindingElement, System.Uri uri, EventTraceActivity activity)
 {
     this.nameSettings = context.BindingParameters.Find <Microsoft.ServiceBus.NameSettings>();
     if (this.nameSettings == null)
     {
         this.nameSettings = new Microsoft.ServiceBus.NameSettings();
         this.nameSettings.ServiceSettings.ListenerType = ListenerType.Unicast;
     }
     this.listenerTable      = new Microsoft.ServiceBus.Channels.UriPrefixTable <RelayedOnewayListener.RelayedOnewayChannelListenerCollection>();
     this.client             = new RelayedOnewayListener.RelayedOnewayAmqpListenerClient(context, transportBindingElement, uri, this, activity);
     this.client.Connecting += new EventHandler(this.OnConnecting);
     this.client.Online     += new EventHandler(this.OnOnline);
     this.client.Offline    += new EventHandler(this.OnOffline);
 }
 public ListenMessage(System.Uri uri, Microsoft.ServiceBus.NameSettings nameSettings)
 {
     this.uri          = uri;
     this.nameSettings = nameSettings;
 }