using JiShe.CollectBus.IoTDBProvider.Context; using JiShe.CollectBus.IoTDBProvider.Interface; using JiShe.CollectBus.IoTDBProvider.Provider; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Volo.Abp.Modularity; using static Thrift.Server.TThreadPoolAsyncServer; namespace JiShe.CollectBus.IoTDBProvider { public class CollectBusIoTDBModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); Configure(options => { configuration.GetSection(nameof(IoTDBOptions)).Bind(options); }); // 注册上下文为Scoped context.Services.AddScoped(); // 注册Session工厂 context.Services.AddSingleton(); // 注册Provider context.Services.AddScoped(); } } }