protected Route(IReadOnlyCollection <string> parts, Method method, IPersister persister, interfaces.Logging.ILogger logger) { // make sure that the parts are 'clean' _parts = CleanParts(parts); // we then need to get the parameters _parameters = GetParameterNames(parts); // save the method as well. _method = method; // set the persister. Persister = persister ?? throw new ArgumentNullException(nameof(persister)); // set the logger Logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public HttpServer(IWebServer webServer, IPersister persister, interfaces.Logging.ILogger logger) { if (!HttpListener.IsSupported) { throw new NotSupportedException("The Http Listener is not supported."); } // save our persister _persister = persister ?? throw new ArgumentNullException(nameof(persister)); // the webserver config _webServer = webServer ?? throw new ArgumentNullException(nameof(webServer)); // the logger _logger = logger ?? throw new ArgumentNullException(nameof(logger)); // create our listener. _listener = new HttpListener(); }
protected RouteFile(string script, string contentType, IPersister persister, interfaces.Logging.ILogger logger) : base(new[] { script }, Method.Get, persister, logger) { _resourceName = $"myoddweb.desktopsearch.http.Resources.{script}"; ContentType = contentType; }
public TransactionPerformanceCounter(IPerformance performance, string counterName, interfaces.Logging.ILogger logger) : base(performance.CategoryName, performance.CategoryHelp, counterName, helper.Performance.Type.CountPerSeconds, logger) { }
/// <summary> /// This is the search route /// The method is 'search' while the value is the query. /// </summary> public Search(IPersister persister, interfaces.Logging.ILogger logger) : base(new[] { "Search" }, Method.Post, persister, logger) { }
public StyleSheet(string script, IPersister persister, interfaces.Logging.ILogger logger) : base(script, "text/css", persister, logger) { }
public Javascript(string script, IPersister persister, interfaces.Logging.ILogger logger) : base(script, "application/javascript", persister, logger) { }
/// <summary> /// This is the search route /// The method is 'search' while the value is the query. /// </summary> public Home(IPersister persister, interfaces.Logging.ILogger logger) : base(new string [0], Method.Get, persister, logger) { }