private static KestrelServer CreateServer(KestrelServerOptions options)
        {
            var lifetime = new LifetimeNotImplemented();
            var logger   = new LoggerFactory();

            return(new KestrelServer(Options.Create(options), lifetime, logger));
        }
 public TestServiceContext()
 {
     AppLifetime            = new LifetimeNotImplemented();
     Log                    = new TestKestrelTrace();
     ThreadPool             = new LoggingThreadPool(Log);
     DateHeaderValueManager = new DateHeaderValueManager(systemClock: new MockSystemClock());
     DateHeaderValue        = DateHeaderValueManager.GetDateHeaderValues().String;
     ServerOptions          = new KestrelServerOptions {
         AddServerHeader = false
     };
     ServerOptions.ShutdownTimeout = TimeSpan.FromSeconds(5);
 }
Ejemplo n.º 3
0
        public TestServiceContext()
        {
            AppLifetime            = new LifetimeNotImplemented();
            Log                    = new TestKestrelTrace();
            ThreadPool             = new LoggingThreadPool(Log);
            DateHeaderValueManager = new TestDateHeaderValueManager();

            ServerOptions = new KestrelServerOptions();
            ServerOptions.ShutdownTimeout = TimeSpan.FromSeconds(5);

            HttpComponentFactory = new HttpComponentFactory(ServerOptions);
        }