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);
        }
Example #2
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));
        }