using JiShe.CollectBus.IoTDB.Options; using Microsoft.Extensions.Options; namespace JiShe.CollectBus.IoTDB.Context { /// /// IoTDB SessionPool 运行时上下文 /// public class IoTDBRuntimeContext { private readonly bool _defaultValue; public IoTDBRuntimeContext(IOptions options) { _defaultValue = options.Value.UseTableSessionPoolByDefault; UseTableSessionPool = _defaultValue; } /// /// 是否使用表模型存储, 默认false,使用tree模型存储 /// public bool UseTableSessionPool { get; set; } /// /// 重置为默认值 /// public void ResetToDefault() { UseTableSessionPool = _defaultValue; } } }