Пример #1
0
 /// <summary>
 /// Makes the specified name a valid command line argument.  Command line
 /// arguments are assumed to be in the format /&lt;name&gt;:&lt;value&gt;.
 /// </summary>
 /// <param name="name">The name of the command line argument.</param>
 /// <param name="allowNull">If true no value for the specified name is necessary.</param>
 /// <param name="addAcronym">Add another valid argument of the acronym of the specified name</param>
 public static void AddValidArgument(string name, bool allowNull, bool addAcronym = false, string description = null, string valueExample = null)
 {
     ValidArgumentInfo.Add(new ArgumentInfo(name, allowNull, description, valueExample));
     if (addAcronym)
     {
         ValidArgumentInfo.Add(new ArgumentInfo(name.CaseAcronym().ToLowerInvariant(), allowNull, $"{description}; same as {name}", valueExample));
     }
 }
Пример #2
0
 /// <summary>
 /// Makes the specified name a valid command line argument.  Command line
 /// arguments are assumed to be in the format /&lt;name&gt;:&lt;value&gt;.
 /// </summary>
 /// <param name="name">The name of the command line argument.</param>
 /// <param name="allowNull">If true no value for the specified name is necessary.</param>
 public static void AddValidArgument(string name, bool allowNull)
 {
     ValidArgumentInfo.Add(new ArgumentInfo(name, allowNull));
 }