Пример #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)));
 }