diff --git a/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj b/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj index 7c368f2..ffc28b2 100644 --- a/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj +++ b/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj @@ -3,7 +3,10 @@ net9.0 enable - enable + enable + 1.0.1 + 1.0.1 + 1.0.1 diff --git a/modules/JiShe.CollectBus.IoTDB/Options/QueryCondition.cs b/modules/JiShe.CollectBus.IoTDB/Options/QueryCondition.cs index bccf017..e754833 100644 --- a/modules/JiShe.CollectBus.IoTDB/Options/QueryCondition.cs +++ b/modules/JiShe.CollectBus.IoTDB/Options/QueryCondition.cs @@ -1,5 +1,4 @@ -using JiShe.CollectBus.Common.Extensions; -using JiShe.CollectBus.Common.Helpers; + namespace JiShe.CollectBus.IoTDB.Options { diff --git a/modules/JiShe.CollectBus.IoTDB/SourceEntityAccessorFactory3.cs b/modules/JiShe.CollectBus.IoTDB/SourceEntityAccessorFactory3.cs deleted file mode 100644 index 4712b67..0000000 --- a/modules/JiShe.CollectBus.IoTDB/SourceEntityAccessorFactory3.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Reflection; - -namespace JiShe.CollectBus.Analyzers.Shared; - -public static class SourceEntityAccessorFactory3 -{ - private static readonly ConcurrentDictionary _accessors = new(); - - public static ISourceEntityAccessor GetAccessor() - { - return (ISourceEntityAccessor)_accessors.GetOrAdd(typeof(T), t => - { - // 获取泛型类型定义信息(如果是泛型类型) - var isGeneric = t.IsGenericType; - var genericTypeDef = isGeneric ? t.GetGenericTypeDefinition() : null; - var arity = isGeneric ? genericTypeDef!.GetGenericArguments().Length : 0; - - // 构建访问器类名 - var typeName = isGeneric - ? $"{t.Namespace}.{genericTypeDef!.Name.Split('`')[0]}Accessor`{arity}" - : $"{t.Namespace}.{t.Name}Accessor"; - - // 尝试从当前程序集加载 - var accessorType = Assembly.GetAssembly(t)!.GetType(typeName) - ?? throw new InvalidOperationException($"Accessor type {typeName} not found"); - - // 处理泛型参数 - if (isGeneric && accessorType.IsGenericTypeDefinition) - { - accessorType = accessorType.MakeGenericType(t.GetGenericArguments()); - } - - return Activator.CreateInstance(accessorType)!; - }); - } - - public static object GetAccessor(Type type) - { - MethodInfo getAccessorMethod = typeof(SourceEntityAccessorFactory) - .GetMethod( - name: nameof(GetAccessor), - bindingAttr: BindingFlags.Public | BindingFlags.Static, - - types: Type.EmptyTypes - ); - - MethodInfo genericMethod = getAccessorMethod.MakeGenericMethod(type); - return genericMethod.Invoke(null, null); - } -} \ No newline at end of file diff --git a/modules/JiShe.CollectBus.Kafka/JiShe.CollectBus.Kafka.csproj b/modules/JiShe.CollectBus.Kafka/JiShe.CollectBus.Kafka.csproj index b955229..bb19ed0 100644 --- a/modules/JiShe.CollectBus.Kafka/JiShe.CollectBus.Kafka.csproj +++ b/modules/JiShe.CollectBus.Kafka/JiShe.CollectBus.Kafka.csproj @@ -4,6 +4,9 @@ net9.0 enable enable + 1.0.1 + 1.0.1 + 1.0.1 diff --git a/shared/JiShe.CollectBus.Analyzers.Shared/SourceEntityAccessorFactory2.cs b/shared/JiShe.CollectBus.Analyzers.Shared/SourceEntityAccessorFactory2.cs deleted file mode 100644 index 5f28270..0000000 --- a/shared/JiShe.CollectBus.Analyzers.Shared/SourceEntityAccessorFactory2.cs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file