コード例 #1
0
 public MessageProcessedEventArgs(MessageContext currentMessageContext, DateTime startTimestamp, DateTime endTimestamp, double p)
 {
     this.MessageContext = currentMessageContext;
     this.StartProcessingTimestamp = startTimestamp;
     this.EndProcessingTimestamp = endTimestamp;
     this.ProcessingDuration = p;
 }
コード例 #2
0
 public void Invoke(MessageContext context, Action<MessageContext> next)
 {
     int nextInvoked = 0;
     #if DEBUG
     logger.Debug("Pre-Invoke Behavior [{0}]", GetType().FullName);
     #endif
     Invoke(context, () =>
     {
         nextInvoked++;
         next(context);
     });
     System.Diagnostics.Debug.Assert(nextInvoked >= 1, "Inner pipelined behavior did not call next().", "All PipelinedBehavior must call next() exactly once.");
     System.Diagnostics.Debug.Assert(nextInvoked <= 1, "Inner pipelined behavior called next() too many times.", "All PipelinedBehavior must call next() exactly once.");
     #if DEBUG
     logger.Debug("Post-Invoke Behavior [{0}]", GetType().FullName);
     #endif
 }
コード例 #3
0
 protected abstract void Invoke(MessageContext context, Action next);