Skip to content

Instantly share code, notes, and snippets.

@lynchjames
Created October 30, 2012 10:42
Show Gist options
  • Save lynchjames/3979548 to your computer and use it in GitHub Desktop.
Save lynchjames/3979548 to your computer and use it in GitHub Desktop.
Filter Registration
public class GlobalFiltersConvention : IFilterConvention
{
public void ApplyConvention(IFilterRegistration filterRegistration)
{
filterRegistration.WithFilter<AuthenticationFilter>(Apply
.ForArea<ContentAreaRegistration>()
.AndForArea<HiddenAreaRegistration>()
.AndForArea<MetadataAreaRegistration>()
.AndFor<HomeController>()
.AndFor<EditorController>()
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment