output-service-tsdb/Program.cs

25 lines
642 B
C#
Raw Normal View History

2020-04-08 00:30:58 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
2020-04-08 13:57:31 +02:00
using Microsoft.Extensions.DependencyInjection;
2020-04-08 00:30:58 +02:00
using Microsoft.Extensions.Hosting;
2020-04-08 02:04:22 +02:00
namespace OutputServiceTSDB
{
public class Program
2020-04-08 00:30:58 +02:00
{
2020-04-08 02:04:22 +02:00
public static void Main(string[] args)
2020-04-08 00:30:58 +02:00
{
2020-04-08 02:04:22 +02:00
CreateHostBuilder(args).Build().Run();
2020-04-08 00:55:43 +02:00
}
2020-04-08 02:04:22 +02:00
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
2020-04-08 13:57:31 +02:00
.ConfigureServices((hostContext, services) =>
2020-04-08 02:04:22 +02:00
{
2020-04-08 13:57:31 +02:00
services.AddHostedService<Worker>();
2020-04-08 02:04:22 +02:00
});
2020-04-08 00:30:58 +02:00
}
2020-04-08 13:57:31 +02:00
}