public sealed class PrivilegedActionCommand : IEquatable<PrivilegedActionCommand> A command of a PrivilegedActionDeclaration: the first argument after the verb, and a pattern for each argument that may follow it.
Remarks
Declare commands with RunicPrivilegedCommand items. A command is equal to another with the same name, patterns and PrivilegedActionCommand.MinimumArguments.
Constructors
PrivilegedActionCommand
public PrivilegedActionCommand(string name, params string[] argumentPatterns) Declares a command.
Parameters
nameThe command's name, which the first argument after the verb must equal.
argumentPatternsOne pattern for each argument after the name, in order, each matched against the whole argument like
PrivilegedActionDeclaration.ArgumentPattern. The command accepts no more arguments than patterns.
Exceptions
ArgumentExceptionThe name is empty, longer than
PrivilegedActionDeclaration.ArgumentLengthLimitor contains a NUL character, a pattern is null, or there are more thanPrivilegedActionDeclaration.ArgumentLimitminus one patterns.
Properties
ArgumentPatterns
public ImmutableArray<string> ArgumentPatterns { get; } The patterns of the arguments after the name, by position.
MinimumArguments
public int MinimumArguments { get; init; } How many arguments after the name are required, from 0 to the number of PrivilegedActionCommand.ArgumentPatterns; the rest may be left out from the end. The default requires them all.
Exceptions
ArgumentOutOfRangeExceptionThe value is negative or greater than the number of patterns.
Name
public string Name { get; } The command's name, the first argument after the verb.
Methods
Equals
public bool Equals(PrivilegedActionCommand? other) Inherits documentation from IEquatable.Equals.