Services+Worker
This commit is contained in:
@@ -1,23 +1,18 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.AIHIT.Settings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PARR.AIHIT
|
||||
{
|
||||
public class SyncherInstaller
|
||||
public static class SyncherInstaller
|
||||
{
|
||||
public void InstallerServices(IServiceCollection services, IConfiguration configuration)
|
||||
public static void InstallerSyncerServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
var syncherSettings = new SyncherSettings();
|
||||
configuration.GetSection(nameof(SyncherSettings)).Bind(syncherSettings);
|
||||
services.AddSingleton(syncherSettings);
|
||||
|
||||
services.AddTransient<Syncher>();
|
||||
services.AddTransient<ISyncher, Syncher>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user