public TestServiceContext() { AppLifetime = new LifetimeNotImplemented(); Log = new TestKestrelTrace(); ThreadPool = new LoggingThreadPool(Log); DateHeaderValueManager = new TestDateHeaderValueManager(); }
private static KestrelServer CreateServer(Func<IConfiguration, IKestrelServerInformation> serverInformationFactory) { var configuration = new ConfigurationBuilder().Build(); var information = serverInformationFactory(configuration); var features = new FeatureCollection(); features.Set(information); var lifetime = new LifetimeNotImplemented(); var logger = new TestKestrelTrace.TestLogger(); return new KestrelServer(features, lifetime, logger); }
private static KestrelServer CreateServer(Func <IConfiguration, IKestrelServerInformation> serverInformationFactory) { var configuration = new ConfigurationBuilder().Build(); var information = serverInformationFactory(configuration); var features = new FeatureCollection(); features.Set(information); var lifetime = new LifetimeNotImplemented(); var logger = new TestKestrelTrace.TestLogger(); return(new KestrelServer(features, lifetime, logger)); }