public virtual void OnFlowControl(FlowControlEventArgs args)
 {
     FlowControlEventHandler handler;
     lock (m_eventLock)
     {
         handler = m_flowControl;
     }
     if (handler != null)
     {
         foreach (FlowControlEventHandler h in handler.GetInvocationList())
         {
             try
             {
                 h(this, args);
             }
             catch (Exception e)
             {
                 CallbackExceptionEventArgs exnArgs = new CallbackExceptionEventArgs(e);
                 exnArgs.Detail["context"] = "OnFlowControl";
                 OnCallbackException(exnArgs);
             }
         }
     }
 }
 public virtual void OnFlowControl(FlowControlEventArgs args)
 {
     m_delegate.OnFlowControl(args);
 }
示例#3
0
 private void FlowControlEventHandler(object sender, FlowControlEventArgs e)
 {
     this.FlowControl?.Invoke(sender, e);
 }
 public virtual void OnFlowControl(FlowControlEventArgs args)
 {
     EventHandler<FlowControlEventArgs> handler;
     lock (m_eventLock)
     {
         handler = m_flowControl;
     }
     if (handler != null)
     {
         foreach (EventHandler<FlowControlEventArgs> h in handler.GetInvocationList())
         {
             try
             {
                 h(this, args);
             }
             catch (Exception e)
             {
                 OnCallbackException(CallbackExceptionEventArgs.Build(e, "OnFlowControl"));
             }
         }
     }
 }
示例#5
0
 private void ModelOnFlowControl(object sender, FlowControlEventArgs e)
 {
     _logger.Debug($"Flow control: {e.Active}");
     FlowControl?.Invoke(this, e);
 }