Пример #1
0
        /// <summary>
        /// The main.
        /// </summary>
        /// <param name="arguments">
        /// The arguments.
        /// </param>
        public static void Main(string[] arguments)
        {
            var queueManager = new MsmqQueueManager(null);

            var recievedMessage = queueManager.Setup(@".\Private$\TestMessageDtoQueue").Pop<TestMessageDto>(new TimeSpan(0, 0, 3));

            Console.Write("{1}{0}{2}{0}{3}", Environment.NewLine, recievedMessage.RandomProperty, recievedMessage.RandomDoubleProperty, recievedMessage.RandomIntegerProperty);

            Console.ReadKey();
        }
Пример #2
0
        /// <summary>
        /// The main.
        /// </summary>
        /// <param name="args">
        /// The arguments.
        /// </param>
        public static void Main(string[] args)
        {
            var queueManager = new MsmqQueueManager(null);

            var message = new TestMessageDto
                              {
                                  RandomDoubleProperty = 234.45645,
                                  RandomIntegerProperty = 49282,
                                  RandomProperty = @"Yello somebody!"
                              };

            queueManager.Setup(@".\Private$\TestMessageDtoQueue").Push(message, new TimeSpan(0, 0, 10));
        }