public override ICommandResult Execute(ExecutionInformation info, IEnumerable <ICommand> arguments, IEnumerable <CommandResultType> returnTypes) { if (!info.HasRights(requiredRights)) { throw new CommandException($"You cannot execute \"{InvokeName}\". You are missing the \"{RequiredRight}\" right.!", CommandExceptionReason.MissingRights); } return(base.Execute(info, arguments, returnTypes)); }
public override ICommandResult Execute(ExecutionInformation info, IReadOnlyList <ICommand> arguments, IReadOnlyList <CommandResultType> returnTypes) { if (!info.HasRights(requiredRights)) { throw new CommandException(string.Format(strings.error_missing_right, InvokeName, RequiredRight), CommandExceptionReason.MissingRights); } return(base.Execute(info, arguments, returnTypes)); }