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, "/", ""); }
public static void BuildSample(IAppBuilder app) { // add eventsource middleware app.RouteHeader("User-Agent", "userAgent"); // pass static member as delegate app.RouteGet(new WriteHeaderFunc(WriteUserAgent), "/", ""); }