예제 #1
0
        protected WindowsServiceBusQueueClient(WindowsServiceBusQueueEndpoint endpoint,
                                             IWindowsServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            endpoint.Validate();

            try
            {
                if (NsManager.QueueExists(endpoint.QueueName) == false)
                    NsManager.CreateQueue(endpoint.QueueName);

                QueueClient = QueueClient.CreateFromConnectionString(sbConfiguration.ConnectionString,
                                                                     endpoint.QueueName);
            }
            catch (Exception ex)
            {
                throw new MessagingException(
                    String.Format(
                        "An error occurred while attempting to access the specified Windows service bus queue [{0}]. See inner exception for more details.",
                        endpoint.QueueName),
                    ex);
            }
        }
        protected WindowsServiceBusQueueClient(WindowsServiceBusQueueEndpoint endpoint,
                                               IWindowsServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException("endpoint");
            }

            endpoint.Validate();

            try
            {
                if (NsManager.QueueExists(endpoint.QueueName) == false)
                {
                    NsManager.CreateQueue(endpoint.QueueName);
                }

                QueueClient = QueueClient.CreateFromConnectionString(sbConfiguration.ConnectionString,
                                                                     endpoint.QueueName);
            }
            catch (Exception ex)
            {
                throw new MessagingException(
                          String.Format(
                              "An error occurred while attempting to access the specified Windows service bus queue [{0}]. See inner exception for more details.",
                              endpoint.QueueName),
                          ex);
            }
        }
        protected WindowsServiceBusQueueEndpointManager(WindowsServiceBusQueueEndpoint endpoint,
                                                      IWindowsServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            endpoint.Validate();

            this.endpoint = endpoint;
        }
예제 #4
0
        protected WindowsServiceBusQueueEndpointManager(WindowsServiceBusQueueEndpoint endpoint,
                                                        IWindowsServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException("endpoint");
            }

            endpoint.Validate();

            this.endpoint = endpoint;
        }