예제 #1
0
 /// <summary>
 /// The on subscriber receiving.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnSubscriberReceiving(object sender, SubscriberReceivingEventArgs args)
 {
     if (this.SubscriberReceiving != null)
     {
         this.SubscriberReceiving(sender, args);
     }
 }
예제 #2
0
 /// <summary>
 /// The subscriber receive.
 /// </summary>
 /// <param name="subscriber">
 /// The subscriber.
 /// </param>
 /// <param name="message">
 /// The message.
 /// </param>
 /// <returns>
 /// The <see cref="IDisposable"/>.
 /// </returns>
 public IDisposable SubscriberReceive(ISubscriber subscriber, IMessage message)
 {
     return(GetActivityTracker(
                () =>
     {
         var args = new SubscriberReceivingEventArgs {
             Message = message
         };
         this.OnSubscriberReceiving(subscriber, args);
     },
                t =>
     {
         var args = new SubscriberReceivedEventArgs {
             Elapsed = t, Message = message
         };
         this.OnSubscriberReceived(subscriber, args);
     }));
 }
 /// <summary>
 /// The subscriber receive.
 /// </summary>
 /// <param name="subscriber">
 /// The subscriber.
 /// </param>
 /// <param name="message">
 /// The message.
 /// </param>
 /// <returns>
 /// The <see cref="IDisposable"/>.
 /// </returns>
 public IDisposable SubscriberReceive(ISubscriber subscriber, IMessage message)
 {
     return GetActivityTracker(
         () =>
             {
                 var args = new SubscriberReceivingEventArgs { Message = message };
                 this.OnSubscriberReceiving(subscriber, args);
             }, 
         t =>
             {
                 var args = new SubscriberReceivedEventArgs { Elapsed = t, Message = message };
                 this.OnSubscriberReceived(subscriber, args);
             });
 }
 /// <summary>
 /// The on subscriber receiving.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnSubscriberReceiving(object sender, SubscriberReceivingEventArgs args)
 {
     if (this.SubscriberReceiving != null)
     {
         this.SubscriberReceiving(sender, args);
     }
 }