-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathProgram.cs
29 lines (26 loc) · 865 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Hosting
{
public class Program
{
public static void Main()
{
var host = CreateHostBuilder().Build();
host.Run();
}
public static IHostBuilder CreateHostBuilder() =>
Host.CreateDefaultBuilder()
.ConfigureServices(services =>
{
services.AddSingleton(typeof(BackgroundQueue));
services.AddHostedService(typeof(SensorService));
services.AddHostedService(typeof(DisplayService));
services.AddHostedService(typeof(MonitorService));
});
}
}