Example #1
0
        protected MsmqClient(MsmqEndpoint endpoint)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException("endpoint");
            }

            endpoint.Validate();

            try
            {
                if (MessageQueue.Exists(endpoint.QueuePath) == false)
                {
                    MessageQueue.Create(endpoint.QueuePath);
                }

                Queue = new MessageQueue(endpoint.QueuePath);
            }
            catch (Exception ex)
            {
                throw new MessagingException(
                          "An error occurred while attempting to access the specified queue. See inner exception for more details.",
                          ex);
            }
        }
Example #2
0
        public MsmqEndpointManager(MsmqEndpoint endpoint)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            endpoint.Validate();

            this.endpoint = endpoint;
        }
Example #3
0
        public MsmqEndpointManager(MsmqEndpoint endpoint)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException("endpoint");
            }

            endpoint.Validate();

            this.endpoint = endpoint;
        }
Example #4
0
        protected MsmqClient(MsmqEndpoint endpoint)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            endpoint.Validate();

            try
            {
                if (MessageQueue.Exists(endpoint.QueuePath) == false)
                    MessageQueue.Create(endpoint.QueuePath);

                Queue = new MessageQueue(endpoint.QueuePath);
            }
            catch (Exception ex)
            {
                throw new MessagingException(
                    "An error occurred while attempting to access the specified queue. See inner exception for more details.",
                    ex);
            }
        }