Пример #1
0
 public RecognizedArgument(Argument argumentWithOptions, int index, string argument, string value = null)
 {
     Index = index;
     Value = value;
     Argument = argumentWithOptions;
     RawArgument = argument;
 }
Пример #2
0
 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);
 }
Пример #3
0
 private string DescriptionAndHelp(Argument argument)
 {
     if (argument is ArgumentWithOptions)
     {
         return ((ArgumentWithOptions)argument).Argument.Help();
     }
     return "--"+argument.Name;
 }
Пример #4
0
 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);
 }