Beispiel #1
0
        /// <summary>
        /// Instantiate the object using default settings and the specified default route.
        /// </summary>
        public WebserverRoutes(Func <HttpContext, Task> defaultRoute)
        {
            if (defaultRoute == null)
            {
                throw new ArgumentNullException(nameof(defaultRoute));
            }

            _Preflight      = PreflightInternal;
            _Default        = defaultRoute;
            _ContentHandler = new ContentRouteHandler(_Content);
        }
Beispiel #2
0
 /// <summary>
 /// Instantiate the object using default settings.
 /// </summary>
 public WebserverRoutes()
 {
     _Preflight      = PreflightInternal;
     _ContentHandler = new ContentRouteHandler(_Content);
 }