2025-04-17 20:28:50 +08:00
|
|
|
|
using JiShe.CollectBus.IoTDB.Context;
|
|
|
|
|
|
using JiShe.CollectBus.IoTDB.Options;
|
2025-04-17 13:35:08 +08:00
|
|
|
|
using Microsoft.Extensions.Configuration;
|
2025-04-07 16:44:25 +08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2025-04-02 14:06:40 +08:00
|
|
|
|
using Volo.Abp.Modularity;
|
|
|
|
|
|
|
2025-04-21 10:17:40 +08:00
|
|
|
|
namespace JiShe.CollectBus.IoTDB;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// CollectBusIoTDBModule
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class CollectBusIoTDbModule : AbpModule
|
2025-04-02 14:06:40 +08:00
|
|
|
|
{
|
2025-04-21 10:17:40 +08:00
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
2025-04-02 14:06:40 +08:00
|
|
|
|
{
|
2025-04-21 10:17:40 +08:00
|
|
|
|
var configuration = context.Services.GetConfiguration();
|
|
|
|
|
|
Configure<IoTDbOptions>(options => { configuration.GetSection(nameof(IoTDbOptions)).Bind(options); });
|
2025-04-07 16:44:25 +08:00
|
|
|
|
|
2025-04-21 10:17:40 +08:00
|
|
|
|
// 注册上下文为Scoped
|
|
|
|
|
|
context.Services.AddScoped<IoTDbRuntimeContext>();
|
2025-04-02 14:06:40 +08:00
|
|
|
|
}
|
2025-04-21 10:17:40 +08:00
|
|
|
|
}
|