Exemplo n.º 1
0
        public override void Initialize(NfsTestCase testCase)
        {
            StdTestCase stdTestCase = (StdTestCase)testCase;

            LogBootstrapper.Bootstrap();
            stdTestCase.LoggerSetter = LoggerSetter;
        }
Exemplo n.º 2
0
        public void TestBootstrap()
        {
            LogBootstrapper bootstrapper = BootstrapperFactory.NewLogBootstrapper();

            Assert.IsFalse(bootstrapper.IsDone);
            bootstrapper.Bootstrap();
            Assert.IsTrue(bootstrapper.IsDone);
        }
Exemplo n.º 3
0
        public static int Main(string[] args)
        {
            try
            {
                Console.WriteLine("Bootstrapping...");
                ConfigurationBootstrapper.Bootstrap(args, out var configuration, out var appSettingsRoot);
                LogBootstrapper.Bootstrap(appSettingsRoot.Application, appSettingsRoot.Logging);
                WebHostBootstrapper.Bootstrap <Startup>(configuration, out var webHost);

                Log.Debug("Starting web host");
                webHost.Run();
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "A fatal exception occurred.");
                return(1);
            }
            finally
            {
                Log.CloseAndFlush();
            }

            return(0);
        }