コード例 #1
0
 public static IMiddleware UseNotFound(this IMiddleware host, string root, string errorPage)
 {
     return(host.InsertMiddleware(new NotFoundMiddleware(root, errorPage)));
 }
コード例 #2
0
 public static IMiddleware UseMvc(this IMiddleware host, string viewroot, ServiceGroup services, bool checkPathCase = false)
 {
     return(host.InsertMiddleware(new MvcMiddleware(viewroot, services, checkPathCase)));
 }
コード例 #3
0
 public static IMiddleware UseRoute(this IMiddleware host, string sourcePath, string controllerName, string actionName)
 {
     return(host.InsertMiddleware(new RouteMiddleware(sourcePath, controllerName, actionName)));
 }
コード例 #4
0
 public static IMiddleware UseStaticFile(this IMiddleware host, string rootPath)
 {
     return(host.InsertMiddleware(new StaticFileMiddleware(rootPath)));
 }
コード例 #5
0
 public static IMiddleware UseDefaultFile(this IMiddleware host, string location, string pathMatch, string fileName = "index.html")
 {
     return(host.InsertMiddleware(new DefaultFileMiddleware(location, pathMatch, fileName)));
 }
コード例 #6
0
 public static IMiddleware UseHeaders(this IMiddleware host, string serverName = "Genji", bool keepAlive = true)
 {
     return(host.InsertMiddleware(new HeadersMiddleware(serverName, keepAlive)));
 }