2019-10-31 13:08:42 +01:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.Hosting;
|
2019-10-31 17:00:52 +01:00
|
|
|
using Squirrowse.Client.Service;
|
2019-10-31 10:23:07 +01:00
|
|
|
|
|
|
|
namespace Squirrowse.Client
|
|
|
|
{
|
2019-10-31 13:08:42 +01:00
|
|
|
public class Program
|
2019-10-31 10:23:07 +01:00
|
|
|
{
|
2019-10-31 13:08:42 +01:00
|
|
|
public static void Main(string[] args)
|
2019-10-31 10:23:07 +01:00
|
|
|
{
|
2019-10-31 13:08:42 +01:00
|
|
|
CreateHostBuilder(args).Build().Run();
|
2019-10-31 10:23:07 +01:00
|
|
|
}
|
2019-10-31 13:08:42 +01:00
|
|
|
|
2019-11-04 09:29:37 +01:00
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args)
|
|
|
|
{
|
|
|
|
return Host.CreateDefaultBuilder(args)
|
2019-10-31 13:08:42 +01:00
|
|
|
.ConfigureServices((hostContext, services) =>
|
|
|
|
{
|
|
|
|
services.AddHostedService<Worker>();
|
2019-11-04 09:29:37 +01:00
|
|
|
services.AddTransient<IConnectionManager, ConnectionManager>(); //keep as transient for now
|
2019-10-31 13:08:42 +01:00
|
|
|
});
|
2019-11-04 09:29:37 +01:00
|
|
|
}
|
2019-10-31 10:23:07 +01:00
|
|
|
}
|
2019-11-04 09:29:37 +01:00
|
|
|
}
|