internal static Page LoadOrCreateSpecial(HTTPCode code) { string loc = "specials/" + code.SpecialLocation; if (System.IO.File.Exists(loc + ".dll")) { return LoadGenerator(loc + ".dll"); } else if (System.IO.File.Exists(loc + ".html")) { return LoadFlat(loc + ".html"); } else { } }
internal static IPage LoadOrCreateSpecial(HTTPCode code) { string loc = "specials/" + code.SpecialLocation; if (System.IO.File.Exists(loc + ".dll")) { return LoadGenerator(loc + ".dll"); } else if (System.IO.File.Exists(loc + ".html")) { return LoadFlat(loc + ".html"); } else { using (var r = Assembly.GetExecutingAssembly().GetManifestResourceStream("NetDotNet.Core.IO.Pages.DefaultSpecials." + code.SpecialLocation + ".html")) { using (var fos = new FileStream(loc, FileMode.Create)) { r.CopyTo(fos); } } return LoadFlat(loc + ".html"); } }