Example #1
0
 public void ParsePositionalArgument(string[] args)
 {
     if (args.Length < 2)
     {
         throw new InvalidOptionException("too few arguments for mergensp subcommand.");
     }
     for (int index = 0; index < args.Length; ++index)
     {
         this.InputFiles.Add(OptionUtil.CheckAndNormalizeFilePath(args[index], string.Format("arg[{0}]", (object)index)));
     }
 }
 public void ParsePositionalArgument(string[] args)
 {
     if (args.Length == 0)
     {
         throw new InvalidOptionException("input nsp file must be specified for prodencryption subcommand.");
     }
     this.InputNspFile = OptionUtil.CheckAndNormalizeFilePath(args[0], "arg[0]");
     if (args.Length >= 2)
     {
         throw new InvalidOptionException("too many arguments for prodencryption subcommand.");
     }
     if (!this.CreateXci && (this.NoCreateXcie || this.LaunchFlags != (byte)0 || (this.InputUppNspFile != null || this.InputPatchNspFile != null)))
     {
         throw new InvalidOptionException("--no-xcie, --auto-boot, --history-erase, --upp and --patch option requires to be used with --xci option.");
     }
     if (!this.NoCreateXcie)
     {
         return;
     }
     this.CreateXcie = false;
 }
Example #3
0
 public static OptionDescription CreateFilePathOptionDescription(string longName, OptionUtil.PathSetter setter)
 {
     return(new OptionDescription(longName, (string)null, 1, (Action <List <string> >)(s => setter(OptionUtil.CheckAndNormalizeFilePath(s.First <string>(), longName)))));
 }