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