public void Start() { if (started.CompareAndSet(false, true)) { dispatcher = new SessionDispatcher(); foreach (NmsMessageConsumer consumer in consumers.Values.ToArray()) { consumer.Start(); } } }
public void Stop() { if (started.CompareAndSet(true, false)) { dispatcher.Stop(); dispatcher = null; foreach (NmsMessageConsumer consumer in consumers.Values) { consumer.Stop(); } } }
public ExcludeCheckIsOnDeliveryExecutionFlowBlock(SessionDispatcher sessionDispatcher) { this.sessionDispatcher = sessionDispatcher; this.previousValue = sessionDispatcher.isOnDispatcherFlow.Value; sessionDispatcher.isOnDispatcherFlow.Value = false; }