Пример #1
0
 public static void BuildSample(IAppBuilder app)
 {
     // add eventsource middleware
     app.RouteHeader("User-Agent", "userAgent");
     // pass static member as delegate
     app.RouteGet(new WriteHeaderFunc(WriteUserAgent), "/", "");
 }
Пример #2
0
 public static void BuildSample(IAppBuilder app)
 {
     // extract user agent header
     app.RouteHeader("User-Agent", "userAgent");
     app.Run(ctx => WriteUserAgent(ctx));
 }