summary refs log tree commit diff
path: root/testFrontend/SafeNSound.FakeUser/Program.cs
blob: 0852e6f2f4c09d7a1ad80a823153c8ec5386f4c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// See https://aka.ms/new-console-template for more information

using SafeNSound.FakeUser;
using SafeNSound.Sdk;

Console.WriteLine("Hello, World!");

var builder = Host.CreateApplicationBuilder(args);
// longer shutdown timeout
builder.Services.Configure<HostOptions>(options => {
    options.ShutdownTimeout = TimeSpan.FromSeconds(120);
});

builder.Services.AddSingleton<SafeNSoundConfiguration>();
builder.Services.AddSingleton<SafeNSoundAuthentication>();
builder.Services.AddSingleton<UserStore>();
builder.Services.AddHostedService<UserStore>(sp => sp.GetRequiredService<UserStore>());
builder.Services.AddHostedService<UserService>();
builder.Services.AddHostedService<MonitorService>();

// WrappedHttpClient.LogRequests = false;

var host = builder.Build();
host.Run();