20 lines
500 B
C#
20 lines
500 B
C#
using WinLog;
|
|
|
|
internal class Program
|
|
{
|
|
|
|
private static async Task Main(string[] args)
|
|
{
|
|
IHost host = Host.CreateDefaultBuilder(args)
|
|
.ConfigureServices((hostContext, services) =>
|
|
{
|
|
_ = services.AddSingleton(WinLog.Models.Binder.AppSettings.Get(hostContext.Configuration));
|
|
_ = services.AddHostedService<Worker>();
|
|
})
|
|
.UseWindowsService()
|
|
.Build();
|
|
|
|
await host.RunAsync();
|
|
}
|
|
|
|
} |