internal AzureConnection(AzureProvider provider, Logger logger, IAzureConnectionHandler handler, string channel, IMessage messageToSend)
        {
            this.provider      = provider;
            this.channel       = channel;
            this.handler       = handler;
            this.logger        = logger;
            this.messageToSend = messageToSend;

            baseUrl = string.Format("https://{0}.{1}/", provider.ServiceNamespace, provider.ServiceBusHostname);

            if (provider.UseTopics)
            {
                string[] parts = channel.Split('/');

                if (parts.Length < 2)
                {
                    topicName        = channel;
                    subscriptionName = channel;
                }
                else
                {
                    topicName        = parts[0];
                    subscriptionName = parts[1];
                }

                subscriptionPath = string.Format("{0}/subscriptions/{1}", topicName, subscriptionName);
            }
        }
 public AzureReceiver(AzureProvider provider, Logger logger, string channel)
     : base(provider, logger, channel)
 {
     connection = new AzureConnection(provider, logger, this, channel);
 }
 internal AzureConnection(AzureProvider provider, Logger logger, IAzureConnectionHandler handler, IMessage messageToSend)
     : this(provider, logger, handler, messageToSend.Channel, messageToSend)
 {
 }
 internal AzureConnection(AzureProvider provider, Logger logger, IAzureConnectionHandler handler, string channel)
     : this(provider, logger, handler, channel, null)
 {
 }
 public AzureSender(AzureProvider provider, Logger logger, string channel, IMessage message) :
     base(provider, logger, message)
 {
     connection = new AzureConnection(provider, logger, this, channel, message);
 }