Last active
August 29, 2015 14:03
-
-
Save damianh/4b6e3e65250494197ca6 to your computer and use it in GitHub Desktop.
Static middleware template
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
| using AppFunc = Func<IDictionary<string, object>, Task>; | |
| using MidFunc = Func< | |
| Func<IDictionary<string, object>, Task>, | |
| Func<IDictionary<string, object>, Task> | |
| >; | |
| public static class MyMiddleware | |
| { | |
| public static MidFunc UseMyMiddleware() | |
| { | |
| return | |
| next => | |
| env => | |
| { | |
| //before | |
| await next(env); | |
| //after | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment