public ICommand CreateCommand(ITypeResolver resolver) { if (resolver.Resolve(Command.CommandType) is ICommand command) { return(command); } throw ParseException.CouldNotCreateCommand(Command.CommandType); }