Skip to content

Instantly share code, notes, and snippets.

@toddpi314
Created July 30, 2012 00:04
Show Gist options
  • Save toddpi314/3202718 to your computer and use it in GitHub Desktop.
Save toddpi314/3202718 to your computer and use it in GitHub Desktop.
Lightning_CustomRazorViewEngine
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