12345678910111213141516171819202122 |
- using Microsoft.Extensions.DependencyInjection;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace XYY.PerformanceCount.Standard
- {
- public static class PerformanceDBRegion
- {
- /// <summary>
- /// 计数器数据服务ES实现
- /// 该服务依赖框架 AspectCore.Extensions.DependencyInjection
- /// 启动项添加配置: UseServiceProviderFactory(x => new DynamicProxyServiceProviderFactory())
- /// </summary>
- /// <param name="services"></param>
- /// <param name="connection"></param>
- public static void AddPerformanceESDB(this IServiceCollection services, string connection)
- {
- services.AddSingleton<IPerformanceDB>(x => new ESPerformanceDB(connection));
- }
- }
- }
|