diff --git a/Directory.Build.JiShe.targets b/Directory.Build.JiShe.targets
new file mode 100644
index 0000000..c4b9ff0
--- /dev/null
+++ b/Directory.Build.JiShe.targets
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Directory.Build.Microsoft.targets b/Directory.Build.Microsoft.targets
new file mode 100644
index 0000000..9e2203b
--- /dev/null
+++ b/Directory.Build.Microsoft.targets
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Directory.Build.Volo.targets b/Directory.Build.Volo.targets
new file mode 100644
index 0000000..17d91a7
--- /dev/null
+++ b/Directory.Build.Volo.targets
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..64df1da
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,12 @@
+
+
+
+
+ 1.0.5.08
+
+ 9.1.1
+
+
+ 9.0.0
+
+
\ No newline at end of file
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 0000000..4333da3
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+ latest
+ 1.0.1
+ JiShe Service Pro
+ $(NoWarn);CS1591;CS0436;NU1504
+ app
+ true
+ 湖南集社电子技术有限公司
+ true
+ icon.png
+ bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 8030845..95839ff 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,17 +1,21 @@
-FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 8080
EXPOSE 10500
ENV TZ=Asia/Shanghai
ENV ASPNETCORE_ENVIRONMENT=Production
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
# WORKDIR /src
COPY ["JiShe.CollectBus.Main.sln", "."]
COPY ["common.props", "."]
+COPY ["Directory.Build.JiShe.targets", "."]
+COPY ["Directory.Build.Microsoft.targets", "."]
+COPY ["Directory.Build.props", "."]
+COPY ["Directory.Build.targets", "."]
+COPY ["Directory.Build.Volo.targets", "."]
COPY ["NuGet.Config", "."]
COPY ["web/", "web/"]
-COPY ["modules/", "modules/"]
COPY ["services/", "services/"]
COPY ["shared/", "shared/"]
COPY ["protocols/", "protocols/"]
diff --git a/JiShe.CollectBus.Main.sln b/JiShe.CollectBus.Main.sln
index 46d2db3..3fa5f95 100644
--- a/JiShe.CollectBus.Main.sln
+++ b/JiShe.CollectBus.Main.sln
@@ -11,8 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Applicatio
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Application", "services\JiShe.CollectBus.Application\JiShe.CollectBus.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.MongoDB", "modules\JiShe.CollectBus.MongoDB\JiShe.CollectBus.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.HttpApi", "web\JiShe.CollectBus.HttpApi\JiShe.CollectBus.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Host", "web\JiShe.CollectBus.Host\JiShe.CollectBus.Host.csproj", "{35829A15-4127-4F69-8BDE-9405DEAACA9A}"
@@ -21,23 +19,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Common", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.DbMigrator", "services\JiShe.CollectBus.DbMigrator\JiShe.CollectBus.DbMigrator.csproj", "{8BA01C3D-297D-42DF-BD63-EF07202A0A67}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.FreeSql", "modules\JiShe.CollectBus.FreeSql\JiShe.CollectBus.FreeSql.csproj", "{FE0457D9-4038-4A17-8808-DCAD06CFC0A0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.FreeRedis", "modules\JiShe.CollectBus.FreeRedis\JiShe.CollectBus.FreeRedis.csproj", "{C06C4082-638F-2996-5FED-7784475766C1}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Kafka", "modules\JiShe.CollectBus.Kafka\JiShe.CollectBus.Kafka.csproj", "{F0288175-F0EC-48BD-945F-CF1512850943}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.IoTDB", "modules\JiShe.CollectBus.IoTDB\JiShe.CollectBus.IoTDB.csproj", "{A3F3C092-0A25-450B-BF6A-5983163CBEF5}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Protocol.Test", "protocols\JiShe.CollectBus.Protocol.Test\JiShe.CollectBus.Protocol.Test.csproj", "{A377955E-7EA1-6F29-8CF7-774569E93925}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Cassandra", "modules\JiShe.CollectBus.Cassandra\JiShe.CollectBus.Cassandra.csproj", "{443B4549-0AC0-4493-8F3E-49C83225DD76}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1.Web", "1.Web", "{A02F7D8A-04DC-44D6-94D4-3F65712D6B94}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.Modules", "4.Modules", "{2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "5.Protocols", "5.Protocols", "{3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.Protocols", "4.Protocols", "{3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.Services", "2.Services", "{BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}"
EndProject
@@ -54,6 +40,11 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C4C-55B8-43E8-A6B8-E59D56FE6D92}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
+ Directory.Build.JiShe.targets = Directory.Build.JiShe.targets
+ Directory.Build.Microsoft.targets = Directory.Build.Microsoft.targets
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ Directory.Build.Volo.targets = Directory.Build.Volo.targets
Dockerfile = Dockerfile
NuGet.Config = NuGet.Config
PackageAndPublish.bat = PackageAndPublish.bat
@@ -61,10 +52,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C
Temp.Dockerfile = Temp.Dockerfile
EndProjectSection
EndProject
-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", "modules\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj", "{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -87,10 +74,6 @@ Global
{78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -107,30 +90,10 @@ Global
{8BA01C3D-297D-42DF-BD63-EF07202A0A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BA01C3D-297D-42DF-BD63-EF07202A0A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BA01C3D-297D-42DF-BD63-EF07202A0A67}.Release|Any CPU.Build.0 = Release|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Release|Any CPU.Build.0 = Release|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Release|Any CPU.Build.0 = Release|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Release|Any CPU.Build.0 = Release|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Release|Any CPU.Build.0 = Release|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Release|Any CPU.Build.0 = Release|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Release|Any CPU.Build.0 = Release|Any CPU
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -147,14 +110,6 @@ 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
- {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
@@ -164,23 +119,15 @@ Global
{F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
{BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
{78040F9E-3501-4A40-82DF-00A597710F35} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {F1C58097-4C08-4D88-8976-6B3389391481} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
{077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
{35829A15-4127-4F69-8BDE-9405DEAACA9A} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
{AD2F1928-4411-4511-B564-5FB996EC08B9} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
{8BA01C3D-297D-42DF-BD63-EF07202A0A67} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {C06C4082-638F-2996-5FED-7784475766C1} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {F0288175-F0EC-48BD-945F-CF1512850943} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
{A377955E-7EA1-6F29-8CF7-774569E93925} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
- {443B4549-0AC0-4493-8F3E-49C83225DD76} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{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}
- {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/JiShe.CollectBus.sln b/JiShe.CollectBus.sln
index c32791b..ffc3d0d 100644
--- a/JiShe.CollectBus.sln
+++ b/JiShe.CollectBus.sln
@@ -11,8 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Applicatio
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Application", "services\JiShe.CollectBus.Application\JiShe.CollectBus.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.MongoDB", "modules\JiShe.CollectBus.MongoDB\JiShe.CollectBus.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.HttpApi", "web\JiShe.CollectBus.HttpApi\JiShe.CollectBus.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Host", "web\JiShe.CollectBus.Host\JiShe.CollectBus.Host.csproj", "{35829A15-4127-4F69-8BDE-9405DEAACA9A}"
@@ -21,30 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Common", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.DbMigrator", "services\JiShe.CollectBus.DbMigrator\JiShe.CollectBus.DbMigrator.csproj", "{8BA01C3D-297D-42DF-BD63-EF07202A0A67}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.FreeSql", "modules\JiShe.CollectBus.FreeSql\JiShe.CollectBus.FreeSql.csproj", "{FE0457D9-4038-4A17-8808-DCAD06CFC0A0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.FreeRedis", "modules\JiShe.CollectBus.FreeRedis\JiShe.CollectBus.FreeRedis.csproj", "{C06C4082-638F-2996-5FED-7784475766C1}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Kafka", "modules\JiShe.CollectBus.Kafka\JiShe.CollectBus.Kafka.csproj", "{F0288175-F0EC-48BD-945F-CF1512850943}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.IoTDB", "modules\JiShe.CollectBus.IoTDB\JiShe.CollectBus.IoTDB.csproj", "{A3F3C092-0A25-450B-BF6A-5983163CBEF5}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Protocol.Test", "protocols\JiShe.CollectBus.Protocol.Test\JiShe.CollectBus.Protocol.Test.csproj", "{A377955E-7EA1-6F29-8CF7-774569E93925}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.CollectBus.Cassandra", "modules\JiShe.CollectBus.Cassandra\JiShe.CollectBus.Cassandra.csproj", "{443B4549-0AC0-4493-8F3E-49C83225DD76}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1.Web", "1.Web", "{A02F7D8A-04DC-44D6-94D4-3F65712D6B94}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.Modules", "4.Modules", "{2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "5.Protocols", "5.Protocols", "{3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.Protocols", "4.Protocols", "{3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.Services", "2.Services", "{BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.Shared", "3.Shared", "{EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Kafka.Test", "modules\JiShe.CollectBus.Kafka.Test\JiShe.CollectBus.Kafka.Test.csproj", "{6D6A2A58-7406-9C8C-7B23-3E442CCE3E6B}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Protocol.T1882018", "protocols\JiShe.CollectBus.Protocol.T1882018\JiShe.CollectBus.Protocol.T1882018.csproj", "{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Protocol.T37612012", "protocols\JiShe.CollectBus.Protocol.T37612012\JiShe.CollectBus.Protocol.T37612012.csproj", "{8A61DF78-069B-40B5-8811-614E2960443E}"
@@ -56,44 +40,17 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Docs", "0.Docs", "{D8346C4C-55B8-43E8-A6B8-E59D56FE6D92}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
+ Directory.Build.JiShe.targets = Directory.Build.JiShe.targets
+ Directory.Build.Microsoft.targets = Directory.Build.Microsoft.targets
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ Directory.Build.Volo.targets = Directory.Build.Volo.targets
Dockerfile = Dockerfile
NuGet.Config = NuGet.Config
PackageAndPublish.bat = PackageAndPublish.bat
readme.md = readme.md
EndProjectSection
EndProject
-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", "modules\JiShe.CollectBus.Analyzers\JiShe.CollectBus.Analyzers.csproj", "{EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Migration.Application.Contracts", "services\JiShe.CollectBus.Migration.Application.Contracts\JiShe.CollectBus.Migration.Application.Contracts.csproj", "{E01625B5-B5B7-7A4B-468F-EC12C1BDBA2A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Migration.Application", "services\JiShe.CollectBus.Migration.Application\JiShe.CollectBus.Migration.Application.csproj", "{B955C5DA-3C20-35D2-0770-8FE473C41C44}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Migration.Host", "web\JiShe.CollectBus.Migration.Host\JiShe.CollectBus.Migration.Host.csproj", "{995D3D91-7221-D4A3-A7B2-FEC202328A18}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBus.Migration.HttpApi", "web\JiShe.CollectBus.Migration.HttpApi\JiShe.CollectBus.Migration.HttpApi.csproj", "{8A113DE5-7D50-6E6B-739F-B6EEAD5E13B4}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MainService", "MainService", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EPOService", "EPOService", "{18207368-3C39-4346-85F7-A8B499B0B458}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MigrationService", "MigrationService", "{A31EC18C-956B-4FD2-AED6-609C33B467E9}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBusEPO.Application.Contracts", "services\JiShe.CollectBusEPO.Application.Contracts\JiShe.CollectBusEPO.Application.Contracts.csproj", "{3B32D838-33BF-C08A-C447-3172CA62D42F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBusEPO.Application", "services\JiShe.CollectBusEPO.Application\JiShe.CollectBusEPO.Application.csproj", "{C71FF348-FB47-67E6-AF0D-6A8E48C5EDEA}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBusEPO.HttpApi", "web\JiShe.CollectBusEPO.HttpApi\JiShe.CollectBusEPO.HttpApi.csproj", "{98FE468D-0C34-83D9-31BD-F59C44D00357}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.CollectBusEPO.HttpApi.Host", "web\JiShe.CollectBusEPO.HttpApi.Host\JiShe.CollectBusEPO.HttpApi.Host.csproj", "{A2DDA6F0-C760-0633-D576-E23A186504E4}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MainHost", "MainHost", "{A38B5EB3-2F55-44A2-944B-31A73DE91402}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MigrationHost", "MigrationHost", "{C61007F8-51F5-409C-9FAF-DEF6A24DCDED}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EPOHost", "EPOHost", "{8D1FD3D9-3FF0-4581-ACF0-45AF9D595774}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -116,10 +73,6 @@ Global
{78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -136,34 +89,10 @@ Global
{8BA01C3D-297D-42DF-BD63-EF07202A0A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BA01C3D-297D-42DF-BD63-EF07202A0A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BA01C3D-297D-42DF-BD63-EF07202A0A67}.Release|Any CPU.Build.0 = Release|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0}.Release|Any CPU.Build.0 = Release|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C06C4082-638F-2996-5FED-7784475766C1}.Release|Any CPU.Build.0 = Release|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F0288175-F0EC-48BD-945F-CF1512850943}.Release|Any CPU.Build.0 = Release|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5}.Release|Any CPU.Build.0 = Release|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A377955E-7EA1-6F29-8CF7-774569E93925}.Release|Any CPU.Build.0 = Release|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {443B4549-0AC0-4493-8F3E-49C83225DD76}.Release|Any CPU.Build.0 = Release|Any CPU
- {6D6A2A58-7406-9C8C-7B23-3E442CCE3E6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6D6A2A58-7406-9C8C-7B23-3E442CCE3E6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6D6A2A58-7406-9C8C-7B23-3E442CCE3E6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6D6A2A58-7406-9C8C-7B23-3E442CCE3E6B}.Release|Any CPU.Build.0 = Release|Any CPU
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -180,46 +109,6 @@ 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
- {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
- {E01625B5-B5B7-7A4B-468F-EC12C1BDBA2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E01625B5-B5B7-7A4B-468F-EC12C1BDBA2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E01625B5-B5B7-7A4B-468F-EC12C1BDBA2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E01625B5-B5B7-7A4B-468F-EC12C1BDBA2A}.Release|Any CPU.Build.0 = Release|Any CPU
- {B955C5DA-3C20-35D2-0770-8FE473C41C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B955C5DA-3C20-35D2-0770-8FE473C41C44}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B955C5DA-3C20-35D2-0770-8FE473C41C44}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B955C5DA-3C20-35D2-0770-8FE473C41C44}.Release|Any CPU.Build.0 = Release|Any CPU
- {995D3D91-7221-D4A3-A7B2-FEC202328A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {995D3D91-7221-D4A3-A7B2-FEC202328A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {995D3D91-7221-D4A3-A7B2-FEC202328A18}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {995D3D91-7221-D4A3-A7B2-FEC202328A18}.Release|Any CPU.Build.0 = Release|Any CPU
- {8A113DE5-7D50-6E6B-739F-B6EEAD5E13B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8A113DE5-7D50-6E6B-739F-B6EEAD5E13B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8A113DE5-7D50-6E6B-739F-B6EEAD5E13B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8A113DE5-7D50-6E6B-739F-B6EEAD5E13B4}.Release|Any CPU.Build.0 = Release|Any CPU
- {3B32D838-33BF-C08A-C447-3172CA62D42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3B32D838-33BF-C08A-C447-3172CA62D42F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3B32D838-33BF-C08A-C447-3172CA62D42F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3B32D838-33BF-C08A-C447-3172CA62D42F}.Release|Any CPU.Build.0 = Release|Any CPU
- {C71FF348-FB47-67E6-AF0D-6A8E48C5EDEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C71FF348-FB47-67E6-AF0D-6A8E48C5EDEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C71FF348-FB47-67E6-AF0D-6A8E48C5EDEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C71FF348-FB47-67E6-AF0D-6A8E48C5EDEA}.Release|Any CPU.Build.0 = Release|Any CPU
- {98FE468D-0C34-83D9-31BD-F59C44D00357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {98FE468D-0C34-83D9-31BD-F59C44D00357}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {98FE468D-0C34-83D9-31BD-F59C44D00357}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {98FE468D-0C34-83D9-31BD-F59C44D00357}.Release|Any CPU.Build.0 = Release|Any CPU
- {A2DDA6F0-C760-0633-D576-E23A186504E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A2DDA6F0-C760-0633-D576-E23A186504E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A2DDA6F0-C760-0633-D576-E23A186504E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A2DDA6F0-C760-0633-D576-E23A186504E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -227,40 +116,17 @@ Global
GlobalSection(NestedProjects) = preSolution
{D64C1577-4929-4B60-939E-96DE1534891A} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
{F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
- {78040F9E-3501-4A40-82DF-00A597710F35} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
- {F1C58097-4C08-4D88-8976-6B3389391481} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {A38B5EB3-2F55-44A2-944B-31A73DE91402}
- {35829A15-4127-4F69-8BDE-9405DEAACA9A} = {A38B5EB3-2F55-44A2-944B-31A73DE91402}
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
+ {78040F9E-3501-4A40-82DF-00A597710F35} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
+ {35829A15-4127-4F69-8BDE-9405DEAACA9A} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
{AD2F1928-4411-4511-B564-5FB996EC08B9} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
{8BA01C3D-297D-42DF-BD63-EF07202A0A67} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {FE0457D9-4038-4A17-8808-DCAD06CFC0A0} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {C06C4082-638F-2996-5FED-7784475766C1} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {F0288175-F0EC-48BD-945F-CF1512850943} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {A3F3C092-0A25-450B-BF6A-5983163CBEF5} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
{A377955E-7EA1-6F29-8CF7-774569E93925} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
- {443B4549-0AC0-4493-8F3E-49C83225DD76} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {6D6A2A58-7406-9C8C-7B23-3E442CCE3E6B} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
{430D298B-377E-49B8-83AA-ADC7C0EBDB0F} = {3C3F9DB2-EC97-4464-B49F-BF1A0C2B46DC}
{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}
- {DD68F314-BC66-5601-B094-B1A7BE93F4E0} = {EBF7C01F-9B4F-48E6-8418-2CBFDA51EB0B}
- {EB97C7BB-1E4A-CBA4-04C1-22DBF48A253A} = {2E0FE301-34C3-4561-9CAE-C7A9E65AEE59}
- {E01625B5-B5B7-7A4B-468F-EC12C1BDBA2A} = {A31EC18C-956B-4FD2-AED6-609C33B467E9}
- {B955C5DA-3C20-35D2-0770-8FE473C41C44} = {A31EC18C-956B-4FD2-AED6-609C33B467E9}
- {995D3D91-7221-D4A3-A7B2-FEC202328A18} = {C61007F8-51F5-409C-9FAF-DEF6A24DCDED}
- {8A113DE5-7D50-6E6B-739F-B6EEAD5E13B4} = {C61007F8-51F5-409C-9FAF-DEF6A24DCDED}
- {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {18207368-3C39-4346-85F7-A8B499B0B458} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {A31EC18C-956B-4FD2-AED6-609C33B467E9} = {BA4DA3E7-9AD0-47AD-A0E6-A0BB6700DA23}
- {3B32D838-33BF-C08A-C447-3172CA62D42F} = {18207368-3C39-4346-85F7-A8B499B0B458}
- {C71FF348-FB47-67E6-AF0D-6A8E48C5EDEA} = {18207368-3C39-4346-85F7-A8B499B0B458}
- {98FE468D-0C34-83D9-31BD-F59C44D00357} = {8D1FD3D9-3FF0-4581-ACF0-45AF9D595774}
- {A2DDA6F0-C760-0633-D576-E23A186504E4} = {8D1FD3D9-3FF0-4581-ACF0-45AF9D595774}
- {A38B5EB3-2F55-44A2-944B-31A73DE91402} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
- {C61007F8-51F5-409C-9FAF-DEF6A24DCDED} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
- {8D1FD3D9-3FF0-4581-ACF0-45AF9D595774} = {A02F7D8A-04DC-44D6-94D4-3F65712D6B94}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD}
diff --git a/NuGet.Config b/NuGet.Config
index 44f8e7f..370bfce 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -1,7 +1,8 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
+
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..d8e6f12
Binary files /dev/null and b/icon.png differ
diff --git a/modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs b/modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs
deleted file mode 100644
index c0ce66c..0000000
--- a/modules/JiShe.CollectBus.Analyzers/ComplexTypeSourceAnalyzers.cs
+++ /dev/null
@@ -1,734 +0,0 @@
-using JiShe.CollectBus.Analyzers.Shared;
-using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
-using System;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-
-namespace JiShe.CollectBus.IncrementalGenerator
-{
- ///
- /// 复杂类型增量源生成器
- ///
- [Generator(LanguageNames.CSharp)]
- public class ComplexTypeSourceAnalyzers : IIncrementalGenerator
- {
- private const string AttributeFullName = "JiShe.CollectBus.Analyzers.Shared.SourceAnalyzersAttribute";
-
- public void Initialize(IncrementalGeneratorInitializationContext context)
- {
- //Debugger.Launch();
-
- // 步骤1:筛选带有 [SourceAnalyzers] 的类
- var classDeclarations = context.SyntaxProvider
- .CreateSyntaxProvider(
- predicate: static (s, _) => IsClassWithAttribute(s),
- transform: static (ctx, _) => GetClassDeclaration(ctx))
- .Where(static c => c is not null);
-
- // 步骤2:合并编译信息
- var compilationAndClasses = context.CompilationProvider.Combine(classDeclarations.Collect());
-
- context.RegisterSourceOutput(compilationAndClasses, (spc, source) =>
- GenerateCode(source.Left, source.Right!, spc));
- }
-
- private static bool IsClassWithAttribute(SyntaxNode node) => node is ClassDeclarationSyntax cds && cds.AttributeLists.Count > 0;
-
- private static ClassDeclarationSyntax GetClassDeclaration(GeneratorSyntaxContext context)
- {
- var classDecl = (ClassDeclarationSyntax)context.Node;
- var semanticModel = context.SemanticModel;
-
- // 获取类符号
- var classSymbol = semanticModel.GetDeclaredSymbol(classDecl) as INamedTypeSymbol;
- if (classSymbol == null) return null;
-
- // 检查是否包含 SourceAnalyzers 特性
- var sourceAnalyzerAttr = classSymbol.GetAttributes().FirstOrDefault(attr => attr.AttributeClass?.ToDisplayString() == AttributeFullName);
-
- // 必须包含 EntityType 参数
- if (sourceAnalyzerAttr == null ||
- sourceAnalyzerAttr.ConstructorArguments.Length == 0)
- {
- return null;
- }
-
- return classDecl;
-
- //var classDecl = (ClassDeclarationSyntax)context.Node;
- //var attributeType = context.SemanticModel.Compilation.GetTypeByMetadataName(AttributeFullName);
-
- //foreach (var attribute in classDecl.AttributeLists.SelectMany(al => al.Attributes))
- //{
- // var symbol = context.SemanticModel.GetSymbolInfo(attribute).Symbol;
- // if (symbol is IMethodSymbol ctor &&
- // SymbolEqualityComparer.Default.Equals(ctor.ContainingType, attributeType))
- // {
- // return classDecl;
- // }
- //}
- //return null;
- }
-
- ///
- /// 递归获取所有层级的属性
- ///
- ///
- ///
- private static IEnumerable GetAllPropertiesInHierarchy(INamedTypeSymbol classSymbol)
- {
- var currentSymbol = classSymbol;
- while (currentSymbol != null)
- {
- foreach (var prop in currentSymbol.GetMembers().OfType())
- {
- yield return prop;
- }
- currentSymbol = currentSymbol.BaseType; // 向上遍历基类
- }
- }
-
- ///
- /// 生成代码
- ///
- ///
- ///
- ///
- private static void GenerateCode(
- Compilation compilation,
- IEnumerable classes,
- SourceProductionContext context)
- {
- var processedTypes = new HashSet(SymbolEqualityComparer.Default);
-
- if (!classes.Any())
- {
- context.ReportDiagnostic(Diagnostic.Create(
- new DiagnosticDescriptor("GEN002", "没有目标类",
- "没有找到SourceAnalyzers标记的类", "Debug", DiagnosticSeverity.Warning, true),
- Location.None));
- }
-
- foreach (var classDecl in classes.Distinct())
- {
- var model = compilation.GetSemanticModel(classDecl.SyntaxTree);
- var classSymbol = model.GetDeclaredSymbol(classDecl) as INamedTypeSymbol;
-
- if (classSymbol == null || !processedTypes.Add(classSymbol))
- {
- context.ReportDiagnostic(Diagnostic.Create(
- new DiagnosticDescriptor("GEN003", "无效符号",
- $"类名称为{classDecl.Identifier.Text} 符号为空", "Error", DiagnosticSeverity.Error, true),
- Location.None));
- continue;
- }
-
- var code3 = BuildAccessorsForSourceEntity(classSymbol, compilation, processedTypes);
- context.AddSource($"{classSymbol.Name}Accessor.g.cs", code3);
- }
-
- // 生成工厂注册代码
- context.AddSource("SourceEntityAccessorFactory.g.cs", BuildFactoryCode());
- }
-
- ///
- /// 获取泛型参数
- ///
- ///
- ///
- public static string GetGenericParams(INamedTypeSymbol symbol)
- {
- if (!symbol.IsGenericType) return "";
- var parameters = symbol.TypeParameters.Select(t => t.Name);
- return $"<{string.Join(", ", parameters)}>";
- }
-
-
- ///
- /// 生成标准属性的访问器
- ///
- ///
- ///
- ///
- private static void GenerateStandardAccessors(IPropertySymbol prop, INamedTypeSymbol propType, StringBuilder code)
- {
- var parentType = prop.ContainingType.ToDisplayString();
- code.AppendLine($" public static {propType.ToDisplayString()} Get{prop.Name}({parentType} obj) => obj.{prop.Name};");
-
- if (prop.SetMethod != null)
- {
- code.AppendLine($" public static void Set{prop.Name}({parentType} obj, {propType.ToDisplayString()} value) => obj.{prop.Name} = value;");
- }
- }
-
-
- ///
- /// 构建实体访问器代码(支持泛型)
- ///
- private static string BuildAccessorsForSourceEntity(
- INamedTypeSymbol classSymbol,
- Compilation compilation,
- HashSet processedTypes)
- {
- // 获取 SourceAnalyzers 特性的 EntityType 参数
- var sourceAnalyzerAttr = classSymbol.GetAttributes()
- .FirstOrDefault(attr =>
- attr.AttributeClass?.ToDisplayString() == AttributeFullName);
-
- // 解析 EntityType 枚举值
- string entityTypeValue = "EntityTypeEnum.Other"; // 默认值
- if (sourceAnalyzerAttr != null &&
- sourceAnalyzerAttr.ConstructorArguments.Length > 0)
- {
- var arg = sourceAnalyzerAttr.ConstructorArguments[0];
- if (arg.Kind == TypedConstantKind.Enum &&
- arg.Type is INamedTypeSymbol enumType)
- {
- int enumValue = (int)arg.Value!;
- entityTypeValue = GetEnumMemberName(enumType, enumValue);
- }
- }
-
- var code = new StringBuilder();
- code.AppendLine("// ");
- code.AppendLine("#nullable enable");
- code.AppendLine("using System;");
- code.AppendLine("using System.Reflection;");
- code.AppendLine("using System.Collections.Generic;");
- code.AppendLine("using JiShe.CollectBus.Analyzers.Shared;");
- code.AppendLine($"namespace {classSymbol.ContainingNamespace.ToDisplayString()};");
- code.AppendLine();
-
- // 处理泛型类型名称
- var accessibility = classSymbol.DeclaredAccessibility switch
- {
- Accessibility.Public => "public",
- _ => "internal"
- };
-
- var genericParams = classSymbol.IsGenericType
- ? $"<{string.Join(", ", classSymbol.TypeParameters.Select(t => t.Name))}>"
- : "";
-
- code.AppendLine(
- $"{accessibility} sealed class {classSymbol.Name}Accessor{genericParams} " + // 保留泛型参数
- $": ISourceEntityAccessor<{classSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}>");
-
- code.AppendLine("{");
-
- var propList = GetAllPropertiesInHierarchy(classSymbol);
-
- //类名称
- code.AppendLine($" public string EntityName {{get;}} = \"{classSymbol.Name}\";");
- // 添加 EntityType 属性
- code.AppendLine($" public EntityTypeEnum? EntityType {{ get; }} = {entityTypeValue};");
-
- foreach (var prop in propList)
- {
- // 安全类型转换
- if (prop.Type is not ITypeSymbol propType) continue;
-
- if (propType is INamedTypeSymbol namedType)
- {
- GenerateStandardAccessors(prop, namedType, code);
- }
-
- if (propType is INamedTypeSymbol { IsTupleType: true } tupleType)
- {
- GenerateTupleAccessors(prop, tupleType, code);
- }
- }
-
- //生成当前类属性名称集合
- GeneratePropertyListForSourceEntity(propList, code, compilation, classSymbol);
-
- //生成当前类属性信息集合
- GenerateEntityMemberInfoList(propList, code, compilation, classSymbol);
-
-
- //生成当前类属性访问
- GetGeneratePropertyValueForSourceEntity(propList, code, compilation, classSymbol);
-
- //生成当前类属性设置
- SetGeneratePropertyValueForSourceEntity(propList, code, compilation, classSymbol);
-
- code.AppendLine("}");
- return code.ToString();
- }
-
- ///
- /// 生成ValueTuple元组属性访问器
- ///
- ///
- ///
- ///
- private static void GenerateTupleAccessors(
- IPropertySymbol prop,
- INamedTypeSymbol tupleType,
- StringBuilder code)
- {
- var parentType = prop.ContainingType.ToDisplayString();
- var tupleElements = tupleType.TupleElements;
-
- for (int i = 0; i < tupleElements.Length; i++)
- {
- var element = tupleElements[i];
- var elementType = element.Type.ToDisplayString();
- var elementName = element.Name;
-
- // Getter
- code.AppendLine($"public static {elementType} Get{prop.Name}_{elementName}({parentType} obj) => obj.{prop.Name}.{elementName};");
-
- // Setter
- if (prop.SetMethod != null)
- {
- code.AppendLine($"public static void Set{prop.Name}_{elementName}({parentType} obj, {elementType} value) => obj.{prop.Name} = ({string.Join(", ", GetTupleElements(prop.Name, tupleElements, i))});");
- }
- }
- }
-
- private static IEnumerable GetTupleElements(
- string propName,
- ImmutableArray elements,
- int targetIndex)
- {
- for (int i = 0; i < elements.Length; i++)
- {
- yield return i == targetIndex
- ? "value"
- : $"obj.{propName}.{elements[i].Name}";
- }
- }
-
- ///
- /// 处理System.Tuple类型的访问器生成
- ///
- private static void GenerateSystemTupleAccessors(
- IPropertySymbol prop,
- INamedTypeSymbol tupleType,
- StringBuilder code,
- INamedTypeSymbol classSymbol)
- {
- var parentType = classSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- var elementTypes = tupleType.TypeArguments;
- var tupleTypeName = tupleType.ToDisplayString();
-
- for (int i = 0; i < elementTypes.Length; i++)
- {
- var elementType = elementTypes[i].ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- var elementName = $"Item{i + 1}";
-
- // Getter
- code.AppendLine(
- $" public static {elementType} Get{prop.Name}_{elementName}" +
- $"({parentType} obj) => obj.{prop.Name}.{elementName};");
-
- // Setter
- if (prop.SetMethod != null)
- {
- var assignments = elementTypes.Select((_, idx) =>
- idx == i ? "value" : $"obj.{prop.Name}.Item{idx + 1}"
- ).ToList();
-
- code.AppendLine(
- $" public static void Set{prop.Name}_{elementName}" +
- $"({parentType} obj, {elementType} value) => " +
- $"obj.{prop.Name} = new {tupleTypeName}({string.Join(", ", assignments)});");
- }
- }
- }
-
- ///
- /// 增强的工厂类实现
- ///
- private static string BuildFactoryCode()
- {
- return """
- using System;
- using System.Collections.Concurrent;
- using System.Reflection;
-
- namespace JiShe.CollectBus.Analyzers.Shared;
-
- public static class SourceEntityAccessorFactory
- {
- 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);
- }
- }
- """;
- }
-
- ///
- /// 属性访问生成逻辑
- ///
- /// 属性集合
- ///
- ///
- ///
- private static void GetGeneratePropertyValueForSourceEntity(
- IEnumerable propList,
- StringBuilder code,
- Compilation compilation,
- INamedTypeSymbol classSymbol)
- {
- code.AppendLine($" public object GetPropertyValue({classSymbol} targetEntity, string propertyName)");
- code.AppendLine(" {");
- code.AppendLine(" return propertyName switch");
- code.AppendLine(" {");
-
- foreach (var prop in propList)
- {
- code.AppendLine(
- $" \"{prop.Name}\" => " +
- $"Get{prop.Name}(targetEntity),");
-
- if (prop.Type is INamedTypeSymbol { IsTupleType: true } tupleType)
- {
- foreach (var element in tupleType.TupleElements)
- {
- code.AppendLine(
- $" \"{prop.Name}.{element.Name}\" => " +
- $"Get{prop.Name}_{element.Name}(targetEntity),");
- }
- }
-
- }
-
- code.AppendLine(" _ => throw new ArgumentException($\"Unknown property: {propertyName}\")");
- code.AppendLine(" };");
- code.AppendLine(" }");
- }
-
- ///
- /// 属性设置生成逻辑
- ///
- /// 属性集合
- ///
- ///
- ///
- private static void SetGeneratePropertyValueForSourceEntity(
- IEnumerable propList,
- StringBuilder code,
- Compilation compilation,
- INamedTypeSymbol classSymbol)
- {
- code.AppendLine($" public void SetPropertyValue({classSymbol} targetEntity, string propertyName, object value)");
- code.AppendLine(" {");
- code.AppendLine(" switch (propertyName)");
- code.AppendLine(" {");
-
- foreach (var prop in propList)
- {
- var propType = prop.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- code.AppendLine($" case \"{prop.Name}\":");
- code.AppendLine($" Set{prop.Name}(");
- code.AppendLine($" targetEntity, ({propType})value);");
- code.AppendLine(" break;");
-
- if (prop.Type is INamedTypeSymbol { IsTupleType: true } tupleType)
- {
- foreach (var element in tupleType.TupleElements)
- {
- var elementType = element.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- code.AppendLine($" case \"{prop.Name}.{element.Name}\":");
- code.AppendLine($" Set{prop.Name}_{element.Name}(");
- code.AppendLine($" targetEntity, ({elementType})value);");
- code.AppendLine(" break;");
- }
- }
- }
-
- code.AppendLine(" default:");
- code.AppendLine(" throw new ArgumentException($\"Unknown property: {propertyName}\");");
- code.AppendLine(" }");
- code.AppendLine(" }");
- }
-
- ///
- /// 属性名称集合
- ///
- /// 属性集合
- ///
- ///
- ///
- private static void GeneratePropertyListForSourceEntity(
- IEnumerable propList,
- StringBuilder code,
- Compilation compilation,
- INamedTypeSymbol classSymbol)
- {
- code.AppendLine(" public List PropertyNameList {get;} = new List()");
- code.AppendLine(" {");
- List tempPropList = new List();
- foreach (var prop in propList)
- {
- if (prop.Type is INamedTypeSymbol { IsTupleType: true } tupleType)
- {
- foreach (var element in tupleType.TupleElements)
- {
- tempPropList.Add($"\"{prop.Name}.{element.Name}\"");
- }
- }
- else
- {
- tempPropList.Add($"\"{prop.Name}\"");
- }
- }
-
- code.Append(string.Join(",", tempPropList));
-
- code.AppendLine(" };");
- }
-
-
- ///
- /// 生成当前类属性信息集合
- ///
- private static void GenerateEntityMemberInfoList(
- IEnumerable propList,
- StringBuilder code,
- Compilation compilation,
- INamedTypeSymbol classSymbol)
- {
- code.AppendLine(" public List MemberList { get; } = new()");
- code.AppendLine(" {");
-
- var initializerLines = new List();
-
- foreach (var prop in propList)
- {
- var entityType = prop.ContainingType.ToDisplayString();//entity 实体类型名称
- var propType = prop.Type;//实体属性的类型
- var propTypeName = propType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- // var declaredTypeName = propType.Name; // 直接获取类型名称(如 "Int32")
- // 处理可空类型,获取底层具体类型名称
- var declaredTypeName = propType switch
- {
- INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } nullableType =>
- nullableType.TypeArguments[0].Name, // 提取如 "Int32"
- _ => propType.Name
- };
-
- // 处理主属性
- var propAttributes = prop.GetAttributes()
- .Where(a => !IsCompilerGeneratedAttribute(a))
- .ToList();
-
- var attributeInitializers = propAttributes
- .Select(GenerateAttributeInitializer)
- .Where(s => !string.IsNullOrEmpty(s));
-
- var mainMember = new StringBuilder();
- mainMember.Append(
- $"new EntityMemberInfo(" +
- $"\"{prop.Name}\", " +
- $"typeof({propTypeName}), " +
- $"\"{declaredTypeName}\", " +
- $"(e) => Get{prop.Name}(({entityType})e), " +
- $"(e, v) => Set{prop.Name}(({entityType})e, ({propTypeName})v))");
-
- if (attributeInitializers.Any())
- {
- mainMember.AppendLine();
- mainMember.Append(" { CustomAttributes = new List");
- mainMember.Append($" {{ {string.Join(", ", attributeInitializers)} }} }}");
- }
-
- initializerLines.Add(mainMember.ToString());
-
- // 处理元组元素,(暂不需要处理元组元素的特性)
- if (prop.Type is INamedTypeSymbol { IsTupleType: true } tupleType)
- {
- foreach (var element in tupleType.TupleElements)
- {
- var elementType = element.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);//元组元素的类型
- var elementName = element.Name;//元组元素名称
- var elementDeclaredName = element.Type.Name;//元组元素类型名称
-
- initializerLines.Add(
- $"new EntityMemberInfo(" +
- $"\"{prop.Name}.{elementName}\", " +
- $"typeof({elementType}), " +
- $"GetValueTupleElementDeclaredTypeName(typeof({elementType})), " +//$"\"{elementDeclaredName}\", " +
- $"(e) => Get{prop.Name}_{elementName}(({entityType})e), " +
- $"(e, v) => Set{prop.Name}_{elementName}(({entityType})e, ({elementType})v))");
- }
- }
- }
-
- code.AppendLine(string.Join(",\n", initializerLines));
- code.AppendLine(" };");
-
- code.AppendLine(GetValueTupleElementName());
- }
-
- private static string GetValueTupleElementName()
- {
- return """
- public static string GetValueTupleElementDeclaredTypeName(Type declaredType)
- {
- string typeName;
- // 处理可空类型
- if (declaredType.IsGenericType && declaredType.GetGenericTypeDefinition() == typeof(Nullable<>))
- {
- Type underlyingType = Nullable.GetUnderlyingType(declaredType);
- typeName = underlyingType.Name;
- }
- else
- {
- typeName = declaredType.Name;
- }
-
- return typeName;
- }
- """;
- }
-
-
- private static string GenerateAttributeInitializer(AttributeData attribute)
- {
- if (attribute.AttributeClass == null)
- return string.Empty;
-
- var attributeClass = attribute.AttributeClass.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- var args = attribute.ConstructorArguments;
- var namedArgs = attribute.NamedArguments;
-
- var parameters = new List();
- foreach (var arg in args)
- {
- parameters.Add(ConvertTypedConstantToCode(arg));
- }
-
- var constructorArgs = string.Join(", ", parameters);
-
- var initializer = new StringBuilder();
- initializer.Append($"new {attributeClass}({constructorArgs})");
-
- if (namedArgs.Any())
- {
- initializer.Append(" { ");
- var namedArgsList = namedArgs.Select(n => $"{n.Key} = {ConvertTypedConstantToCode(n.Value)}");
- initializer.Append(string.Join(", ", namedArgsList));
- initializer.Append(" }");
- }
-
- return initializer.ToString();
- }
-
- private static string ConvertTypedConstantToCode(TypedConstant constant)
- {
- if (constant.IsNull)
- return "null";
-
- switch (constant.Kind)
- {
- case TypedConstantKind.Array:
- var elements = constant.Values.Select(ConvertTypedConstantToCode);
- return $"new[] {{ {string.Join(", ", elements)} }}";
- case TypedConstantKind.Type:
- var typeSymbol = (ITypeSymbol)constant.Value!;
- return $"typeof({typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)})";
- case TypedConstantKind.Enum:
- return ConvertEnumTypedConstant(constant);
- default:
- return ConvertPrimitiveConstant(constant);
- }
- }
-
- private static string ConvertEnumTypedConstant(TypedConstant constant)
- {
- var enumType = constant.Type!;
- var enumValue = constant.Value!;
- var enumTypeName = enumType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
-
- foreach (var member in enumType.GetMembers().OfType())
- {
- if (member.ConstantValue != null && member.ConstantValue.Equals(enumValue))
- return $"{enumTypeName}.{member.Name}";
- }
-
- return $"({enumTypeName})({enumValue})";
- }
-
- private static string ConvertPrimitiveConstant(TypedConstant constant)
- {
- var value = constant.Value!;
- return value switch
- {
- string s => $"\"{s}\"",
- char c => $"'{c}'",
- bool b => b ? "true" : "false",
- _ => value.ToString()
- };
- }
-
- private static bool IsCompilerGeneratedAttribute(AttributeData attribute)
- {
- return attribute.AttributeClass?.ToDisplayString() == "System.Runtime.CompilerServices.CompilerGeneratedAttribute";
- }
-
- ///
- /// 获取枚举的参数
- ///
- ///
- ///
- ///
- private static string GetEnumMemberName(INamedTypeSymbol enumType, int value)
- {
- foreach (var member in enumType.GetMembers().OfType())
- {
- if (member.ConstantValue is int intValue && intValue == value)
- {
- return $"{enumType.ToDisplayString()}.{member.Name}";
- }
- }
- return $"{enumType.ToDisplayString()}.Other";
- }
- }
-}
\ No newline at end of file
diff --git a/modules/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj b/modules/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
deleted file mode 100644
index 66b1fcf..0000000
--- a/modules/JiShe.CollectBus.Analyzers/JiShe.CollectBus.Analyzers.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- netstandard2.0
- true
- true
- false
- bin
- false
- latest
- true
- true
-
-
-
-
-
-
-
-
-
diff --git a/modules/JiShe.CollectBus.Cassandra/CassandraConfig.cs b/modules/JiShe.CollectBus.Cassandra/CassandraConfig.cs
deleted file mode 100644
index c14171e..0000000
--- a/modules/JiShe.CollectBus.Cassandra/CassandraConfig.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace JiShe.CollectBus.Cassandra
-{
- public class CassandraConfig
- {
- public Node[] Nodes { get; set; }
- public string Username { get; set; }
- public string Password { get; set; }
- public string Keyspace { get; set; }
- public string ConsistencyLevel { get; set; }
- public Pooling PoolingOptions { get; set; }
- public Socket SocketOptions { get; set; }
- public Query QueryOptions { get; set; }
-
- public ReplicationStrategy ReplicationStrategy { get; set; }
- }
-
- public class Pooling
- {
- public int CoreConnectionsPerHost { get; set; }
- public int MaxConnectionsPerHost { get; set; }
- public int MaxRequestsPerConnection { get; set; }
- }
-
- public class Socket
- {
- public int ConnectTimeoutMillis { get; set; }
- public int ReadTimeoutMillis { get; set; }
- }
-
- public class Query
- {
- public string ConsistencyLevel { get; set; }
- public string SerialConsistencyLevel { get; set; }
- public bool DefaultIdempotence { get; set; }
- }
-
- public class ReplicationStrategy
- {
- public string Class { get; set; }
- public DataCenter[] DataCenters { get; set; }
- }
-
- public class DataCenter
- {
- public string Name { get; set; }
- public int ReplicationFactor { get; set; }
- public string Strategy { get; set; }
- }
-
- public class Node
- {
- public string Host { get; set; }
- public int Port { get; set; }
- public string DataCenter { get; set; }
- public string Rack { get; set; }
- }
-
-}
diff --git a/modules/JiShe.CollectBus.Cassandra/CassandraProvider.cs b/modules/JiShe.CollectBus.Cassandra/CassandraProvider.cs
deleted file mode 100644
index dc3e0ee..0000000
--- a/modules/JiShe.CollectBus.Cassandra/CassandraProvider.cs
+++ /dev/null
@@ -1,154 +0,0 @@
-using System;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using Cassandra;
-using Cassandra.Mapping;
-using Cassandra.Data.Linq;
-using System.ComponentModel.DataAnnotations;
-using System.Diagnostics;
-using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.Options;
-using Volo.Abp.DependencyInjection;
-using JiShe.CollectBus.Common.Attributes;
-
-namespace JiShe.CollectBus.Cassandra
-{
- public class CassandraProvider : IDisposable, ICassandraProvider, ISingletonDependency
- {
- private readonly ILogger _logger;
-
- public Cluster Instance { get; set; }
-
- public ISession Session { get; set; }
-
- public CassandraConfig CassandraConfig { get; set; }
- ///
- ///
- ///
- ///
- ///
- public CassandraProvider(
- IOptions options,
- ILogger logger)
- {
- CassandraConfig = options.Value;
- _logger = logger;
- }
-
- public Task InitClusterAndSessionAsync()
- {
- InitClusterAndSession();
- return Task.CompletedTask;
- }
-
- public void InitClusterAndSession()
- {
- GetCluster((keyspace) =>
- {
- GetSession(keyspace);
- });
- }
-
- public Cluster GetCluster(Action? callback=null)
- {
- var clusterBuilder = Cluster.Builder();
-
- // 添加多个节点
- foreach (var node in CassandraConfig.Nodes)
- {
- clusterBuilder.AddContactPoint(node.Host)
- .WithPort(node.Port);
- }
-
- clusterBuilder.WithCredentials(CassandraConfig.Username, CassandraConfig.Password);
-
- // 优化连接池配置
- var poolingOptions = new PoolingOptions()
- .SetCoreConnectionsPerHost(HostDistance.Local, CassandraConfig.PoolingOptions.CoreConnectionsPerHost)
- .SetMaxConnectionsPerHost(HostDistance.Local, CassandraConfig.PoolingOptions.MaxConnectionsPerHost)
- .SetMaxRequestsPerConnection(CassandraConfig.PoolingOptions.MaxRequestsPerConnection)
- .SetHeartBeatInterval(30000); // 30秒心跳
-
- clusterBuilder.WithPoolingOptions(poolingOptions);
-
- // 优化Socket配置
- var socketOptions = new SocketOptions()
- .SetConnectTimeoutMillis(CassandraConfig.SocketOptions.ConnectTimeoutMillis)
- .SetReadTimeoutMillis(CassandraConfig.SocketOptions.ReadTimeoutMillis)
- .SetTcpNoDelay(true) // 启用Nagle算法
- .SetKeepAlive(true) // 启用TCP保活
- .SetReceiveBufferSize(32768) // 32KB接收缓冲区
- .SetSendBufferSize(32768); // 32KB发送缓冲区
-
- clusterBuilder.WithSocketOptions(socketOptions);
-
- // 优化查询选项
- var queryOptions = new QueryOptions()
- .SetConsistencyLevel((ConsistencyLevel)Enum.Parse(typeof(ConsistencyLevel), CassandraConfig.QueryOptions.ConsistencyLevel))
- .SetSerialConsistencyLevel((ConsistencyLevel)Enum.Parse(typeof(ConsistencyLevel), CassandraConfig.QueryOptions.SerialConsistencyLevel))
- .SetDefaultIdempotence(CassandraConfig.QueryOptions.DefaultIdempotence)
- .SetPageSize(5000); // 增加页面大小
-
- clusterBuilder.WithQueryOptions(queryOptions);
-
- // 启用压缩
- clusterBuilder.WithCompression(CompressionType.LZ4);
-
- // 配置重连策略
- clusterBuilder.WithReconnectionPolicy(new ExponentialReconnectionPolicy(1000, 10 * 60 * 1000));
- Instance = clusterBuilder.Build();
- callback?.Invoke(null);
- return Instance;
- }
-
- public ISession GetSession(string? keyspace = null)
- {
- if (string.IsNullOrEmpty(keyspace))
- {
- keyspace = CassandraConfig.Keyspace;
- }
- Session = Instance.Connect();
- var replication = GetReplicationStrategy();
- Session.CreateKeyspaceIfNotExists(keyspace, replication);
- Session.ChangeKeyspace(keyspace);
- return Session;
- }
-
- private Dictionary GetReplicationStrategy()
- {
- var strategy = CassandraConfig.ReplicationStrategy.Class;
- var dataCenters = CassandraConfig.ReplicationStrategy.DataCenters;
-
- switch (strategy)
- {
- case "NetworkTopologyStrategy":
- var networkDic = new Dictionary { { "class", "NetworkTopologyStrategy" } };
- foreach (var dataCenter in dataCenters)
- {
- networkDic.Add(dataCenter.Name, dataCenter.ReplicationFactor.ToString());
- }
- return networkDic;
- case "SimpleStrategy":
- var dic = new Dictionary { { "class", "SimpleStrategy" } };
- if (dataCenters.Length >= 1)
- {
- dic.Add("replication_factor", dataCenters[0].ReplicationFactor.ToString());
- }
- else
- {
- _logger.LogError("SimpleStrategy 不支持多个数据中心!");
- }
- return dic;
- default:
- throw new ArgumentNullException($"Strategy", "Strategy配置错误!");
- }
- }
-
- public void Dispose()
- {
- Instance.Dispose();
- Session.Dispose();
- }
- }
-}
\ No newline at end of file
diff --git a/modules/JiShe.CollectBus.Cassandra/CassandraRepository.cs b/modules/JiShe.CollectBus.Cassandra/CassandraRepository.cs
deleted file mode 100644
index 1d6cc3c..0000000
--- a/modules/JiShe.CollectBus.Cassandra/CassandraRepository.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System.Linq.Expressions;
-using Cassandra.Mapping;
-using JiShe.CollectBus.Cassandra.Extensions;
-using Volo.Abp.Domain.Entities;
-
-namespace JiShe.CollectBus.Cassandra
-{
- public class CassandraRepository
- : ICassandraRepository
- where TEntity : class, ICassandraEntity
- {
- private readonly ICassandraProvider _cassandraProvider;
- public CassandraRepository(ICassandraProvider cassandraProvider, MappingConfiguration mappingConfig)
- {
- _cassandraProvider = cassandraProvider;
- Mapper = new Mapper(cassandraProvider.Session, mappingConfig);
- cassandraProvider.Session.CreateTable(cassandraProvider.CassandraConfig.Keyspace);
- }
-
- public readonly IMapper Mapper;
-
- public virtual async Task GetAsync(TKey id)
- {
- return await GetAsync("WHERE id = ?", id);
- }
-
- public virtual async Task GetAsync(string cql, params object[] args)
- {
- return await Mapper.SingleAsync(cql, args);
- }
-
-
- public virtual async Task FirstOrDefaultAsync(TKey id)
- {
- return await FirstOrDefaultAsync("WHERE id = ?", id);
- }
-
- public virtual async Task FirstOrDefaultAsync(string cql, params object[] args)
- {
- return await Mapper.FirstOrDefaultAsync(cql, args);
- }
-
-
- public virtual async Task?> GetListAsync(string? cql = null, params object[] args)
- {
- return cql.IsNullOrWhiteSpace() ? (await Mapper.FetchAsync()).ToList() : (await Mapper.FetchAsync(cql, args)).ToList();
- }
-
- public virtual async Task InsertAsync(TEntity entity)
- {
- await Mapper.InsertAsync(entity);
- return entity;
- }
-
- public virtual async Task UpdateAsync(TEntity entity)
- {
- await Mapper.UpdateAsync(entity);
- return entity;
- }
-
- public virtual async Task DeleteAsync(TEntity entity)
- {
- await Mapper.DeleteAsync(entity);
- }
-
- public virtual async Task DeleteAsync(TKey id)
- {
- await Mapper.DeleteAsync("WHERE id = ?", id);
- }
-
- public virtual async Task> GetPagedListAsync(
- int skipCount,
- int maxResultCount,
- string sorting)
- {
- var cql = $"SELECT * FROM {typeof(TEntity).Name.ToLower()}";
- if (!string.IsNullOrWhiteSpace(sorting))
- {
- cql += $" ORDER BY {sorting}";
- }
- cql += $" LIMIT {maxResultCount} OFFSET {skipCount}";
-
- return (await Mapper.FetchAsync(cql)).ToList();
- }
- }
-}
\ No newline at end of file
diff --git a/modules/JiShe.CollectBus.Cassandra/CollectBusCassandraModule.cs b/modules/JiShe.CollectBus.Cassandra/CollectBusCassandraModule.cs
deleted file mode 100644
index bf57bce..0000000
--- a/modules/JiShe.CollectBus.Cassandra/CollectBusCassandraModule.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Microsoft.Extensions.DependencyInjection;
-using Volo.Abp;
-using Volo.Abp.Autofac;
-using Volo.Abp.Modularity;
-
-namespace JiShe.CollectBus.Cassandra
-{
- [DependsOn(
- typeof(AbpAutofacModule)
- )]
- public class CollectBusCassandraModule : AbpModule
- {
- public override Task ConfigureServicesAsync(ServiceConfigurationContext context)
- {
- Configure(context.Services.GetConfiguration().GetSection("Cassandra"));
- context.AddCassandra();
- return Task.CompletedTask;
- }
-
- public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
- {
- await context.UseCassandra();
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.Cassandra/Extensions/ServiceCollectionExtensions.cs b/modules/JiShe.CollectBus.Cassandra/Extensions/ServiceCollectionExtensions.cs
deleted file mode 100644
index c9ec0de..0000000
--- a/modules/JiShe.CollectBus.Cassandra/Extensions/ServiceCollectionExtensions.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using JiShe.CollectBus.Cassandra;
-using Volo.Abp;
-using Volo.Abp.Modularity;
-
-// ReSharper disable once CheckNamespace
-namespace Microsoft.Extensions.DependencyInjection
-{
- public static class ApplicationInitializationContextExtensions
- {
- public static async Task UseCassandra(this ApplicationInitializationContext context)
- {
- var service = context.ServiceProvider;
- var cassandraProvider = service.GetRequiredService();
- await cassandraProvider.InitClusterAndSessionAsync();
- }
- }
-
- public static class ServiceCollectionExtensions
- {
- public static void AddCassandra(this ServiceConfigurationContext context)
- {
- context.Services.AddTransient(typeof(ICassandraRepository<,>), typeof(CassandraRepository<,>));
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.Cassandra/Extensions/SessionExtension.cs b/modules/JiShe.CollectBus.Cassandra/Extensions/SessionExtension.cs
deleted file mode 100644
index dd0ff66..0000000
--- a/modules/JiShe.CollectBus.Cassandra/Extensions/SessionExtension.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-using System.Reflection;
-using System.Text;
-using Cassandra;
-using System.ComponentModel.DataAnnotations;
-using JiShe.CollectBus.Common.Attributes;
-using Volo.Abp.Data;
-
-namespace JiShe.CollectBus.Cassandra.Extensions
-{
- public static class SessionExtension
- {
- public static void CreateTable(this ISession session,string? defaultKeyspace=null) where TEntity : class
- {
- var type = typeof(TEntity);
- var tableAttribute = type.GetCustomAttribute();
- var tableName = tableAttribute?.Name ?? type.Name.ToLower();
- var tableKeyspace = session.Keyspace;
-
- var properties = type.GetProperties();
-
- // 分区键设置
- var primaryKey = properties.FirstOrDefault(p => p.GetCustomAttribute() != null);
-
- if (primaryKey == null)
- {
- throw new InvalidOperationException($"No primary key defined for type {type.Name}");
- }
-
- // 集群键设置
- var clusteringKeys = properties.Where(p => p.GetCustomAttribute() != null).Select(a=>a.Name).ToList();
- var clusteringKeyCql = string.Empty;
- if (clusteringKeys.Any())
- {
- clusteringKeyCql = $", {string.Join(", ", clusteringKeys)}";
- }
-
- var cql = new StringBuilder();
- cql.Append($"CREATE TABLE IF NOT EXISTS {tableKeyspace}.{tableName} (");
-
- foreach (var prop in properties)
- {
- var ignoreAttribute = prop.GetCustomAttribute();
- if (ignoreAttribute != null) continue;
- var columnName = prop.Name.ToLower();
- var cqlType = GetCassandraType(prop.PropertyType);
-
- cql.Append($"{columnName} {cqlType}, ");
- }
- cql.Length -= 2; // Remove last comma and space
- cql.Append($", PRIMARY KEY (({primaryKey.Name.ToLower()}){clusteringKeyCql}))");
-
- session.Execute(cql.ToString());
- }
-
- private static string GetCassandraType(Type type)
- {
- // 基础类型处理
- switch (Type.GetTypeCode(type))
- {
- case TypeCode.String: return "text";
- case TypeCode.Int32: return "int";
- case TypeCode.Int64: return "bigint";
- case TypeCode.Boolean: return "boolean";
- case TypeCode.DateTime: return "timestamp";
- case TypeCode.Byte: return "tinyint";
- }
-
- if (type == typeof(Guid)) return "uuid";
- if (type == typeof(DateTimeOffset)) return "timestamp";
- if (type == typeof(Byte[])) return "blob";
- if (type == typeof(ExtraPropertyDictionary)) return "map";
-
- // 处理集合类型
- if (type.IsGenericType)
- {
- var genericType = type.GetGenericTypeDefinition();
- var elementType = type.GetGenericArguments()[0];
-
- if (genericType == typeof(List<>))
- return $"list<{GetCassandraType(elementType)}>";
- if (genericType == typeof(HashSet<>))
- return $"set<{GetCassandraType(elementType)}>";
- if (genericType == typeof(Nullable<>))
- return GetCassandraType(elementType);
- if (genericType == typeof(Dictionary<,>))
- {
- var keyType = type.GetGenericArguments()[0];
- var valueType = type.GetGenericArguments()[1];
- return $"map<{GetCassandraType(keyType)}, {GetCassandraType(valueType)}>";
- }
- }
-
- throw new NotSupportedException($"不支持的类型: {type.Name}");
- }
-
-
- }
-}
diff --git a/modules/JiShe.CollectBus.Cassandra/ICassandraProvider.cs b/modules/JiShe.CollectBus.Cassandra/ICassandraProvider.cs
deleted file mode 100644
index 8b1f87a..0000000
--- a/modules/JiShe.CollectBus.Cassandra/ICassandraProvider.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Cassandra;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace JiShe.CollectBus.Cassandra
-{
- public interface ICassandraProvider
- {
- Cluster Instance { get;}
-
- ISession Session { get;}
-
- CassandraConfig CassandraConfig { get; }
-
- ISession GetSession(string? keyspace = null);
-
- Cluster GetCluster(Action? callback = null);
-
- void InitClusterAndSession();
-
- Task InitClusterAndSessionAsync();
- }
-}
diff --git a/modules/JiShe.CollectBus.Cassandra/ICassandraRepository.cs b/modules/JiShe.CollectBus.Cassandra/ICassandraRepository.cs
deleted file mode 100644
index 5f3b862..0000000
--- a/modules/JiShe.CollectBus.Cassandra/ICassandraRepository.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.Domain.Entities;
-
-namespace JiShe.CollectBus.Cassandra
-{
- public interface ICassandraRepository where TEntity : class
- {
- Task GetAsync(TKey id);
- Task GetAsync(string cql, params object[] args);
- Task FirstOrDefaultAsync(TKey id);
- Task FirstOrDefaultAsync(string cql, params object[] args);
- Task?> GetListAsync(string? cql = null, params object[] args);
- Task InsertAsync(TEntity entity);
- Task UpdateAsync(TEntity entity);
- Task DeleteAsync(TEntity entity);
- Task DeleteAsync(TKey id);
- Task> GetPagedListAsync(int skipCount, int maxResultCount, string sorting);
- }
-}
diff --git a/modules/JiShe.CollectBus.Cassandra/JiShe.CollectBus.Cassandra.csproj b/modules/JiShe.CollectBus.Cassandra/JiShe.CollectBus.Cassandra.csproj
deleted file mode 100644
index a3360e3..0000000
--- a/modules/JiShe.CollectBus.Cassandra/JiShe.CollectBus.Cassandra.csproj
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- net8.0
- enable
- enable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/JiShe.CollectBus.FreeRedis/CollectBusFreeRedisModule.cs b/modules/JiShe.CollectBus.FreeRedis/CollectBusFreeRedisModule.cs
deleted file mode 100644
index fb86fdd..0000000
--- a/modules/JiShe.CollectBus.FreeRedis/CollectBusFreeRedisModule.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using JiShe.CollectBus.FreeRedis.Options;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Volo.Abp.Modularity;
-
-namespace JiShe.CollectBus.FreeRedis
-{
- public class CollectBusFreeRedisModule : AbpModule
- {
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
-
- Configure(options =>
- {
- configuration.GetSection("Redis").Bind(options);
- });
-
-
- }
- }
-}
-
-
-
diff --git a/modules/JiShe.CollectBus.FreeRedis/FreeRedisProvider.cs b/modules/JiShe.CollectBus.FreeRedis/FreeRedisProvider.cs
deleted file mode 100644
index b2cf9e5..0000000
--- a/modules/JiShe.CollectBus.FreeRedis/FreeRedisProvider.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System.Diagnostics;
-using FreeRedis;
-using JiShe.CollectBus.Common.Helpers;
-using JiShe.CollectBus.FreeRedis.Options;
-using Microsoft.Extensions.Options;
-using Volo.Abp.DependencyInjection;
-
-namespace JiShe.CollectBus.FreeRedis
-{
-
- public class FreeRedisProvider : IFreeRedisProvider, ISingletonDependency
- {
-
- private readonly FreeRedisOptions _option;
-
- ///
- /// FreeRedis
- ///
- public FreeRedisProvider(IOptions options)
- {
- _option = options.Value;
- GetInstance();
- }
-
- public RedisClient Instance { get; set; } = new(string.Empty);
-
- ///
- /// 获取 FreeRedis 客户端
- ///
- ///
- public IRedisClient GetInstance()
- {
-
- var connectionString = $"{_option.Configuration},defaultdatabase={_option.DefaultDB},MaxPoolSize={_option.MaxPoolSize}";
- Instance = new RedisClient(connectionString);
- Instance.Serialize = obj => BusJsonSerializer.Serialize(obj);
- Instance.Deserialize = (json, type) => BusJsonSerializer.Deserialize(json, type);
- Instance.Notice += (s, e) => Trace.WriteLine(e.Log);
- return Instance;
- }
- }
-}
\ No newline at end of file
diff --git a/modules/JiShe.CollectBus.FreeRedis/IFreeRedisProvider.cs b/modules/JiShe.CollectBus.FreeRedis/IFreeRedisProvider.cs
deleted file mode 100644
index e9e8a40..0000000
--- a/modules/JiShe.CollectBus.FreeRedis/IFreeRedisProvider.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using FreeRedis;
-
-namespace JiShe.CollectBus.FreeRedis
-{
- public interface IFreeRedisProvider
- {
- ///
- /// 获取客户端
- ///
- ///
- RedisClient Instance { get; set; }
- }
-}
-
diff --git a/modules/JiShe.CollectBus.FreeRedis/JiShe.CollectBus.FreeRedis.csproj b/modules/JiShe.CollectBus.FreeRedis/JiShe.CollectBus.FreeRedis.csproj
deleted file mode 100644
index 92b3223..0000000
--- a/modules/JiShe.CollectBus.FreeRedis/JiShe.CollectBus.FreeRedis.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- net8.0
- enable
- enable
-
-
-
-
-
-
-
-
-
diff --git a/modules/JiShe.CollectBus.FreeRedis/Options/FreeRedisOptions.cs b/modules/JiShe.CollectBus.FreeRedis/Options/FreeRedisOptions.cs
deleted file mode 100644
index 331da88..0000000
--- a/modules/JiShe.CollectBus.FreeRedis/Options/FreeRedisOptions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-namespace JiShe.CollectBus.FreeRedis.Options
-{
- public class FreeRedisOptions
- {
- ///
- /// 连接字符串
- ///
- public string? Configuration { get; set; }
-
- ///
- /// 最大连接数
- ///
- public string? MaxPoolSize { get; set; }
-
- ///
- /// 默认数据库
- ///
- public string? DefaultDB { get; set; }
-
- ///
- /// HangfireDB
- ///
- public string? HangfireDB { get; set; }
- }
-}
-
diff --git a/modules/JiShe.CollectBus.FreeSql/CollectBusFreeSqlModule.cs b/modules/JiShe.CollectBus.FreeSql/CollectBusFreeSqlModule.cs
deleted file mode 100644
index 309e22c..0000000
--- a/modules/JiShe.CollectBus.FreeSql/CollectBusFreeSqlModule.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using FreeSql;
-using FreeSql.SqlServer;
-using Microsoft.Extensions.DependencyInjection;
-using Volo.Abp.Modularity;
-
-namespace JiShe.CollectBus.FreeSql
-{
- public class CollectBusFreeSqlModule : AbpModule
- {
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.FreeSql/DbEnum.cs b/modules/JiShe.CollectBus.FreeSql/DbEnum.cs
deleted file mode 100644
index 81bb094..0000000
--- a/modules/JiShe.CollectBus.FreeSql/DbEnum.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace JiShe.CollectBus.FreeSql
-{
- ///
- /// 数据库枚举
- ///
- public enum DbEnum
- {
- ///
- /// 微服务默认数据库,MySQL
- ///
- Default,
-
- ///
- /// 预付费数据库,SQLSERVER
- ///
- PrepayDB,
-
- ///
- /// 能耗数据库,SQLSERVER
- ///
- EnergyDB
- }
-}
diff --git a/modules/JiShe.CollectBus.FreeSql/FreeSqlProvider.cs b/modules/JiShe.CollectBus.FreeSql/FreeSqlProvider.cs
deleted file mode 100644
index e7e7191..0000000
--- a/modules/JiShe.CollectBus.FreeSql/FreeSqlProvider.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using FreeSql;
-using Microsoft.Extensions.Configuration;
-using Volo.Abp.DependencyInjection;
-
-namespace JiShe.CollectBus.FreeSql
-{
- public class FreeSqlProvider : IFreeSqlProvider, ISingletonDependency
- {
- ///
- /// Initializes a new instance of the class.
- ///
- /// The configuration.
- public FreeSqlProvider(IConfiguration configuration)
- {
- GetInstance(configuration);
- }
-
- public FreeSqlCloud Instance { get; set; } = new();
- public FreeSqlCloud GetInstance(IConfiguration configuration)
- {
- Instance = new FreeSqlCloud
- {
- DistributeTrace = log => Console.WriteLine(log.Split('\n')[0].Trim())
- };
-
- Instance.Register(DbEnum.EnergyDB, () => new FreeSqlBuilder()
- .UseConnectionString(DataType.SqlServer, configuration.GetConnectionString(DbEnum.EnergyDB.ToString()))
- .Build());
-
- Instance.Register(DbEnum.PrepayDB, () => new FreeSqlBuilder()
- .UseConnectionString(DataType.SqlServer, configuration.GetConnectionString(DbEnum.PrepayDB.ToString()))
- .Build());
- return Instance;
- }
-
- }
-}
diff --git a/modules/JiShe.CollectBus.FreeSql/IFreeSqlProvider.cs b/modules/JiShe.CollectBus.FreeSql/IFreeSqlProvider.cs
deleted file mode 100644
index e4250d6..0000000
--- a/modules/JiShe.CollectBus.FreeSql/IFreeSqlProvider.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using FreeSql;
-
-namespace JiShe.CollectBus.FreeSql
-{
- ///
- /// FreeSqlProvider服务
- ///
- public interface IFreeSqlProvider
- {
- FreeSqlCloud Instance { get; set; }
- }
-}
diff --git a/modules/JiShe.CollectBus.FreeSql/JiShe.CollectBus.FreeSql.csproj b/modules/JiShe.CollectBus.FreeSql/JiShe.CollectBus.FreeSql.csproj
deleted file mode 100644
index 9b40553..0000000
--- a/modules/JiShe.CollectBus.FreeSql/JiShe.CollectBus.FreeSql.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- net8.0
- enable
- enable
-
-
-
-
-
-
-
diff --git a/modules/JiShe.CollectBus.IoTDB/Attributes/ATTRIBUTEColumnAttribute.cs b/modules/JiShe.CollectBus.IoTDB/Attributes/ATTRIBUTEColumnAttribute.cs
deleted file mode 100644
index 7ef13f3..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Attributes/ATTRIBUTEColumnAttribute.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace JiShe.CollectBus.IoTDB.Attributes
-{
- ///
- /// Column分类标记特性(ATTRIBUTE字段),也就是属性字段
- ///
- [AttributeUsage(AttributeTargets.Property)]
- public class ATTRIBUTEColumnAttribute : System.Attribute
- {
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Attributes/FIELDColumnAttribute.cs b/modules/JiShe.CollectBus.IoTDB/Attributes/FIELDColumnAttribute.cs
deleted file mode 100644
index 43d699f..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Attributes/FIELDColumnAttribute.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace JiShe.CollectBus.IoTDB.Attributes
-{
- ///
- /// Column分类标记特性(FIELD字段),数据列字段
- ///
- [AttributeUsage(AttributeTargets.Property)]
- public class FIELDColumnAttribute : System.Attribute
- {
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Attributes/IgnoreInitTableAttribute.cs b/modules/JiShe.CollectBus.IoTDB/Attributes/IgnoreInitTableAttribute.cs
deleted file mode 100644
index bd6006c..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Attributes/IgnoreInitTableAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace JiShe.CollectBus.IoTDB.Attributes
-{
- ///
- /// 需要忽略表模型初始化,有此特性无需初始化
- ///
- [AttributeUsage(AttributeTargets.Class)]
- public class IgnoreInitTableAttribute : System.Attribute
- {
-
- public IgnoreInitTableAttribute()
- {
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Attributes/SingleMeasuringAttribute.cs b/modules/JiShe.CollectBus.IoTDB/Attributes/SingleMeasuringAttribute.cs
deleted file mode 100644
index 481bfa2..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Attributes/SingleMeasuringAttribute.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace JiShe.CollectBus.IoTDB.Attributes
-{
- ///
- /// 用于标识当前实体为单侧点模式,单侧点模式只有一个Filed标识字段,类型是Tuple,Item1=>测点名称,Item2=>测点值,泛型
- ///
- [AttributeUsage(AttributeTargets.Property)]
- public class SingleMeasuringAttribute : System.Attribute
- {
- public string FieldName { get; set;}
-
- public SingleMeasuringAttribute(string fieldName)
- {
- FieldName = fieldName;
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Attributes/TAGColumnAttribute.cs b/modules/JiShe.CollectBus.IoTDB/Attributes/TAGColumnAttribute.cs
deleted file mode 100644
index 48a3830..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Attributes/TAGColumnAttribute.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace JiShe.CollectBus.IoTDB.Attributes
-{
- ///
- /// Column分类标记特性(TAG字段),标签字段
- ///
- [AttributeUsage(AttributeTargets.Property)]
- public class TAGColumnAttribute : System.Attribute
- {
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Attributes/TableNameOrTreePathAttribute.cs b/modules/JiShe.CollectBus.IoTDB/Attributes/TableNameOrTreePathAttribute.cs
deleted file mode 100644
index 5f986b5..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Attributes/TableNameOrTreePathAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-
-namespace JiShe.CollectBus.IoTDB.Attributes
-{
- ///
- /// IoTDB实体存储路径或表名称,一般用于已经明确的存储路径或表名称,例如日志存储
- ///
- [AttributeUsage(AttributeTargets.Class)]
- public class TableNameOrTreePathAttribute : System.Attribute
- {
- public string TableNameOrTreePath { get; }
-
- public TableNameOrTreePathAttribute(string tableNameOrTreePath)
- {
- TableNameOrTreePath = tableNameOrTreePath;
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/CollectBusIoTDBModule.cs b/modules/JiShe.CollectBus.IoTDB/CollectBusIoTDBModule.cs
deleted file mode 100644
index 6d26bdc..0000000
--- a/modules/JiShe.CollectBus.IoTDB/CollectBusIoTDBModule.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using JiShe.CollectBus.IoTDB.Context;
-using JiShe.CollectBus.IoTDB.Options;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Volo.Abp.Modularity;
-
-namespace JiShe.CollectBus.IoTDB;
-
-///
-/// CollectBusIoTDBModule
-///
-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();
- }
-}
\ No newline at end of file
diff --git a/modules/JiShe.CollectBus.IoTDB/Context/IoTDBRuntimeContext.cs b/modules/JiShe.CollectBus.IoTDB/Context/IoTDBRuntimeContext.cs
deleted file mode 100644
index 7384716..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Context/IoTDBRuntimeContext.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using JiShe.CollectBus.IoTDB.Options;
-using Microsoft.Extensions.Options;
-using Volo.Abp.DependencyInjection;
-
-namespace JiShe.CollectBus.IoTDB.Context
-{
- ///
- /// IoTDB SessionPool 运行时上下文
- ///
- public class IoTDBRuntimeContext: IScopedDependency//ITransientDependency
- {
- private readonly bool _defaultValue;
-
- public IoTDBRuntimeContext(IOptions options)
- {
- _defaultValue = options.Value.UseTableSessionPoolByDefault;
- UseTableSessionPool = _defaultValue;
- }
-
- ///
- /// 存储模型切换标识,是否使用table模型存储, 默认为false,标识tree模型存储
- ///
- public bool UseTableSessionPool { get; set; }
-
- ///
- /// 重置为默认值
- ///
- public void ResetToDefault()
- {
- UseTableSessionPool = _defaultValue;
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Exceptions/IoTException.cs b/modules/JiShe.CollectBus.IoTDB/Exceptions/IoTException.cs
deleted file mode 100644
index 93bed4f..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Exceptions/IoTException.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace JiShe.CollectBus.IoTDB.Exceptions
-{
- ///
- /// IoTDB异常
- ///
- public class IoTException : Exception
- {
- public int ErrorCode { get; }
-
- public IoTException(string message, int errorCode)
- : base($"{message} (Code: {errorCode})")
- {
- ErrorCode = errorCode;
- }
- }
-}
diff --git a/modules/JiShe.CollectBus.IoTDB/Interface/IIoTDBProvider.cs b/modules/JiShe.CollectBus.IoTDB/Interface/IIoTDBProvider.cs
deleted file mode 100644
index 08454b2..0000000
--- a/modules/JiShe.CollectBus.IoTDB/Interface/IIoTDBProvider.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using JiShe.CollectBus.Common.Models;
-using JiShe.CollectBus.IoTDB.Model;
-using JiShe.CollectBus.IoTDB.Options;
-using JiShe.CollectBus.IoTDB.Provider;
-
-namespace JiShe.CollectBus.IoTDB.Interface
-{
- ///
- /// IoTDB数据源,数据库能同时存多个时序模型,但数据是完全隔离的,不能跨时序模型查询,通过连接字符串配置
- ///
- public interface IIoTDbProvider
- {
- ///
- /// 切换 SessionPool
- ///
- /// 是否使用表模型
- ///
- IIoTDbProvider GetSessionPool(bool sessionpolType);
-
- ///
- /// 插入数据
- ///
- ///
- ///
- ///
- Task InsertAsync(T entity) where T : IoTEntity;
-
- ///
- /// 批量插入数据
- ///
- ///
- ///
- ///
- Task BatchInsertAsync(IEnumerable entities) where T : IoTEntity;
-
- ///
- /// 批量插入数据
- ///
- ///
- /// 设备元数据
- ///
- ///
- Task BatchInsertAsync(DeviceMetadata deviceMetadata,IEnumerable entities) where T : IoTEntity;
-
-
- ///
- /// 删除数据
- ///
- ///
- ///
- ///
- Task