Squirrowse/Squirrowse.Client/Program.cs

27 lines
787 B
C#
Raw Normal View History

2019-10-31 13:08:42 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
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
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
services.AddTransient<IConnectionManager, ConnectionManager>();//keep as transient for now
2019-10-31 13:08:42 +01:00
});
2019-10-31 10:23:07 +01:00
}
}