public static void EnableStandardRazorVBLocations() { FileExtensions.Add("vbhtml"); ViewFormats.Add("~/Views/{1}/{0}.vbhtml"); ViewFormats.Add("~/Views/{1}/{0}.vbhtml"); ViewFormats.Add("~/Views/Shared/{0}.vbhtml"); ViewFormats.Add("~/Views/Shared/{0}.vbhtml"); }
public static void AddLocation(string locationFormat, bool insertFirst) { if (!locationFormat.ToLower().Contains("{0}")) { throw new FormatException("You must specify a template format with '{0}', e.g. ~/Views/{1}/{0}.cshtml"); } if (insertFirst) { ViewFormats.Insert(0, locationFormat); } else { ViewFormats.Add(locationFormat); } }
public static void AddFolder(string folder, string extensionWithoutDot = "cshtml") { ViewFormats.Add("~/" + folder.Trim('/') + "/{0}." + extensionWithoutDot); ViewFormats.Add("~/" + folder.Trim('/') + "/{1}/{0}." + extensionWithoutDot); }