예제 #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();
        }