示例#1
0
 protected void RegisterArg(string argName, ArgCall call, string helpString)
 {
     if (call == null)
         throw new ArgumentNullException("Argument callback can not be null.");
     if (argName.StartsWith("-"))
         throw new ArgumentException("Argument name can not starts with '-'.", "argName");
     _main.Add("-" + argName, call);
     _help.Add("-" + argName, helpString);
 }
示例#2
0
 protected void RegisterArg(string argName, ArgCall call)
 {
     RegisterArg(argName, call, null);
 }