/// <summary> /// Instantiate the object using default settings and the specified default route. /// </summary> public WatsonWebserverRoutes(WatsonWebserverSettings settings, Func <HttpContext, Task> defaultRoute) { if (settings == null) { settings = new WatsonWebserverSettings(); } if (defaultRoute == null) { throw new ArgumentNullException(nameof(defaultRoute)); } _Settings = settings; _Preflight = PreflightInternal; _Default = defaultRoute; _ContentHandler = new ContentRouteHandler(_Content); }
/// <summary> /// Instantiate the object using default settings. /// </summary> public WatsonWebserverRoutes() { _Preflight = PreflightInternal; _ContentHandler = new ContentRouteHandler(_Content); }