protected virtual void BaseHandle <TCommand>(TCommand command) where TCommand : class { if (command == null) { throw new ArgumentNullException(nameof(command)); } OutputHelper.WriteLine($"{DateTime.Now}: {GetType().Name} executed command of type {command.GetType().Name}."); InternalHandledCommands.Add(command); }
public bool HasHandledCommand <TCommand>() { return(InternalHandledCommands.Any(c => c is TCommand)); }