This file contains hidden or 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
| /* Polyfill indexOf. */ | |
| var indexOf; | |
| if (typeof Array.prototype.indexOf === 'function') { | |
| indexOf = function (haystack, needle) { | |
| return haystack.indexOf(needle); | |
| }; | |
| } else { | |
| indexOf = function (haystack, needle) { | |
| var i = 0, length = haystack.length, idx = -1, found = false; |
This file contains hidden or 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
| public class ModularConventionViewEngine : RazorViewEngine | |
| { | |
| //This needs to be initialized to the root namespace of your MVC project. | |
| //Usually, the namespace of your Global.asax's codebehind will do the trick. | |
| private static readonly string RootNamespace = typeof(MvcApplication).Namespace; | |
| private static IEnumerable<string> GetPath(ControllerContext controllerContext, string viewName) | |
| { | |
| var paths = new List<string>(); |