You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Autofac.Extensions.DependencyInjection;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Serilog;
|
|
namespace ReadService
|
|
{
|
|
public class Program
|
|
{
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
var host = CreateHostBuilder(args).Build();
|
|
host.Run();
|
|
|
|
//ReadBusiness.ListenRead();
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// CreateHostBuilder
|
|
/// </summary>
|
|
/// <param name="args"></param>
|
|
/// <returns></returns>
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
Host.CreateDefaultBuilder(args)
|
|
.UseSerilog()
|
|
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
|
|
.ConfigureServices((hostContext, services) =>
|
|
{
|
|
//services.AddHostedService<ReadBusiness>();
|
|
})
|
|
.ConfigureWebHostDefaults(webBuilder =>
|
|
{
|
|
webBuilder.UseStartup<ConsoleApp.Startup>();
|
|
});
|
|
}
|
|
} |