Created
July 30, 2012 00:04
-
-
Save toddpi314/3202718 to your computer and use it in GitHub Desktop.
Lightning_CustomRazorViewEngine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace LightningMVC.Code | |
{ | |
public class MVVMRazorViewEngine : RazorViewEngine | |
{ | |
public MVVMRazorViewEngine() | |
: base() | |
{ | |
AreaViewLocationFormats = new[] { | |
"~/Areas/{2}/Views/{0}/{0}View.cshtml", | |
"~/Areas/{2}/Views/{0}/{0}View.vbhtml", | |
"~/Areas/{2}/Views/Shared/{0}.cshtml", | |
"~/Areas/{2}/Views/Shared/{0}.vbhtml" | |
}; | |
AreaMasterLocationFormats = new[] { | |
"~/Areas/{2}/Views/{0}/{0}View.cshtml", | |
"~/Areas/{2}/Views/{0}/{0}View.vbhtml", | |
"~/Areas/{2}/Views/Shared/{0}.cshtml", | |
"~/Areas/{2}/Views/Shared/{0}.vbhtml" | |
}; | |
AreaPartialViewLocationFormats = new[] { | |
"~/Areas/{2}/Views/{0}/{0}View.cshtml", | |
"~/Areas/{2}/Views/{0}/{0}View.vbhtml", | |
"~/Areas/{2}/Views/Shared/{0}.cshtml", | |
"~/Areas/{2}/Views/Shared/{0}.vbhtml" | |
}; | |
ViewLocationFormats = new[] { | |
"~/Views/{0}/{0}View.cshtml", | |
"~/Views/{0}/{0}View.vbhtml", | |
"~/Views/Shared/{0}.cshtml", | |
"~/Views/Shared/{0}.vbhtml" | |
}; | |
MasterLocationFormats = new[] { | |
"~/Views/{0}/{0}View.cshtml", | |
"~/Views/{0}/{0}View.vbhtml", | |
"~/Views/Shared/{0}.cshtml", | |
"~/Views/Shared/{0}.vbhtml" | |
}; | |
PartialViewLocationFormats = new[] { | |
"~/Views/{0}/{0}View.cshtml", | |
"~/Views/{0}/{0}View.vbhtml", | |
"~/Views/Shared/{0}.cshtml", | |
"~/Views/Shared/{0}.vbhtml" | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment