Beispiel #1
0
 protected AppServiceBaseTest(ITestOutputHelper outputHelper)
 {
     var host = GenericHost.CreateHostBuilder(null)
         .ConfigureLogging(builder => builder.AddXUnit(outputHelper))
         .Build();
     
     ServiceProvider = host.Services;
     OutputHelper = outputHelper;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            global::Gtk.Application.Init();

            var hostBuilder = GenericHost.CreateHostBuilder(args);

            hostBuilder.ConfigureServices(RegisterServices);

            using var host = hostBuilder.Build();
            host.Start();

            var app = host.Services.GetService <Startup>();

            app.Run();
        }
Beispiel #3
0
 static async Task Main(string[] args)
 {
     await GenericHost.CreateHostBuilder(args)
     .ConfigureServices(RegisterServices)
     .RunConsoleAsync();
 }