public void PurgeQueues() { while (_waitingCommandQueue.Count > 0) { _waitingCommandQueue.TryDequeue(out var dummy); CommandQueueLengthChanged?.Invoke(this, CommandQueueLength); } SystemCommands.Purge(); ManualCommands.Purge(); FileCommands.Purge(); MacroCommands.Purge(); }