Created
June 26, 2011 21:54
-
-
Save thecodejunkie/1048019 to your computer and use it in GitHub Desktop.
Default view location conventions in Nancy
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
private static void ConfigureViewLocationConventions(NancyConventions conventions) | |
{ | |
conventions.ViewLocationConventions = new List<Func<string, object, ViewLocationContext, string>> | |
{ | |
(viewName, model, viewLocationContext) => { | |
return string.Concat("/", viewName); | |
}, | |
(viewName, model, viewLocationContext) => { | |
return string.Concat("/views/", viewName); | |
}, | |
(viewName, model, viewLocationContext) => { | |
return string.Concat("/views", viewLocationContext.ModulePath, "/", viewName); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment