/// <summary> /// Sends the given <see cref="ISystemAction"/> command. /// </summary> public void SendSystemCommand(ISystemAction systemCommand) { lock (locker) { // Pre-filter incompatible types. if (systemCommand is null) { throw new ArgumentNullException(nameof(systemCommand)); } if (!SystemCommands.Contains(systemCommand.GetType())) { return; } Log.Debug(this, nameof(SendSystemCommand) + ": " + systemCommand); ExecuteSystemCommand?.Invoke(systemCommand); } }