public RecognizedArgument(Argument argumentWithOptions, int index, string argument, string value = null) { Index = index; Value = value; Argument = argumentWithOptions; RawArgument = argument; }
public bool Equals(Argument other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Description, Description) && Equals(other.Name, Name) && other.Required.Equals(Required); }
private string DescriptionAndHelp(Argument argument) { if (argument is ArgumentWithOptions) { return ((ArgumentWithOptions)argument).Argument.Help(); } return "--"+argument.Name; }
private bool Accept(Argument argument, string value) { if (argument is ArgumentWithOptions) { return ((ArgumentWithOptions)argument).Argument.Accept(value); } return ArgumentParameter.Parse(argument.Name, cultureInfo).Accept(value); }