예제 #1
0
 public CommandLineOption(string Name, string Description, bool ArgRequired, OptionEnabled Callback)
 {
     this.OptionName        = Name;
     this.OptionDescription = Description;
     this.ArgumentRequired  = ArgRequired;
     this.Callback          = Callback;
 }
예제 #2
0
 /// <summary>
 /// Adds a parseable option
 /// </summary>
 /// <param name="OptionName">Name of the option</param>
 /// <param name="OptionDescription">Description of the option</param>
 /// <param name="RequiresArgument">True if an argument is required</param>
 /// <param name="Callback">The callback to call if this option is parsed. May be null.</param>
 public void AddOption(string OptionName, string OptionDescription, bool RequiresArgument, OptionEnabled Callback = null)
 {
     if (IsOptionRegistered(OptionName))
     {
         return;                                 // Don't re-register an already existing option.
     }
     RegisteredOptions.Add(new CommandLineOption(OptionName, OptionDescription, RequiresArgument, Callback));
 }