internal OptionDescription CreateContentOptionDescriptionForHtmlDocument(string longName, string outputDir) { return(new OptionDescription(longName, (string)null, 1, (Action <List <string> >)(s => { this.isUseAdf = false; IEnumerable <NintendoSubmissionPackageContentResource> source = this.NspContentInfos[this.contentInfoIndex].ResourceList.Where <NintendoSubmissionPackageContentResource>((Func <NintendoSubmissionPackageContentResource, bool>)(x => x.ContentType.Equals("HtmlDocument"))); if (source.Count <NintendoSubmissionPackageContentResource>() > 1) { throw new ArgumentException(); } NintendoSubmissionPackageContentResource packageContentResource; if (source.Count <NintendoSubmissionPackageContentResource>() == 0) { packageContentResource = new NintendoSubmissionPackageContentResource(); packageContentResource.ContentType = "HtmlDocument"; this.NspContentInfos[this.contentInfoIndex].ResourceList.Add(packageContentResource); } else { packageContentResource = source.ElementAt <NintendoSubmissionPackageContentResource>(0); } for (int index = 0; index < s.Count; ++index) { string a = s[index].Replace("\\", "/").TrimEnd('/'); packageContentResource.PathList.Add(new Pair <string, string>(a, outputDir)); } }))); }
internal OptionDescription CreateContentOptionDescription(string longName, string type, int countArgs = 1) { return(new OptionDescription(longName, (string)null, countArgs, (Action <List <string> >)(s => { this.isUseAdf = false; NintendoSubmissionPackageContentResource packageContentResource = new NintendoSubmissionPackageContentResource(); packageContentResource.ContentType = type; for (int index = 0; index < s.Count; ++index) { string str = s[index].Replace("\\", "/").TrimEnd('/'); if (longName == "--legal-information") { str = this.ExtractZipFile(str); } packageContentResource.PathList.Add(new Pair <string, string>(str, (string)null)); } this.NspContentInfos[this.contentInfoIndex].ResourceList.Add(packageContentResource); }))); }