protected virtual bool CanContinue() { bool isQueueEmpty = _eventQueue.CountQueueItems() == 0; int actualDispatches = _dispatchQueue.CountQueueItems(); int maxDispatches = _dispatchQueue.PersistBeginOnItemsCount; bool isDispatchQueueFull = actualDispatches >= maxDispatches; return(!isQueueEmpty && !isDispatchQueueFull && _hubState.State == SwitchState.Started); }