public TestServiceContext()
 {
     AppLifetime            = new LifetimeNotImplemented();
     Log                    = new TestKestrelTrace();
     ThreadPool             = new LoggingThreadPool(Log);
     DateHeaderValueManager = new TestDateHeaderValueManager();
 }
 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);
        }
Пример #4
0
        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));
        }