示例#1
0
 public static void BuildSample(IAppBuilder app)
 {
     // extract queryParameter from URL.  Default to null  (zero for int)
     app.RouteQuery("queryParameter", null);
     // args of delegate will be matched and converted
     app.RouteGet(writeParam, "/", "");
 }
示例#2
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), "/", "");
 }