Skip to content

Instantly share code, notes, and snippets.

@yishaigalatzer
Created June 9, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yishaigalatzer/002fcdbe57309704af0d to your computer and use it in GitHub Desktop.
Save yishaigalatzer/002fcdbe57309704af0d to your computer and use it in GitHub Desktop.
The reason the filters are still in attributes is for back compat, so code doesn't have to be rewritten from existing MVC 5 applications. The mechanism to have the filter in another class is there, by using a FilterProvider introspect the IFilter and pick whatever implementation it wants. Also note that IFilter can also be just metadata to other filters. Every filter can see the rest of the pipeline and use it for picking up metadata or making bypass decisions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment