Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created December 8, 2016 01:52
Show Gist options
  • Save dcomartin/ef709948a937691b933fe2a918826307 to your computer and use it in GitHub Desktop.
Save dcomartin/ef709948a937691b933fe2a918826307 to your computer and use it in GitHub Desktop.
public class FeaturesViewLocator : IViewLocationExpander
{
public void PopulateValues(ViewLocationExpanderContext context)
{
context.Values["customviewlocation"] = nameof(FeaturesViewLocator);
}
public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations)
{
var viewLocationFormats = new[]
{
"~/Features/{1}/{0}.cshtml",
"~/Features/Shared/{0}.cshtml"
};
return viewLocationFormats;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment