From 083a28f7afc996ae996ea1ad4c5545082adc4922 Mon Sep 17 00:00:00 2001
From: ChenYi <296215406@outlook.com>
Date: Tue, 29 Apr 2025 09:14:58 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=BA=90=E7=A0=81=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E5=99=A8=E7=BB=93=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
JiShe.CollectBus.sln | 24 +++++++++----------
.../ComplexTypeSourceAnalyzers.cs | 4 ++--
.../ISourceAnalyzersProvider.cs | 10 ++++++++
.../JiShe.CollectBus.Analyzers.csproj | 2 +-
.../JiShe.CollectBus.IoTDB.csproj | 8 +++----
.../Model/TableModelSingleMeasuringEntity.cs | 2 +-
.../Model/TreeModelSingleMeasuringEntity.cs | 2 +-
.../Samples/SampleAppService.cs | 2 +-
.../Ammeters/ElectricityMeter.cs | 2 +-
.../Ammeters/ElectricityMeterTreeModel.cs | 2 +-
.../MeterReadingTelemetryPacketInfo.cs | 2 +-
.../JiShe.CollectBus.Domain.csproj | 16 ++++++-------
.../GenerateAccessorsAttribute.cs | 2 +-
.../JiShe.CollectBus.Analyzers.Shared.csproj} | 0
.../JiShe.CollectBus.Domain.Shared.csproj | 2 ++
15 files changed, 46 insertions(+), 34 deletions(-)
rename shared/JiShe.CollectBus.Analyzers/ComplexTypeSourceGenerator.cs => modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs (98%)
create mode 100644 modules/JiShe.CollectBus.Analyzers/ISourceAnalyzersProvider.cs
rename {shared => modules}/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj (86%)
rename shared/{JiShe.CollectBus.Analyzers.Attributes => JiShe.CollectBus.Analyzers.Shared}/GenerateAccessorsAttribute.cs (81%)
rename shared/{JiShe.CollectBus.Analyzers.Attributes/JiShe.CollectBus.Analyzers.Attributes.csproj => JiShe.CollectBus.Analyzers.Shared/JiShe.CollectBus.Analyzers.Shared.csproj} (100%)
diff --git a/JiShe.CollectBus.sln b/JiShe.CollectBus.sln
index 246eb6b..f02dd6e 100644
--- a/JiShe.CollectBus.sln
+++ b/JiShe.CollectBus.sln
@@ -62,9 +62,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C
readme.md = readme.md
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers.Attributes", "shared\JiShe.CollectBus.Analyzers.Attributes\JiShe.CollectBus.Analyzers.Attributes.csproj", "{D834B28F-E336-4E05-A5DD-DAF68E3342AA}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers.Shared", "shared\JiShe.CollectBus.Analyzers.Shared\JiShe.CollectBus.Analyzers.Shared.csproj", "{DD68F314-BC66-5601-B094-B1A7BE93F4E0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers", "shared\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj", "{00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Analyzers", "modules\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj", "{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -152,14 +152,14 @@ Global
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75B7D419-C261-577D-58D6-AA3ACED9129F}.Release|Any CPU.Build.0 = Release|Any CPU
- {D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D834B28F-E336-4E05-A5DD-DAF68E3342AA}.Release|Any CPU.Build.0 = Release|Any CPU
- {00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DD68F314-BC66-5601-B094-B1A7BE93F4E0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -185,8 +185,8 @@ Global
{8A61DF78-069B-40B5-8811-614E2960443E} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{E27377CC-E2D3-4237-060F-96EA214D3129} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{75B7D419-C261-577D-58D6-AA3ACED9129F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
- {D834B28F-E336-4E05-A5DD-DAF68E3342AA} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
- {00DF55EE-82CF-B5AA-F8C7-0E5B823FBC24} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
+ {DD68F314-BC66-5601-B094-B1A7BE93F4E0} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
+ {EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}
diff --git a/shared/JiShe.CollectBus.Analyzers/ComplexTypeSourceGenerator.cs b/modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs
similarity index 98%
rename from shared/JiShe.CollectBus.Analyzers/ComplexTypeSourceGenerator.cs
rename to modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs
index ee3a896..44ab9d5 100644
--- a/shared/JiShe.CollectBus.Analyzers/ComplexTypeSourceGenerator.cs
+++ b/modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs
@@ -11,9 +11,9 @@ namespace JiShe.CollectBus.IncrementalGenerator
/// 复杂类型源生成器
///
[Generator(LanguageNames.CSharp)]
- public class ComplexTypeSourceGenerator : IIncrementalGenerator
+ public class ComplexTypeSourceAnalyzers : IIncrementalGenerator
{
- private const string AttributeFullName = "JiShe.CollectBus.Analyzers.Attributes.GenerateAccessorsAttribute";
+ private const string AttributeFullName = "JiShe.CollectBus.Analyzers.Shared.GenerateAccessorsAttribute";
public void Initialize(IncrementalGeneratorInitializationContext context)
{
diff --git a/modules/JiShe.CollectBus.Analyzers/ISourceAnalyzersProvider.cs b/modules/JiShe.CollectBus.Analyzers/ISourceAnalyzersProvider.cs
new file mode 100644
index 0000000..ed2ce4e
--- /dev/null
+++ b/modules/JiShe.CollectBus.Analyzers/ISourceAnalyzersProvider.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace JiShe.CollectBus.Analyzers
+{
+ internal class ISourceAnalyzersProvider
+ {
+ }
+}
diff --git a/shared/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj b/modules/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
similarity index 86%
rename from shared/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
rename to modules/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
index 2ce4399..7e7fab1 100644
--- a/shared/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
+++ b/modules/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
@@ -16,6 +16,6 @@
-
+
diff --git a/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj b/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj
index d8e8b6f..3911399 100644
--- a/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj
+++ b/modules/JiShe.CollectBus.IoTDB/JiShe.CollectBus.IoTDB.csproj
@@ -10,11 +10,11 @@
-
-
-
-
+
+
+
diff --git a/modules/JiShe.CollectBus.IoTDB/Model/TableModelSingleMeasuringEntity.cs b/modules/JiShe.CollectBus.IoTDB/Model/TableModelSingleMeasuringEntity.cs
index 8f04e08..ed3824d 100644
--- a/modules/JiShe.CollectBus.IoTDB/Model/TableModelSingleMeasuringEntity.cs
+++ b/modules/JiShe.CollectBus.IoTDB/Model/TableModelSingleMeasuringEntity.cs
@@ -1,4 +1,4 @@
-using JiShe.CollectBus.Analyzers.Attributes;
+using JiShe.CollectBus.Analyzers.Shared;
using JiShe.CollectBus.IoTDB.Attribute;
using JiShe.CollectBus.IoTDB.Enums;
diff --git a/modules/JiShe.CollectBus.IoTDB/Model/TreeModelSingleMeasuringEntity.cs b/modules/JiShe.CollectBus.IoTDB/Model/TreeModelSingleMeasuringEntity.cs
index dbf239b..c6b1418 100644
--- a/modules/JiShe.CollectBus.IoTDB/Model/TreeModelSingleMeasuringEntity.cs
+++ b/modules/JiShe.CollectBus.IoTDB/Model/TreeModelSingleMeasuringEntity.cs
@@ -1,4 +1,4 @@
-using JiShe.CollectBus.Analyzers.Attributes;
+using JiShe.CollectBus.Analyzers.Shared;
using JiShe.CollectBus.IoTDB.Attribute;
using JiShe.CollectBus.IoTDB.Enums;
diff --git a/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs b/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs
index a3c4cd4..ea2415e 100644
--- a/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs
+++ b/services/JiShe.CollectBus.Application/Samples/SampleAppService.cs
@@ -66,7 +66,7 @@ public class SampleAppService : CollectBusAppService, ISampleAppService, IKafkaS
IssuedMessageHexString = "messageHexString",
Timestamps = testTime// DateTimeOffset.UtcNow.ToUnixTimeNanoseconds()//testTime.GetDateTimeOffset().ToUnixTimeNanoseconds(),
};
- //ElectricityMeterExtension.get
+ //ElectricityMeterTreeModelExtension.GetCurrent()
await _iotDBProvider.InsertAsync(meter);
}
diff --git a/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeter.cs b/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeter.cs
index 2f298dd..db833f6 100644
--- a/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeter.cs
+++ b/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeter.cs
@@ -1,4 +1,4 @@
-using JiShe.CollectBus.Analyzers.Attributes;
+using JiShe.CollectBus.Analyzers.Shared;
using JiShe.CollectBus.IoTDB.Attribute;
using JiShe.CollectBus.IoTDB.Enums;
using JiShe.CollectBus.IoTDB.Model;
diff --git a/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeterTreeModel.cs b/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeterTreeModel.cs
index 59d060f..f02fcb1 100644
--- a/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeterTreeModel.cs
+++ b/services/JiShe.CollectBus.Domain/Ammeters/ElectricityMeterTreeModel.cs
@@ -1,4 +1,4 @@
-using JiShe.CollectBus.Analyzers.Attributes;
+using JiShe.CollectBus.Analyzers.Shared;
using JiShe.CollectBus.IoTDB.Attribute;
using JiShe.CollectBus.IoTDB.Enums;
using JiShe.CollectBus.IoTDB.Model;
diff --git a/services/JiShe.CollectBus.Domain/IotSystems/MeterReadingRecords/MeterReadingTelemetryPacketInfo.cs b/services/JiShe.CollectBus.Domain/IotSystems/MeterReadingRecords/MeterReadingTelemetryPacketInfo.cs
index 8829abd..f0c1721 100644
--- a/services/JiShe.CollectBus.Domain/IotSystems/MeterReadingRecords/MeterReadingTelemetryPacketInfo.cs
+++ b/services/JiShe.CollectBus.Domain/IotSystems/MeterReadingRecords/MeterReadingTelemetryPacketInfo.cs
@@ -1,4 +1,4 @@
-using JiShe.CollectBus.Analyzers.Attributes;
+using JiShe.CollectBus.Analyzers.Shared;
using JiShe.CollectBus.IoTDB.Attribute;
using JiShe.CollectBus.IoTDB.Enums;
using JiShe.CollectBus.IoTDB.Model;
diff --git a/services/JiShe.CollectBus.Domain/JiShe.CollectBus.Domain.csproj b/services/JiShe.CollectBus.Domain/JiShe.CollectBus.Domain.csproj
index 424d07c..f8880ec 100644
--- a/services/JiShe.CollectBus.Domain/JiShe.CollectBus.Domain.csproj
+++ b/services/JiShe.CollectBus.Domain/JiShe.CollectBus.Domain.csproj
@@ -1,6 +1,8 @@
-
-
+
+
+
+
net8.0
enable
JiShe.CollectBus
@@ -20,14 +22,12 @@
-
+
+
-
-
-
-
-
+
diff --git a/shared/JiShe.CollectBus.Analyzers.Attributes/GenerateAccessorsAttribute.cs b/shared/JiShe.CollectBus.Analyzers.Shared/GenerateAccessorsAttribute.cs
similarity index 81%
rename from shared/JiShe.CollectBus.Analyzers.Attributes/GenerateAccessorsAttribute.cs
rename to shared/JiShe.CollectBus.Analyzers.Shared/GenerateAccessorsAttribute.cs
index f2c9270..10b5d79 100644
--- a/shared/JiShe.CollectBus.Analyzers.Attributes/GenerateAccessorsAttribute.cs
+++ b/shared/JiShe.CollectBus.Analyzers.Shared/GenerateAccessorsAttribute.cs
@@ -1,6 +1,6 @@
using System;
-namespace JiShe.CollectBus.Analyzers.Attributes
+namespace JiShe.CollectBus.Analyzers.Shared
{
///
/// 标记需要生成源码的类
diff --git a/shared/JiShe.CollectBus.Analyzers.Attributes/JiShe.CollectBus.Analyzers.Attributes.csproj b/shared/JiShe.CollectBus.Analyzers.Shared/JiShe.CollectBus.Analyzers.Shared.csproj
similarity index 100%
rename from shared/JiShe.CollectBus.Analyzers.Attributes/JiShe.CollectBus.Analyzers.Attributes.csproj
rename to shared/JiShe.CollectBus.Analyzers.Shared/JiShe.CollectBus.Analyzers.Shared.csproj
diff --git a/shared/JiShe.CollectBus.Domain.Shared/JiShe.CollectBus.Domain.Shared.csproj b/shared/JiShe.CollectBus.Domain.Shared/JiShe.CollectBus.Domain.Shared.csproj
index d513989..5453712 100644
--- a/shared/JiShe.CollectBus.Domain.Shared/JiShe.CollectBus.Domain.Shared.csproj
+++ b/shared/JiShe.CollectBus.Domain.Shared/JiShe.CollectBus.Domain.Shared.csproj
@@ -1,5 +1,7 @@
+
+
net8.0
enable