示例#1
0
 /// <summary>
 /// Create a named command line parameter with the specifed settings.
 /// </summary>
 /// <param name="name">Name of the parameter</param>
 /// <param name="required">True if the paramter is required, false otherwise.</param>
 /// <param name="valueOption">Should this parameter have a value? Is it required or optional?</param>
 /// <param name="isSwitch">True if the parameter is a switch that can have an on/off value, false otherwise.</param>
 /// <param name="description">A description of the parameter</param>
 public CommandLineParameter(string name, bool required, CommandLineValueOption valueOption, bool isSwitch, string description)
 {
     this.name = name;
     this.required = required;
     this.valueOption = valueOption;
     this.isSwitch = isSwitch;
     this.description = description;
 }
示例#2
0
 /// <summary>
 /// Create an unnamed (positional) command line parameter with the specifed settings.
 /// </summary>
 /// <param name="required">True if the parameter is required, false otherwise.</param>
 /// <param name="valueName">A descriptive name of the value</param>
 /// <param name="positionalAcceptsMultipleValues">True if the parameter accepts multiple unnamed values from the command line (e.g. list of files), false otherwise.</param>
 /// <param name="description">A description of the parameter</param>
 public CommandLineParameter(bool required, string valueName, bool positionalAcceptsMultipleValues, string description)
 {
     this.name = null;
     this.required = required;
     this.positionalAcceptsMultipleValues = positionalAcceptsMultipleValues;
     this.valueOption = CommandLineValueOption.One;
     this.valueName = valueName;
     this.isSwitch = false;
     this.description = description;
 }