Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        public MsmqEndpointManager(MsmqEndpoint endpoint)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            endpoint.Validate();

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

            endpoint.Validate();

            this.endpoint = endpoint;
        }
Exemplo n.º 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);
            }
        }