예제 #1
0
 /// <summary>
 /// Registers a parameter to be used and adds it to the help screen.
 /// </summary>
 /// <param name="p">The parameter to add.</param>
 public void RegisterParameter(CmdLineParameter parameter)
 {
     if (parameters.ContainsKey(parameter.Name))
     {
         throw new CmdLineException(parameter.Name, "Parameter is already registered.");
     }
     parameters.Add(parameter.Name, parameter);
 }
 /// <summary>
 /// Registers parameters to be used and adds hem to the help screen.
 /// </summary>
 /// <param name="p">The parameter to add.</param>
 public void RegisterParameter(CmdLineParameter[] parameters)
 {
     foreach (CmdLineParameter p in parameters)
         RegisterParameter(p);
 }
 /// <summary>
 /// Registers a parameter to be used and adds it to the help screen.
 /// </summary>
 /// <param name="p">The parameter to add.</param>
 public void RegisterParameter(CmdLineParameter parameter)
 {
     if (parameters.ContainsKey(parameter.Name))
         throw new CmdLineException(parameter.Name, "Parameter is already registered.");
     parameters.Add(parameter.Name, parameter);
 }