-
-
Notifications
You must be signed in to change notification settings - Fork 322
Expand file tree
/
Copy pathServiceCollectionExt.cs
More file actions
42 lines (35 loc) · 1.74 KB
/
Copy pathServiceCollectionExt.cs
File metadata and controls
42 lines (35 loc) · 1.74 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
#nullable enable
using AgileConfig.Server.IService;
using AgileConfig.Server.Service.EventRegisterService;
using AgileConfig.Server.SyncPlugin;
using Microsoft.Extensions.DependencyInjection;
namespace AgileConfig.Server.Service;
public static class ServiceCollectionExt
{
public static void AddBusinessServices(this IServiceCollection sc)
{
sc.AddSingleton<IJwtService, JwtService>();
sc.AddScoped<ISystemInitializationService, SystemInitializationService>();
sc.AddScoped<IRemoteServerNodeProxy, RemoteServerNodeProxy>();
sc.AddScoped<IEventHandlerRegister, EventHandlerRegister>();
sc.AddScoped<IServiceHealthCheckService, ServiceHealthCheckService>();
sc.AddScoped<IServiceInfoService, ServiceInfoService>();
sc.AddScoped<IAppService, AppService>();
sc.AddScoped<IConfigService, ConfigService>();
sc.AddScoped<IServerNodeService, ServerNodeService>();
sc.AddScoped<ISettingService, SettingService>();
sc.AddScoped<ISysLogService, SysLogService>();
sc.AddScoped<IAppBasicAuthService, AppBasicAuthService>();
sc.AddScoped<IAdmBasicAuthService, AdmBasicAuthService>();
sc.AddScoped<IUserService, UserService>();
sc.AddScoped<IPermissionService, PermissionService>();
sc.AddScoped<IRoleService, RoleService>();
sc.AddScoped<IRegisterCenterService, RegisterCenterService>();
sc.AddScoped<ConfigStatusUpdateEventHandlersRegister>();
sc.AddScoped<ServiceInfoStatusUpdateEventHandlersRegister>();
sc.AddScoped<SystemEventHandlersRegister>();
// SyncPlugin services
sc.AddSyncPlugin();
sc.AddHostedService<AgileConfig.Server.SyncPlugin.BackgroundServices.SyncPluginInitializer>();
}
}