Пример #1
0
        /// <summary>
        /// Start the receiver.
        /// </summary>
        /// <param name="receiver"></param>
        /// <param name="handlerMap"></param>
        private void StartReceiver(IMessagePump receiver, MessageHandlerMap handlerMap)
        {
            MessagingEventSource.Log.MessageReceiverStarting(receiver, handlerMap);

            receiver.StartAsync(message => OnHandleMessage(receiver, null, message, handlerMap), OnError, 
                new ServiceBus.Receive.OnMessageOptions { AutoComplete = false }).Wait();
        }
Пример #2
0
 public static Task StartAsync(this IMessagePump pump, OnMessage messageHandler)
 {
     return(pump.StartAsync(messageHandler, null, null));
 }
Пример #3
0
 public static Task StartAsync(this IMessagePump pump, OnMessage messageHandler, OnMessageException exception)
 {
     return(pump.StartAsync(messageHandler, exception, null));
 }
Пример #4
0
 public static Task StartAsync(this IMessagePump pump, OnMessage messageHandler, OnMessageOptions options)
 {
     return(pump.StartAsync(messageHandler, null, options));
 }
Пример #5
0
        /// <summary>
        /// Start the receiver.
        /// </summary>
        /// <param name="receiver"></param>
        /// <param name="handlerMap"></param>
        private void StartReceiver(IMessagePump receiver, MessageHandlerMap handlerMap)
        {
            MessengerEventSource.Log.MessageReceiverStarting(receiver, handlerMap);

            receiver.StartAsync(message => OnHandleMessage(receiver, null, message, handlerMap), OnError).Wait();
        }
Пример #6
0
        /// <summary>
        /// Start the receiver.
        /// </summary>
        /// <param name="receiver"></param>
        /// <param name="handlerMap"></param>
        private void StartReceiver(IMessagePump receiver, MessageHandlerMap handlerMap)
        {
            MessengerEventSource.Log.MessageReceiverStarting(receiver, handlerMap);

            receiver.StartAsync(message => OnHandleMessage(receiver, null, message, handlerMap), OnError).Wait();
        }