diff --git a/aspnet-core/CompanyName.ProjectName.sln b/aspnet-core/CompanyName.ProjectName.sln
index 306ada21..cb65b665 100644
--- a/aspnet-core/CompanyName.ProjectName.sln
+++ b/aspnet-core/CompanyName.ProjectName.sln
@@ -127,10 +127,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.Sha
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.Shared.Hosting.Gateways", "shared\CompanyName.ProjectName.Shared.Hosting.Gateways\CompanyName.ProjectName.Shared.Hosting.Gateways.csproj", "{C018EFF9-579E-43B3-9181-543BE95E2E03}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Cap", "frameworks\CAP\src\Lion.Abp.Cap\Lion.Abp.Cap.csproj", "{800F4482-EAC3-472B-AF07-53980D47AA41}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Extension", "frameworks\Extensions\src\Lion.Abp.Extension\Lion.Abp.Extension.csproj", "{6848FA46-EFFF-4E0C-8EAA-145D8C440333}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gateways", "gateways", "{5C304CBC-F30D-413C-A0AF-8B6814A2D4A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.WebGateway", "gateways\CompanyName.ProjectName.WebGateway\CompanyName.ProjectName.WebGateway.csproj", "{D9108313-8D05-4F5F-9AA0-B443EC3374B6}"
@@ -139,6 +135,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.Fre
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.ElasticsearchRepository", "services\src\CompanyName.ProjectName.ElasticsearchRepository\CompanyName.ProjectName.ElasticsearchRepository.csproj", "{5910B07F-1520-45D6-A15F-7A3E0698BE18}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.Extension", "frameworks\Extensions\src\CompanyName.ProjectName.Extension\CompanyName.ProjectName.Extension.csproj", "{4C65690E-2C17-46A1-BB35-A51BAB2EA3B7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.CAP", "frameworks\CAP\src\CompanyName.ProjectName.CAP\CompanyName.ProjectName.CAP.csproj", "{3C3FF821-E43D-4D58-8B3C-1E97F4518EF7}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -305,14 +305,6 @@ Global
{C018EFF9-579E-43B3-9181-543BE95E2E03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C018EFF9-579E-43B3-9181-543BE95E2E03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C018EFF9-579E-43B3-9181-543BE95E2E03}.Release|Any CPU.Build.0 = Release|Any CPU
- {800F4482-EAC3-472B-AF07-53980D47AA41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {800F4482-EAC3-472B-AF07-53980D47AA41}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {800F4482-EAC3-472B-AF07-53980D47AA41}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {800F4482-EAC3-472B-AF07-53980D47AA41}.Release|Any CPU.Build.0 = Release|Any CPU
- {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.Build.0 = Release|Any CPU
{D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -325,6 +317,14 @@ Global
{5910B07F-1520-45D6-A15F-7A3E0698BE18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5910B07F-1520-45D6-A15F-7A3E0698BE18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5910B07F-1520-45D6-A15F-7A3E0698BE18}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4C65690E-2C17-46A1-BB35-A51BAB2EA3B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4C65690E-2C17-46A1-BB35-A51BAB2EA3B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4C65690E-2C17-46A1-BB35-A51BAB2EA3B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4C65690E-2C17-46A1-BB35-A51BAB2EA3B7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C3FF821-E43D-4D58-8B3C-1E97F4518EF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C3FF821-E43D-4D58-8B3C-1E97F4518EF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C3FF821-E43D-4D58-8B3C-1E97F4518EF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C3FF821-E43D-4D58-8B3C-1E97F4518EF7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -384,11 +384,11 @@ Global
{FB1C29FF-5467-4CF0-995D-5B3F931AB135} = {8C1B8C6C-C518-4290-B070-622CCA6004DA}
{A091AE9B-3A1E-49AC-9AD5-D29310512A3D} = {6434E3F2-B352-4B30-839A-88C2BA166D96}
{C018EFF9-579E-43B3-9181-543BE95E2E03} = {6434E3F2-B352-4B30-839A-88C2BA166D96}
- {800F4482-EAC3-472B-AF07-53980D47AA41} = {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6}
- {6848FA46-EFFF-4E0C-8EAA-145D8C440333} = {C4AC9352-C9F5-4096-8D73-13638232CFB9}
{D9108313-8D05-4F5F-9AA0-B443EC3374B6} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3}
{FC30B17B-F671-4E55-90C6-9F37E40B483D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{5910B07F-1520-45D6-A15F-7A3E0698BE18} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {4C65690E-2C17-46A1-BB35-A51BAB2EA3B7} = {C4AC9352-C9F5-4096-8D73-13638232CFB9}
+ {3C3FF821-E43D-4D58-8B3C-1E97F4518EF7} = {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
diff --git a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/Lion.Abp.Cap.csproj b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj
similarity index 99%
rename from aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/Lion.Abp.Cap.csproj
rename to aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj
index 9069fa66..94ea9274 100644
--- a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/Lion.Abp.Cap.csproj
+++ b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj
@@ -1,4 +1,5 @@
+
net5.0
@@ -13,4 +14,5 @@
+
diff --git a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapConsumerServiceSelector.cs
similarity index 96%
rename from aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs
rename to aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapConsumerServiceSelector.cs
index 46bd0f9a..50bfb070 100644
--- a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs
+++ b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapConsumerServiceSelector.cs
@@ -10,11 +10,11 @@ using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Distributed;
-namespace Lion.Abp.Cap
+namespace CompanyName.ProjectName.CAP
{
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IConsumerServiceSelector))]
- public class LionAbpCapConsumerServiceSelector : ConsumerServiceSelector
+ public class ProjectNameAbpCapConsumerServiceSelector : ConsumerServiceSelector
{
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
protected IServiceProvider ServiceProvider { get; }
@@ -22,7 +22,7 @@ namespace Lion.Abp.Cap
///
/// Creates a new .
///
- public LionAbpCapConsumerServiceSelector(
+ public ProjectNameAbpCapConsumerServiceSelector(
IServiceProvider serviceProvider,
IOptions distributedEventBusOptions)
: base(serviceProvider)
diff --git a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapDistributedEventBus.cs
similarity index 96%
rename from aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs
rename to aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapDistributedEventBus.cs
index 473411d8..4e44a371 100644
--- a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs
+++ b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapDistributedEventBus.cs
@@ -13,10 +13,9 @@ using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Threading;
-
-namespace Lion.Abp.Cap
+namespace CompanyName.ProjectName.CAP
{
- public class LionAbpCapDistributedEventBus :
+ public class ProjectNameAbpCapDistributedEventBus :
EventBusBase,
IDistributedEventBus,
ISingletonDependency
@@ -27,7 +26,7 @@ namespace Lion.Abp.Cap
protected readonly ICapPublisher CapPublisher;
- public LionAbpCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory,
+ public ProjectNameAbpCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory,
IOptions distributedEventBusOptions,
ICapPublisher capPublisher,
ICurrentTenant currentTenant,
diff --git a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapModule.cs b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapModule.cs
similarity index 55%
rename from aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapModule.cs
rename to aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapModule.cs
index a6af78d7..9498a01b 100644
--- a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapModule.cs
+++ b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapModule.cs
@@ -1,10 +1,10 @@
using Volo.Abp.EventBus;
using Volo.Abp.Modularity;
-namespace Lion.Abp.Cap
+namespace CompanyName.ProjectName.CAP
{
[DependsOn(typeof(AbpEventBusModule))]
- public class LionAbpCapModule : AbpModule
+ public class ProjectNameAbpCapModule : AbpModule
{
}
}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapServiceCollectionExtensions.cs
similarity index 74%
rename from aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs
rename to aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapServiceCollectionExtensions.cs
index c7259f43..0f094cb7 100644
--- a/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs
+++ b/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/ProjectNameAbpCapServiceCollectionExtensions.cs
@@ -5,17 +5,17 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Modularity;
-namespace Lion.Abp.Cap
+namespace CompanyName.ProjectName.CAP
{
- public static class AbpCapServiceCollectionExtensions
+ public static class ProjectNameAbpCapServiceCollectionExtensions
{
public static ServiceConfigurationContext AddAbpCap(
this ServiceConfigurationContext context,
Action capAction)
{
context.Services.AddCap(capAction);
- context.Services.AddSingleton();
- context.Services.AddSingleton();
+ context.Services.AddSingleton();
+ context.Services.AddSingleton();
return context;
}
}
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/CompanyName.ProjectName.Extension.csproj
similarity index 99%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/CompanyName.ProjectName.Extension.csproj
index 8b864a73..6f0661c7 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/CompanyName.ProjectName.Extension.csproj
@@ -1,4 +1,5 @@
+
net5.0
@@ -15,4 +16,5 @@
+
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/CustomeListResultDto.cs
similarity index 89%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/CustomeListResultDto.cs
index e04b9f58..c669336e 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/CustomeListResultDto.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Lion.Abp.Extension
+namespace CompanyName.ProjectName.Extension.Customs.Dtos
{
[Serializable]
public class CustomeListResultDto
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/CustomePagedResultDto.cs
similarity index 87%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/CustomePagedResultDto.cs
index ecedba44..4365c281 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/CustomePagedResultDto.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Lion.Abp.Extension
+namespace CompanyName.ProjectName.Extension.Customs.Dtos
{
[Serializable]
public class CustomePagedResultDto : CustomeListResultDto
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/FromSelector.cs
similarity index 94%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/FromSelector.cs
index e50345ea..6ccae0dc 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/FromSelector.cs
@@ -1,4 +1,4 @@
-namespace Lion.Abp.Extension
+namespace CompanyName.ProjectName.Extension.Customs.Dtos
{
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/IdInput.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/IdInput.cs
similarity index 61%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/IdInput.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/IdInput.cs
index 36b99156..980be0a1 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/IdInput.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/IdInput.cs
@@ -1,6 +1,6 @@
using System;
-namespace CompanyName.ProjectName.Publics.Dtos
+namespace CompanyName.ProjectName.Extension.Customs.Dtos
{
public class IdInput
{
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/PagingBase.cs
similarity index 96%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/PagingBase.cs
index 1b77504a..b9b6b1dc 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Dtos/PagingBase.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-namespace Lion.Abp.Extension
+namespace CompanyName.ProjectName.Extension.Customs.Dtos
{
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Guard.cs
similarity index 99%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Guard.cs
index 4f66c17a..6d61f1db 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Guard.cs
@@ -4,7 +4,7 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
-namespace Lion.Abp.Extension
+namespace CompanyName.ProjectName.Extension.Customs
{
///
/// 参数合法性检查类
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Http/HttpClientHelper.cs
similarity index 98%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Http/HttpClientHelper.cs
index a4f23846..b2580f0c 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/Customs/Http/HttpClientHelper.cs
@@ -1,12 +1,12 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
+using Newtonsoft.Json;
-namespace Lion.Abp.Extension
+namespace CompanyName.ProjectName.Extension.Customs.Http
{
///
/// 基于IHttpClientFactory二次封装httpclient
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/BooleanExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/BooleanExtensions.cs
similarity index 90%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/BooleanExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/BooleanExtensions.cs
index 1c4b83bf..3ce60124 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/BooleanExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/BooleanExtensions.cs
@@ -1,4 +1,6 @@
-namespace System
+using System;
+
+namespace CompanyName.ProjectName.Extension.System
{
///
/// 布尔值类型的扩展辅助操作类
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Collections/Generic/CollectionExtensions.cs
similarity index 91%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Collections/Generic/CollectionExtensions.cs
index 2ce33be8..66d0c71c 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Collections/Generic/CollectionExtensions.cs
@@ -1,7 +1,9 @@
-using System.Linq;
-using Lion.Abp.Extension;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using CompanyName.ProjectName.Extension.Customs;
-namespace System.Collections.Generic
+namespace CompanyName.ProjectName.Extension.System.Collections.Generic
{
///
/// 集合扩展方法
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Collections/Generic/EnumerableExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Collections/Generic/EnumerableExtensions.cs
similarity index 97%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Collections/Generic/EnumerableExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Collections/Generic/EnumerableExtensions.cs
index 8468adca..dd06b943 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Collections/Generic/EnumerableExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Collections/Generic/EnumerableExtensions.cs
@@ -1,9 +1,10 @@
-using CompanyName.ProjectName.Extensions.Customs;
-using System.ComponentModel;
+using System;
+using System.Collections.Generic;
using System.Linq;
using System.Text;
+using CompanyName.ProjectName.Extension.Customs;
-namespace System.Collections.Generic
+namespace CompanyName.ProjectName.Extension.System.Collections.Generic
{
///
/// Enumerable集合扩展方法
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/DateTimeExtensions.cs
similarity index 96%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/DateTimeExtensions.cs
index 44d59056..983fa74d 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/DateTimeExtensions.cs
@@ -1,7 +1,8 @@
-using System.Globalization;
+using System;
+using System.Globalization;
using System.Linq;
-namespace System
+namespace CompanyName.ProjectName.Extension.System
{
///
/// 时间扩展操作类
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/EnumExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/EnumExtensions.cs
similarity index 98%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/EnumExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/EnumExtensions.cs
index b81a732c..fa5eb3da 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/EnumExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/EnumExtensions.cs
@@ -4,8 +4,9 @@ using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
+using CompanyName.ProjectName.Extension.System.Reflection;
-namespace System
+namespace CompanyName.ProjectName.Extension.System
{
///
/// 枚举的扩展辅助操作方法
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/ExceptionExtensions.cs
similarity index 95%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/ExceptionExtensions.cs
index 2662e6ce..69f19472 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/ExceptionExtensions.cs
@@ -1,7 +1,8 @@
-using System.Runtime.ExceptionServices;
+using System;
+using System.Runtime.ExceptionServices;
using System.Text;
-namespace System
+namespace CompanyName.ProjectName.Extension.System
{
///
/// 异常操作扩展
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Linq/QueryableExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Linq/QueryableExtensions.cs
similarity index 83%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Linq/QueryableExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Linq/QueryableExtensions.cs
index 6bb8e6fb..7ccc4d49 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Linq/QueryableExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Linq/QueryableExtensions.cs
@@ -1,7 +1,9 @@
-using System.Linq.Expressions;
-using CompanyName.ProjectName.Extensions.Customs;
+using System;
+using System.Linq;
+using System.Linq.Expressions;
+using CompanyName.ProjectName.Extension.Customs;
-namespace System.Linq
+namespace CompanyName.ProjectName.Extension.System.Linq
{
///
/// IQueryable集合扩展方法
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/AssemblyExtensions.cs
similarity index 83%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/AssemblyExtensions.cs
index 87a825f3..edd75ae3 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/AssemblyExtensions.cs
@@ -1,7 +1,8 @@
using System.Diagnostics;
-using Lion.Abp.Extension;
+using System.Reflection;
+using CompanyName.ProjectName.Extension.Customs;
-namespace System.Reflection
+namespace CompanyName.ProjectName.Extension.System.Reflection
{
///
/// 程序集扩展操作类
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/MemberInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/MemberInfoExtensions.cs
similarity index 95%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/MemberInfoExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/MemberInfoExtensions.cs
index c7ecd81a..6993ff1c 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/MemberInfoExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/MemberInfoExtensions.cs
@@ -1,8 +1,10 @@
-using System.ComponentModel;
+using System;
+using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
+using System.Reflection;
-namespace System.Reflection
+namespace CompanyName.ProjectName.Extension.System.Reflection
{
///
/// 成员的扩展辅助操作方法
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/MethodInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/MethodInfoExtensions.cs
similarity index 88%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/MethodInfoExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/MethodInfoExtensions.cs
index fd2ffde8..2883aa33 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/MethodInfoExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/MethodInfoExtensions.cs
@@ -1,6 +1,7 @@
-using System.Threading.Tasks;
+using System.Reflection;
+using System.Threading.Tasks;
-namespace System.Reflection
+namespace CompanyName.ProjectName.Extension.System.Reflection
{
///
/// 方法的扩展辅助操作方法
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/PropertyInfoExtensions.cs
similarity index 87%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/PropertyInfoExtensions.cs
index a2e13d28..ed3d3775 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Reflection/PropertyInfoExtensions.cs
@@ -1,6 +1,7 @@
using System.Linq;
+using System.Reflection;
-namespace System.Reflection
+namespace CompanyName.ProjectName.Extension.System.Reflection
{
///
/// 属性的扩展辅助操作方法
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/StringExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/StringExtensions.cs
similarity index 99%
rename from aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/StringExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/StringExtensions.cs
index 64b63c58..4ab1ac9f 100644
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/StringExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/StringExtensions.cs
@@ -1,14 +1,16 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
-using CompanyName.ProjectName.Extensions.Customs;
+using CompanyName.ProjectName.Extension.Customs;
+using CompanyName.ProjectName.Extension.System.Collections.Generic;
using Newtonsoft.Json;
-namespace System
+namespace CompanyName.ProjectName.Extension.System
{
///
/// 字符串类型的扩展辅助操作类
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Text/StringBuilderExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Text/StringBuilderExtensions.cs
similarity index 98%
rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Text/StringBuilderExtensions.cs
rename to aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Text/StringBuilderExtensions.cs
index 6cdd14b8..c7d43158 100644
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Text/StringBuilderExtensions.cs
+++ b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extension/System/Text/StringBuilderExtensions.cs
@@ -1,7 +1,8 @@
-using Lion.Abp.Extension;
-using System.Linq;
+using System;
+using System.Text;
+using CompanyName.ProjectName.Extension.Customs;
-namespace System.Text
+namespace CompanyName.ProjectName.Extension.System.Text
{
///
/// StringBuilder 扩展方法类
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/CompanyName.ProjectName.Extensions.csproj b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/CompanyName.ProjectName.Extensions.csproj
deleted file mode 100644
index f43fc91f..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/CompanyName.ProjectName.Extensions.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- netstandard2.0
- latest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/CustomeListResultDto.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/CustomeListResultDto.cs
deleted file mode 100644
index 4de6cd07..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/CustomeListResultDto.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace CompanyName.ProjectName.Extensions.Customs.Dtos
-{
- [Serializable]
- public class CustomeListResultDto
- {
- public IReadOnlyList Items
- {
- get { return _items ??= new List(); }
- set => _items = value;
- }
-
- private IReadOnlyList _items;
-
- public CustomeListResultDto()
- {
- }
-
- public CustomeListResultDto(IReadOnlyList items)
- {
- Items = items;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/CustomePagedResultDto.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/CustomePagedResultDto.cs
deleted file mode 100644
index c3359d7f..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/CustomePagedResultDto.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace CompanyName.ProjectName.Extensions.Customs.Dtos
-{
- [Serializable]
- public class CustomePagedResultDto : CustomeListResultDto
- {
- public long TotalCount { get; set; }
-
- public CustomePagedResultDto()
- {
- }
-
- public CustomePagedResultDto(long totalCount, IReadOnlyList items)
- : base(items)
- {
- TotalCount = totalCount;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/FromSelector.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/FromSelector.cs
deleted file mode 100644
index f9e1a102..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/FromSelector.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-namespace CompanyName.ProjectName.Extensions.Customs.Dtos
-{
-
-
- public abstract class FromSelectorBase
- {
- protected FromSelectorBase(int value, string label)
- {
- Value = value;
- Label = label;
- }
- public int Value { get; protected set; }
- public string Label { get; protected set; }
- }
-
- public abstract class FromSelectorBase
- {
- protected FromSelectorBase(TValue value, TLabel label)
- {
- Value = value;
- Label = label;
- }
-
- public TValue Value { get; protected set; }
- public TLabel Label { get; protected set; }
- }
-
- public class FromSelector : FromSelectorBase
- {
- public FromSelector(int value, string label) : base(value, label)
- {
- }
- }
-
- public class FromSelector : FromSelectorBase
- {
- public FromSelector(TValue value, TLabel label) : base(value, label)
- {
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/PagingBase.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/PagingBase.cs
deleted file mode 100644
index bc4b1ed3..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Dtos/PagingBase.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-
-namespace CompanyName.ProjectName.Extensions.Customs
-{
-
-
- ///
- /// 分页查询时使用的Dto类型
- ///
- public class PagingBase : IValidatableObject
- {
- public const int MaxPageSize = 100000;
-
- ///
- /// 当前页面.默认从1开始
- ///
- public int PageIndex { get; set; } = 1;
-
- ///
- /// 每页多少条.每页显示多少记录
- ///
- public int PageSize { get; set; } = 10;
-
- ///
- /// 跳过多少条
- ///
- public int SkipCount => (PageIndex - 1) * PageSize;
-
- protected PagingBase()
- {
- }
-
- public PagingBase(int pageIndex = 1, int pageSize = 10)
- {
- PageIndex = pageIndex;
- PageSize = pageSize;
- }
-
- public virtual IEnumerable Validate(ValidationContext validationContext)
- {
- if (PageIndex < 1)
- {
- yield return new ValidationResult(
- "起始页必须大于等于1",
- new[] { "PageIndex"}
- );
- }
-
- if (PageSize > MaxPageSize)
- {
- yield return new ValidationResult(
- $"每页最大记录数不能超过'{MaxPageSize}'",
- new[] { "PageSize"}
- );
- }
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Guard.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Guard.cs
deleted file mode 100644
index 63f911b2..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Guard.cs
+++ /dev/null
@@ -1,302 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-
-namespace CompanyName.ProjectName.Extensions.Customs
-{
- ///
- /// 参数合法性检查类
- ///
- [DebuggerStepThrough]
- public static class Guard
- {
- ///
- /// 检查参数不能为空引用,
- /// 否则抛出异常。
- ///
- ///
- /// 参数名称
- ///
- public static T NotNull(T value, string valueName)
- {
- if (null == value)
- {
- throw new ArgumentNullException(valueName);
- }
-
- return value;
- }
-
- ///
- /// 检查字符串不能为空引用或空字符串,
- /// 否则抛出异常
- /// 或异常
- /// 或异常。
- ///
- ///
- /// 参数名称。
- /// 字符串允许的最大长度。
- /// 字符串允许的最小长度。0表示不限制最小长度
- ///
- ///
- ///
- public static string NotNullOrEmpty(string value, string valueName, int maxLength = int.MaxValue,
- int minLength = 0)
- {
- if (string.IsNullOrEmpty(value))
- {
- throw new ArgumentNullException(valueName);
- }
-
- if (value.Length > maxLength)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- if (minLength > 0 && value.Length < minLength)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- return value;
- }
-
- ///
- /// 检查字符串不能为空引用或全部为空白,
- /// 否则抛出异常
- /// 或异常
- /// 或异常。
- ///
- /// 需检查的字符串
- /// 参数名称。
- /// 字符串允许的最大长度。
- /// 字符串允许的最小长度。0表示不限制最小长度
- ///
- ///
- ///
- public static string NotNullOrWhiteSpace(
- string value,
- string valueName,
- int maxLength = int.MaxValue,
- int minLength = 0)
- {
- if (string.IsNullOrWhiteSpace(value))
- {
- throw new ArgumentNullException(valueName);
- }
-
- if (value.Length > maxLength)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- if (minLength > 0 && value.Length < minLength)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- return value;
- }
-
- ///
- /// 检查字符串长度是否超过最大长度,或低于最小长度,
- /// 否则抛出异常
- /// 或异常。
- ///
- /// 需检查的字符串。
- /// 参数名称。
- /// 字符串允许的最大长度。
- /// 字符串要求的最小长度。0表示不限制最小长度
- ///
- ///
- public static string Length(string value, string valueName, int maxLength = int.MaxValue,
- int minLength = 0)
- {
- if (string.IsNullOrEmpty(value))
- {
- return value;
- }
-
- if (value.Length > maxLength)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- if (minLength > 0 && value.Length < minLength)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- return value;
- }
-
- ///
- /// 检查Guid值不能为Guid.Empty,否则抛出异常。
- ///
- ///
- /// 参数名称。
- ///
- public static Guid NotEmpty(
- Guid value,
- string valueName)
- {
- if (value == Guid.Empty)
- {
- throw new ArgumentNullException(valueName);
- }
-
- return value;
- }
-
- ///
- /// 检查集合不能为空引用或空集合,
- /// 否则抛出异常。
- ///
- /// 集合项的类型。
- ///
- /// 参数名称。
- ///
- public static void NotNullOrEmpty(
- IReadOnlyList list,
- string valueName)
- {
- if (null == list || !list.Any())
- {
- throw new ArgumentNullException(valueName);
- }
- }
-
- ///
- /// 检查参数必须小于[或可等于,参数]指定值,
- /// 否则抛出异常。
- ///
- /// 参数类型。
- ///
- /// 参数名称。
- /// 要比较的值。
- /// 是否可等于。
- ///
- public static void LessThan(
- T value,
- string valueName,
- T target,
- bool canEqual = false)
- where T : IComparable
- {
- var flag = canEqual ? value.CompareTo(target) <= 0 : value.CompareTo(target) < 0;
- if (!flag)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
- }
-
- ///
- /// 检查参数必须大于[或可等于,参数]指定值,
- /// 否则抛出异常。
- ///
- /// 参数类型。
- /// 需检查的参数。
- /// 参数名称。
- /// 要比较的值。
- /// 是否可等于。
- ///
- public static void GreaterThan(
- T value,
- string valueName,
- T target,
- bool canEqual = false)
- where T : IComparable
- {
- var flag = canEqual ? value.CompareTo(target) >= 0 : value.CompareTo(target) > 0;
- if (!flag)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
- }
-
- ///
- /// 检查参数必须在指定范围之间,否则抛出异常。
- ///
- /// 参数类型。
- /// 需检查的参数。
- /// 参数名称。
- /// 比较范围的起始值。
- /// 比较范围的结束值。
- /// 是否可等于起始值
- /// 是否可等于结束值
- /// 不在指定范围内时
- public static void Between(
- T value,
- string valueName,
- T start,
- T end,
- bool startEqual = false,
- bool endEqual = false)
- where T : IComparable
- {
- var flag = startEqual ? value.CompareTo(start) >= 0 : value.CompareTo(start) > 0;
- if (!flag)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
-
- flag = endEqual ? value.CompareTo(end) <= 0 : value.CompareTo(end) < 0;
- if (!flag)
- {
- throw new ArgumentOutOfRangeException(valueName);
- }
- }
-
- ///
- /// 检查指定路径的文件夹必须存在,
- /// 否则抛出异常
- /// 或 异常。
- ///
- /// 需检查的路径。
- /// 参数名称。
- /// 当文件夹路径为null或空时
- /// 当文件夹路径不存在时
- public static string DirectoryExists(
- string directory,
- string parameterName)
- {
- if (string.IsNullOrWhiteSpace(directory))
- {
- throw new DirectoryNotFoundException(parameterName);
- }
-
- if (!Directory.Exists(directory))
- {
- throw new DirectoryNotFoundException(directory);
- }
-
- return directory;
- }
-
- ///
- /// 检查指定路径的文件必须存在,否则抛出异常。
- ///
- ///
- /// 参数名称。
- /// 当文件路径为null或空时
- /// 当文件路径不存在时
- public static string FileExists(
- string filename,
- string valueName)
- {
- if (string.IsNullOrWhiteSpace(filename))
- {
- throw new ArgumentNullException(valueName);
- }
-
- if (!File.Exists(filename))
- {
- throw new FileNotFoundException(filename);
- }
-
- return filename;
- }
- }
-}
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Http/HttpClientHelper.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Http/HttpClientHelper.cs
deleted file mode 100644
index 4fe28cf8..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Http/HttpClientHelper.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Net.Http;
-using System.Net.Http.Headers;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CompanyName.ProjectName.Extensions.Customs.Http
-{
- ///
- /// 基于IHttpClientFactory二次封装httpclient
- ///
- public static class HttpClientHelper
- {
-
- public static async Task GetAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, Dictionary headers = null) where TResult : class
- {
- try
- {
- var client = _httpClientFactory.CreateClient(clientName);
- if (headers != null && headers.Count > 0)
- {
- foreach (var item in headers)
- {
- client.DefaultRequestHeaders.Add(item.Key, item.Value);
- }
-
- }
-
- client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache");
-
- //执行请求
- var response = await client.GetAsync(url);
- var result = await response.Content.ReadAsStringAsync();
- if (response.IsSuccessStatusCode)
- {
- if (result != null && !string.IsNullOrEmpty(result))
- return JsonConvert.DeserializeObject(result);
- else
- return default(TResult);
- }
- else
- {
- if (string.IsNullOrEmpty(result))
- result = response.ReasonPhrase;
- throw new Exception(result);
- }
- }
- catch (Exception e)
- {
- throw new Exception(e.Message);
- }
- }
-
- public static async Task PostAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, T obj, Dictionary headers = null) where T : class where TResult : class
- {
- var data = typeof(T).Name.ToLower() == "string" ? obj.ToString() : JsonConvert.SerializeObject(obj);
- var client = _httpClientFactory.CreateClient(clientName);
- if (headers != null && headers.Count > 0)
- {
- foreach (var item in headers)
- {
- client.DefaultRequestHeaders.Add(item.Key, item.Value);
- }
- }
-
- client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache");
- //post 参数
- var content = new StringContent(data, Encoding.UTF8, "application/json");
- //执行请求
- var response = await client.PostAsync(url, content);
-
- var result = await response.Content.ReadAsStringAsync();
- if (response.IsSuccessStatusCode)
- {
- if (result != null && !string.IsNullOrEmpty(result))
- return JsonConvert.DeserializeObject(result);
- else
- return default(TResult);
- }
- else
- {
- if (string.IsNullOrEmpty(result))
- result = response.ReasonPhrase;
-
- throw new Exception(result);
- }
- }
-
- public static async Task PutAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, T obj, Dictionary headers = null) where T : class where TResult : class
- {
- var data = typeof(T).Name.ToLower() == "string" ? obj.ToString() : JsonConvert.SerializeObject(obj);
- var client = _httpClientFactory.CreateClient(clientName);
- if (headers != null && headers.Count > 0)
- {
- foreach (var item in headers)
- {
- client.DefaultRequestHeaders.Add(item.Key, item.Value);
- }
- }
-
- client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache");
- //post 参数
- var content = new StringContent(data, Encoding.UTF8, "application/json");
- //执行请求
- var response = await client.PutAsync(url, content);
-
- var result = await response.Content.ReadAsStringAsync();
- if (response.IsSuccessStatusCode)
- {
- if (result != null && !string.IsNullOrEmpty(result))
- return JsonConvert.DeserializeObject(result);
- else
- return default(TResult);
- }
- else
- {
- if (string.IsNullOrEmpty(result))
- result = response.ReasonPhrase;
-
- throw new Exception(result);
- }
- }
-
- public static async Task DeleteAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, Dictionary headers = null) where TResult : class
- {
- try
- {
- var client = _httpClientFactory.CreateClient(clientName);
- if (headers != null && headers.Count > 0)
- {
- foreach (var item in headers)
- {
- client.DefaultRequestHeaders.Add(item.Key, item.Value);
- }
- }
-
- client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache");
-
- //执行请求
- var response = await client.DeleteAsync(url);
- var result = await response.Content.ReadAsStringAsync();
- if (response.IsSuccessStatusCode)
- {
- if (result != null && !string.IsNullOrEmpty(result))
- return JsonConvert.DeserializeObject(result);
- else
- return default(TResult);
- }
- else
- {
- if (string.IsNullOrEmpty(result))
- result = response.ReasonPhrase;
- throw new Exception(result);
- }
- }
- catch (Exception e)
- {
- throw new Exception(e.Message);
- }
- }
- }
-}
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Http/HttpClientNameConsts.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Http/HttpClientNameConsts.cs
deleted file mode 100644
index 7d1f2e37..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Customs/Http/HttpClientNameConsts.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Threading.Tasks;
-
-namespace CompanyName.ProjectName.Extensions.Customs.Http
-{
- public static class HttpClientNameConsts
- {
- ///
- /// 身份验证中心
- ///
- public static string Sts = "Sts";
- }
-}
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Collections/Generic/CollectionExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Collections/Generic/CollectionExtensions.cs
deleted file mode 100644
index 5053a9d4..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Collections/Generic/CollectionExtensions.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-using System.Linq;
-using CompanyName.ProjectName.Extensions.Customs;
-
-namespace System.Collections.Generic
-{
- ///
- /// 集合扩展方法
- ///
- public static class CollectionExtensions
- {
- ///
- /// 如果条件成立,添加项
- ///
- public static void AddIf(this ICollection collection, T value, bool flag)
- {
- Guard.NotNull(collection, nameof(collection));
- if (flag)
- {
- collection.Add(value);
- }
- }
-
- ///
- /// 如果条件成立,添加项
- ///
- public static void AddIf(this ICollection collection, T value, Func func)
- {
- Guard.NotNull(collection, nameof(collection));
- if (func())
- {
- collection.Add(value);
- }
- }
-
- ///
- /// 获取对象,不存在对使用委托添加对象
- ///
- public static T GetOrAdd(this ICollection collection, Func selector, Func factory)
- {
- Guard.NotNull(collection, nameof(collection));
- T item = collection.FirstOrDefault(selector);
- if (item == null)
- {
- item = factory();
- collection.Add(item);
- }
-
- return item;
- }
-
- ///
- /// 判断集合是否为null或空集合
- ///
- public static bool IsNullOrEmpty(this ICollection collection)
- {
- return collection == null || collection.Count == 0;
- }
-
- ///
- /// 交换两项的位置
- ///
- public static void Swap(this List list, int index1, int index2)
- {
- Guard.Between(index1, nameof(index1), 0, list.Count, true);
- Guard.Between(index2, nameof(index2), 0, list.Count, true);
-
- if (index1 == index2)
- {
- return;
- }
-
- T tmp = list[index1];
- list[index1] = list[index2];
- list[index2] = tmp;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/DateTimeExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/DateTimeExtensions.cs
deleted file mode 100644
index 44d59056..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/DateTimeExtensions.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System.Globalization;
-using System.Linq;
-
-namespace System
-{
- ///
- /// 时间扩展操作类
- ///
- public static class DateTimeExtensions
- {
- ///
- /// 当前时间是否周末
- ///
- /// 时间点
- ///
- public static bool IsWeekend(this DateTime dateTime)
- {
- DayOfWeek[] weeks = { DayOfWeek.Saturday, DayOfWeek.Sunday };
- return weeks.Contains(dateTime.DayOfWeek);
- }
-
- ///
- /// 当前时间是否工作日
- ///
- /// 时间点
- ///
- public static bool IsWeekday(this DateTime dateTime)
- {
- DayOfWeek[] weeks = { DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday };
- return weeks.Contains(dateTime.DayOfWeek);
- }
-
- ///
- /// 获取时间相对唯一字符串
- ///
- ///
- /// 是否使用毫秒
- ///
- public static string ToUniqueString(this DateTime dateTime, bool millisecond = false)
- {
- var seconds = dateTime.Hour * 3600 + dateTime.Minute * 60 + dateTime.Second;
- var value = $"{dateTime:yyyy}{dateTime.DayOfYear}{seconds}";
- if (millisecond)
- {
- return value + dateTime.ToString("fff");
- }
-
- return value;
- }
-
- ///
- /// 将时间转换为JS时间格式(Date.getTime())
- ///
- ///
- /// 是否使用毫秒
- public static string ToJsGetTime(this DateTime dateTime, bool millisecond = true)
- {
- var utc = dateTime.ToUniversalTime();
- var span = utc.Subtract(new DateTime(1970, 1, 1));
- return Math.Round(millisecond ? span.TotalMilliseconds : span.TotalSeconds).ToString(CultureInfo.InvariantCulture);
- }
-
- ///
- /// 将JS时间格式的数值转换为时间
- ///
- public static DateTime FromJsGetTime(this long jsTime)
- {
- var length = jsTime.ToString().Length;
- if (!(length == 10 || length == 13))
- {
- throw new ArgumentOutOfRangeException(null, "JS时间数值的长度不正确,必须为10位或13位");
- }
- var start = new DateTime(1970, 1, 1);
- var result = length == 10 ? start.AddSeconds(jsTime) : start.AddMilliseconds(jsTime);
- return result.ToUniversalTime();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/ExceptionExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/ExceptionExtensions.cs
deleted file mode 100644
index 2662e6ce..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/ExceptionExtensions.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using System.Runtime.ExceptionServices;
-using System.Text;
-
-namespace System
-{
- ///
- /// 异常操作扩展
- ///
- public static class ExceptionExtensions
- {
- ///
- /// 格式化异常消息
- ///
- /// 异常对象
- /// 是否隐藏异常规模信息
- /// 格式化后的异常信息字符串
- public static string FormatMessage(this Exception e, bool isHideStackTrace = false)
- {
- var sb = new StringBuilder();
- var count = 0;
- var appString = string.Empty;
- while (e != null)
- {
- if (count > 0)
- {
- appString += " ";
- }
- sb.AppendLine($"{appString}异常消息:{e.Message}");
- sb.AppendLine($"{appString}异常类型:{e.GetType().FullName}");
- sb.AppendLine($"{appString}异常方法:{(e.TargetSite == null ? null : e.TargetSite.Name)}");
- sb.AppendLine($"{appString}异常源:{e.Source}");
- if (!isHideStackTrace && e.StackTrace != null)
- {
- sb.AppendLine($"{appString}异常堆栈:{e.StackTrace}");
- }
- if (e.InnerException != null)
- {
- sb.AppendLine($"{appString}内部异常:");
- count++;
- e = e.InnerException;
- }
- }
- return sb.ToString();
- }
-
- ///
- /// 将异常重新抛出
- ///
- public static void ReThrow(this Exception exception)
- {
- ExceptionDispatchInfo.Capture(exception).Throw();
- }
-
- ///
- /// 如果条件成立,则抛出异常
- ///
- public static void ThrowIf(this Exception exception, bool isThrow)
- {
- if (isThrow)
- {
- throw exception;
- }
- }
-
- ///
- /// 如果条件成立,则抛出异常
- ///
- public static void ThrowIf(this Exception exception, Func isThrowFunc)
- {
- if (isThrowFunc())
- {
- throw exception;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/AssemblyExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/AssemblyExtensions.cs
deleted file mode 100644
index 8fb5147a..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/AssemblyExtensions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Diagnostics;
-using CompanyName.ProjectName.Extensions.Customs;
-
-namespace System.Reflection
-{
- ///
- /// 程序集扩展操作类
- ///
- public static class AssemblyExtensions
- {
- ///
- /// 获取程序集的产品版本
- ///
- public static string GetProductVersion(this Assembly assembly)
- {
- Guard.NotNull(assembly, nameof(assembly));
- var info = FileVersionInfo.GetVersionInfo(assembly.Location);
- var version = info.ProductVersion;
- if (version.Contains("+"))
- {
- version = version.ReplaceRegex(@"\+(\w+)?", "");
- }
- return version;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/PropertyInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/PropertyInfoExtensions.cs
deleted file mode 100644
index a2e13d28..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Reflection/PropertyInfoExtensions.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Linq;
-
-namespace System.Reflection
-{
- ///
- /// 属性的扩展辅助操作方法
- ///
- public static class PropertyInfoExtensions
- {
- ///
- /// 返回当前属性信息是否为virtual
- ///
- public static bool IsVirtual(this PropertyInfo property)
- {
- var accessor = property.GetAccessors().FirstOrDefault();
- if (accessor == null)
- {
- return false;
- }
-
- return accessor.IsVirtual && !accessor.IsFinal;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Text/StringBuilderExtensions.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Text/StringBuilderExtensions.cs
deleted file mode 100644
index 52158f67..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/System/Text/StringBuilderExtensions.cs
+++ /dev/null
@@ -1,241 +0,0 @@
-using CompanyName.ProjectName.Extensions.Customs;
-using System.Linq;
-
-namespace System.Text
-{
- ///
- /// StringBuilder 扩展方法类
- ///
- public static class StringBuilderExtensions
- {
- ///
- /// 去除开头的空格
- ///
- ///
- /// 返回修改后的StringBuilder,主要用于链式操作
- public static StringBuilder TrimStart(this StringBuilder stringBuilder)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
-
- return stringBuilder.TrimStart(' ');
- }
-
- ///
- /// 去除开头的指定
- ///
- ///
- /// 要去掉的
- ///
- public static StringBuilder TrimStart(this StringBuilder stringBuilder, char c)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
-
- if (stringBuilder.Length == 0)
- return stringBuilder;
- while (c.Equals(stringBuilder[0]))
- {
- stringBuilder.Remove(0, 1);
- }
-
- return stringBuilder;
- }
-
- ///
- /// 去除开头的指定字符数组
- ///
- ///
- /// 要去掉的字符数组
- ///
- public static StringBuilder TrimStart(this StringBuilder stringBuilder, char[] chars)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
- Guard.NotNull(chars, nameof(chars));
-
- return stringBuilder.TrimStart(new string(chars));
- }
-
- ///
- /// 去除开头的指定的
- ///
- ///
- /// 要去掉的
- ///
- public static StringBuilder TrimStart(this StringBuilder stringBuilder, string str)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
-
- if (string.IsNullOrEmpty(str)
- || stringBuilder.Length == 0
- || str.Length > stringBuilder.Length)
- {
- return stringBuilder;
- }
-
- while (stringBuilder.SubString(0, str.Length).Equals(str))
- {
- stringBuilder.Remove(0, str.Length);
- if (str.Length > stringBuilder.Length)
- {
- break;
- }
- }
-
- return stringBuilder;
- }
-
- ///
- /// 去除StringBuilder结尾的空格
- ///
- /// StringBuilder
- /// 返回修改后的StringBuilder,主要用于链式操作
- public static StringBuilder TrimEnd(this StringBuilder stringBuilder)
- {
- return stringBuilder.TrimEnd(' ');
- }
-
- ///
- /// 去除结尾指定字符
- ///
- ///
- /// 要去掉的字符
- ///
- public static StringBuilder TrimEnd(this StringBuilder stringBuilder, char c)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
- if (stringBuilder.Length == 0)
- {
- return stringBuilder;
- }
-
- while (c.Equals(stringBuilder[stringBuilder.Length - 1]))
- {
- stringBuilder.Remove(stringBuilder.Length - 1, 1);
- }
-
- return stringBuilder;
- }
-
- ///
- /// 去除结尾指定字符数组
- ///
- ///
- /// 要去除的字符数组
- ///
- public static StringBuilder TrimEnd(this StringBuilder stringBuilder, char[] chars)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
- Guard.NotNull(chars, nameof(chars));
-
- return stringBuilder.TrimEnd(new string(chars));
- }
-
- ///
- /// 去除结尾指定字符串
- ///
- ///
- /// 要去除的字符串
- ///
- public static StringBuilder TrimEnd(this StringBuilder stringBuilder, string str)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
- if (string.IsNullOrEmpty(str)
- || stringBuilder.Length == 0
- || str.Length > stringBuilder.Length)
- {
- return stringBuilder;
- }
- while (stringBuilder.SubString(stringBuilder.Length - str.Length, str.Length).Equals(str))
- {
- stringBuilder.Remove(stringBuilder.Length - str.Length, str.Length);
- if (stringBuilder.Length < str.Length)
- {
- break;
- }
- }
-
- return stringBuilder;
- }
-
- ///
- /// 去除StringBuilder两端的空格
- ///
- /// StringBuilder
- /// 返回修改后的StringBuilder,主要用于链式操作
- public static StringBuilder Trim(this StringBuilder stringBuilder)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
-
- if (stringBuilder.Length == 0)
- return stringBuilder;
- return stringBuilder.TrimEnd().TrimStart();
- }
-
- ///
- /// 返回从起始位置指定长度的字符串
- ///
- ///
- /// 起始位置
- /// 长度
- /// 字符串
- /// 超出字符串索引长度异常
- public static string SubString(this StringBuilder stringBuilder, int start, int length)
- {
- Guard.NotNull(stringBuilder, nameof(stringBuilder));
-
- if (start + length > stringBuilder.Length)
- {
- throw new IndexOutOfRangeException("超出字符串索引长度");
- }
-
- var cs = new char[length];
- for (var i = 0; i < length; i++)
- {
- cs[i] = stringBuilder[start + i];
- }
-
- return new string(cs);
- }
-
- public static StringBuilder AppendLineWithControlChar(this StringBuilder stringBuilder, StringBuilder sb, string newLine)
- {
- stringBuilder = AppendWithControlChar(stringBuilder, sb.ToString());
- return stringBuilder.Append(newLine);
- }
-
- public static StringBuilder AppendLineWithControlChar(this StringBuilder stringBuilder, string str, string newLine)
- {
- stringBuilder = AppendWithControlChar(stringBuilder, str);
- return stringBuilder.Append(newLine);
- }
-
- public static StringBuilder AppendWithControlChar(this StringBuilder stringBuilder, StringBuilder sb)
- {
- return AppendWithControlChar(stringBuilder, sb.ToString());
- }
-
- public static StringBuilder AppendWithControlChar(this StringBuilder stringBuilder, string str)
- {
- if (str.Contains('\b'))
- {
- foreach (var c in str)
- {
- if (c == '\b')
- {
- stringBuilder.Length--;
- }
- else
- {
- stringBuilder.Append(c);
- }
- }
- }
- else
- {
- stringBuilder.Append(str);
- }
-
- return stringBuilder;
- }
-
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Volo/Abp/BaseAbpModule.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Volo/Abp/BaseAbpModule.cs
deleted file mode 100644
index 2e9c837d..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Volo/Abp/BaseAbpModule.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Volo.Abp.Autofac;
-using Volo.Abp.AutoMapper;
-using Volo.Abp.Domain;
-using Volo.Abp.Json;
-using Volo.Abp.Modularity;
-using Volo.Abp.ObjectMapping;
-using Volo.Abp.Validation;
-
-namespace CompanyName.ProjectName.Extensions.Volo.Abp
-{
- [DependsOn(typeof(AbpAutofacModule))]
- [DependsOn(typeof(AbpJsonModule))]
- [DependsOn(typeof(AbpValidationModule))]
- [DependsOn(typeof(AbpDddDomainModule))]
- [DependsOn(typeof(AbpAutoMapperModule))]
- [DependsOn(typeof(AbpObjectMappingModule))]
- public class BaseAbpModule:AbpModule
- {
-
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Volo/Abp/BaseDomainService.cs b/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Volo/Abp/BaseDomainService.cs
deleted file mode 100644
index 178f0812..00000000
--- a/aspnet-core/frameworks/Extensions/src/CompanyName.ProjectName.Extensions/Volo/Abp/BaseDomainService.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using Microsoft.Extensions.DependencyInjection;
-using Volo.Abp.Domain.Services;
-using Volo.Abp.EventBus.Distributed;
-using Volo.Abp.ObjectMapping;
-using Volo.Abp.Uow;
-
-namespace CompanyName.ProjectName.Extensions.Volo.Abp
-{
- public abstract class BaseDomainService : DomainService
- {
- protected Type ObjectMapperContext { get; set; }
-
- ///
- /// 工作单元管理器
- ///
- protected IUnitOfWorkManager UnitOfWorkManager =>
- LazyServiceProvider.LazyGetRequiredService();
-
- ///
- /// 分布式事件总线
- ///
- protected IDistributedEventBus DistributedEventBus =>
- LazyServiceProvider.LazyGetRequiredService();
-
- ///
- /// 对象映射器
- ///
- protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService(provider =>
- ObjectMapperContext == null
- ? provider.GetRequiredService()
- : (IObjectMapper) provider.GetRequiredService(
- typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext)));
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs
deleted file mode 100644
index fc4b3eff..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace Lion.Abp.Extension
-{
- public class IdInput
- {
- public Guid Id { get; set; }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs
deleted file mode 100644
index 1c4b83bf..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace System
-{
- ///
- /// 布尔值类型的扩展辅助操作类
- ///
- public static class BooleanExtensions
- {
- ///
- /// 把布尔值转换为小写字符串
- ///
- public static string ToLower(this bool value)
- {
- return value.ToString().ToLower();
- }
-
- ///
- /// 如果条件成立,则抛出异常
- ///
- public static void TrueThrow(this bool flag, Exception exception)
- {
- if (flag)
- {
- throw exception;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs
deleted file mode 100644
index 53b28bc3..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs
+++ /dev/null
@@ -1,199 +0,0 @@
-using System.Linq;
-using System.Text;
-using Lion.Abp.Extension;
-namespace System.Collections.Generic
-{
- ///
- /// Enumerable集合扩展方法
- ///
- public static class EnumerableExtensions
- {
- /// 断言集合中的元素符合指定表达式,否则抛出异常。
- /// 集合项类型
- /// 源集合
- /// 元素判断表达式
- /// 异常选择器
- /// 筛选过的集合
- public static IEnumerable Assert(this IEnumerable source, Func predicate,
- Func errorSelector = null)
- {
- foreach (var item in source)
- {
- var success = predicate(item);
- if (!success)
- {
- throw errorSelector?.Invoke(item) ??
- new InvalidOperationException("集合中包含无效的元素。");
- }
-
- yield return item;
- }
- }
-
- ///
- /// 打乱一个集合的项顺序,将一个集合洗牌
- ///
- public static IEnumerable Shuffle(this IEnumerable source)
- {
- // ReSharper disable PossibleMultipleEnumeration
-
- Guard.NotNull(source, nameof(source));
- return source.OrderBy(m => Guid.NewGuid());
-
- // ReSharper restore PossibleMultipleEnumeration
- }
-
- ///
- /// 将集合展开并分别转换成字符串,再以指定的分隔符衔接,拼成一个字符串返回。默认分隔符为逗号。
- ///
- /// 要处理的集合
- /// 分隔符,默认为逗号
- /// 拼接后的字符串
- public static string ExpandAndToString(this IEnumerable collection, string separator = ",")
- {
- return collection.ExpandAndToString(item => item?.ToString() ?? string.Empty, separator);
- }
-
- ///
- /// 循环集合的每一项,调用委托生成字符串,返回合并后的字符串。默认分隔符为逗号
- ///
- /// 待处理的集合
- /// 单个集合项的转换委托
- /// 分隔符,默认为逗号
- /// 泛型类型
- ///
- public static string ExpandAndToString(
- this IEnumerable collection,
- Func itemFormatFunc,
- string separator = ",")
- {
- collection = collection as IList ?? collection.ToList();
- Guard.NotNull(itemFormatFunc, nameof(itemFormatFunc));
-
- if (!collection.Any())
- {
- return string.Empty;
- }
-
- var sb = new StringBuilder();
- var i = 0;
- var count = collection.Count();
- foreach (var item in collection)
- {
- if (i == count - 1)
- {
- sb.Append(itemFormatFunc(item));
- }
- else
- {
- sb.Append(itemFormatFunc(item) + separator);
- }
-
- i++;
- }
-
- return sb.ToString();
- }
-
- ///
- /// 集合是否为空
- ///
- /// 要处理的集合
- /// 动态类型
- /// 为空返回True,不为空返回False
- public static bool IsEmpty(this IEnumerable collection)
- {
- collection = collection as IList ?? collection.ToList();
- return !collection.Any();
- }
-
- ///
- /// 根据第三方条件是否为真来决定是否执行指定条件的查询
- ///
- /// 要查询的源
- /// 查询条件
- /// 第三方条件
- /// 动态类型
- /// 查询的结果
- public static IEnumerable WhereIf(this IEnumerable source, Func predicate, bool condition)
- {
- Guard.NotNull(predicate, nameof(predicate));
- source = source as IList ?? source.ToList();
-
- return condition ? source.Where(predicate) : source;
- }
-
- ///
- /// 将字符串集合按指定前缀排序
- ///
- public static IEnumerable OrderByPrefixes(this IEnumerable source, Func keySelector,
- params string[] prefixes)
- {
- var all = source.OrderBy(keySelector).ToList();
- var result = new List();
- foreach (var prefix in prefixes)
- {
- var tmpList = all.Where(m => keySelector(m).StartsWith(prefix)).OrderBy(keySelector).ToList();
- all = all.Except(tmpList).ToList();
- result.AddRange(tmpList);
- }
-
- result.AddRange(all);
- return result;
- }
-
- ///
- /// 根据指定条件返回集合中不重复的元素
- ///
- /// 动态类型
- /// 动态筛选条件类型
- /// 要操作的源
- /// 重复数据筛选条件
- /// 不重复元素的集合
- public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector)
- {
- Guard.NotNull(keySelector, nameof(keySelector));
- source = source as IList ?? source.ToList();
-
- return source.GroupBy(keySelector).Select(group => group.First());
- }
-
- #region Internal
-
- internal static int? TryGetCollectionCount(this IEnumerable source)
- {
- switch (source)
- {
- case null:
- throw new ArgumentNullException(nameof(source));
- case ICollection collection:
- return collection.Count;
- case IReadOnlyCollection collection:
- return collection.Count;
- default:
- return null;
- }
- }
-
- static int CountUpTo(this IEnumerable source, int max)
- {
- if (source == null) throw new ArgumentNullException(nameof(source));
- if (max < 0)
- throw new ArgumentOutOfRangeException(nameof(max), "最大计数参数不能为负。");
-
- var count = 0;
-
- using (var e = source.GetEnumerator())
- {
- while (count < max && e.MoveNext())
- {
- count++;
- }
- }
-
- return count;
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs
deleted file mode 100644
index b81a732c..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs
+++ /dev/null
@@ -1,199 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Linq;
-using System.Reflection;
-
-namespace System
-{
- ///
- /// 枚举的扩展辅助操作方法
- ///
- public static class EnumExtensions
- {
- ///
- /// 获取枚举项上的特性的文字描述
- ///
- ///
- ///
- public static string ToDescription(this Enum value)
- {
- var type = value.GetType();
- var member = type.GetMember(value.ToString()).FirstOrDefault();
-
- return member != null ? member.GetDescription() : value.ToString();
- }
-
- ///
- /// 枚举遍历,返回枚举的名称、值、特性
- ///
- /// 枚举类型
- /// 回调函数
- private static void Each(this Type enumType, Action action)
- {
- if (enumType.BaseType != typeof(Enum))
- {
- return;
- }
- var arr = Enum.GetValues(enumType);
- foreach (var name in arr)
- {
- var currentEnum = Enum.Parse(enumType, name.ToString());
- var value = Convert.ToInt32(Enum.Parse(enumType, name.ToString()));
- var fieldInfo = enumType.GetField(name.ToString());
- var description = "";
- if (fieldInfo != null)
- {
- var attr = Attribute.GetCustomAttribute(fieldInfo,
- typeof(DescriptionAttribute), false) as DescriptionAttribute;
- if (attr != null)
- {
- description = attr.Description;
- }
- }
- action(name.ToString(), value.ToString(), description, currentEnum);
- }
- }
-
- ///
- /// 根据枚举类型值返回枚举定义Description属性
- ///
- ///
- ///
- ///
- public static string ToEnumDescriptionString(this short value, Type enumType)
- {
- var nvc = new NameValueCollection();
- var typeDescription = typeof(DescriptionAttribute);
- var fields = enumType.GetFields();
- foreach (var field in fields)
- {
- if (field.FieldType.IsEnum)
- {
- var strValue = ((int)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)).ToString();
- var arr = field.GetCustomAttributes(typeDescription, true);
- string strText;
- if (arr.Length > 0)
- {
- var aa = (DescriptionAttribute)arr[0];
- strText = aa.Description;
- }
- else
- {
- strText = "";
- }
- nvc.Add(strValue, strText);
- }
- }
- return nvc[value.ToString()];
- }
-
- ///
- /// 将指定枚举转换为字典.
- /// 枚举的Description为字典的Key,枚举的Value为字典的Value
- ///
- /// 指定枚举
- private static List> GetEnumTypeValueList()
- {
- var items = new List>();
- typeof(T).Each((name, value, description, enumObj) =>
- items.Add(new KeyValuePair(description, value)));
- return items;
- }
-
- ///
- /// 将指定枚举转换为字典.
- /// 枚举的Description为字典的Key,枚举为字典的Value
- ///
- /// 指定枚举
- private static List> GetEnumTypeList()
- {
- var items = new List>();
- typeof(T).Each((name, value, description, enumObj) =>
- items.Add(new KeyValuePair(description, (T)enumObj)));
- return items;
- }
-
- ///
- /// 将指定枚举转换为字典.
- /// 枚举的Description为字典的Key,枚举的Name为字典的Value
- ///
- /// 指定枚举
- public static List> GetEnumTypeDescriptionNameList()
- {
- var items = new List>();
- typeof(T).Each((name, value, description, enumObj) => items.Add(new KeyValuePair(description, name)));
- return items;
- }
-
- ///
- /// 将指定枚举转换为字典.
- /// 枚举的Name为字典的Key,枚举的Description为字典的Value
- ///
- /// 指定枚举
- public static List> GetEnumTypeValueNameList()
- {
- var items = new List>();
- typeof(T).Each((name, value, description, enumObj) => items.Add(new KeyValuePair(name, description)));
- return items;
- }
-
- ///
- /// 将指定枚举转换为字典.
- /// 枚举的Name为字典的Key,枚举的Description为字典的Value
- ///
- /// 指定枚举
- public static List> GetStringKeyValueList() where TModel : Enum
- {
- var keyValuePairList = new List>();
- var values = Enum.GetValues(typeof(TModel));
- var modelArray = new TModel[values.Length];
- values.CopyTo(modelArray, 0);
- foreach (TModel model in modelArray)
- keyValuePairList.Add(new KeyValuePair(model.ToString(), model.ToString()));
- return keyValuePairList;
- }
-
- ///
- /// 将指定枚举转换为字典.
- /// 枚举的Description为字典的Key,枚举为字典的Value
- ///
- /// 指定枚举
- public static List> GetEnumKeyValueList() where TModel : Enum
- {
- var enumTypeList = GetEnumTypeList();
- var keyValuePairList = new List>();
- foreach (KeyValuePair keyValuePair in enumTypeList)
- keyValuePairList.Add(new KeyValuePair(keyValuePair.Key, keyValuePair.Value));
- return keyValuePairList;
- }
-
- public static List> GetEntityDoubleStringKeyValueList()
- {
- var enumTypeList = GetEnumTypeValueList();
- var keyValuePairList = new List>();
- foreach (KeyValuePair keyValuePair in enumTypeList)
- keyValuePairList.Add(new KeyValuePair(keyValuePair.Key, keyValuePair.Value));
- return keyValuePairList;
- }
-
- public static List> GetEntityStringIntKeyValueList()
- {
- List> enumTypeList = GetEnumTypeValueList();
- List> keyValuePairList = new List>();
- foreach (KeyValuePair keyValuePair in enumTypeList)
- keyValuePairList.Add(new KeyValuePair(keyValuePair.Key, Convert.ToInt32(keyValuePair.Value)));
- return keyValuePairList;
- }
-
- public static List> GetEntityDoubleIntKeyValueList()
- {
- List> enumTypeList = GetEnumTypeValueList();
- List> keyValuePairList = new List>();
- foreach (KeyValuePair keyValuePair in enumTypeList)
- keyValuePairList.Add(new KeyValuePair(Convert.ToInt32(keyValuePair.Key), Convert.ToInt32(keyValuePair.Value)));
- return keyValuePairList;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs
deleted file mode 100644
index 51edf5d6..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System.Linq.Expressions;
-using Lion.Abp.Extension;
-
-namespace System.Linq
-{
- ///
- /// IQueryable集合扩展方法
- ///
- public static class QueryableExtensions
- {
- ///
- /// 根据第三方条件是否为真来决定是否执行指定条件的查询
- ///
- /// 要查询的源
- /// 查询条件
- /// 第三方条件
- /// 动态类型
- /// 查询的结果
- public static IQueryable WhereIf(this IQueryable source, Expression> predicate,
- bool condition)
- {
- Guard.NotNull(source, nameof(source));
- Guard.NotNull(predicate, nameof(predicate));
-
- return condition ? source.Where(predicate) : source;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs
deleted file mode 100644
index c7ecd81a..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-
-namespace System.Reflection
-{
- ///
- /// 成员的扩展辅助操作方法
- ///
- public static class MemberInfoExtensions
- {
- ///
- /// 获取成员元数据的Description特性描述信息。
- ///
- /// 成员元数据对象。
- /// 是否搜索成员的继承链以查找描述特性。
- /// 返回Description特性描述信息,如不存在则返回成员的名称。
- public static string GetDescription(this MemberInfo member, bool inherit = true)
- {
- var desc = member.GetAttribute(inherit);
- if (desc != null)
- {
- return desc.Description;
- }
-
- var displayName = member.GetAttribute(inherit);
- if (displayName != null)
- {
- return displayName.DisplayName;
- }
-
- var display = member.GetAttribute(inherit);
- return display != null ? display.Name : member.Name;
- }
-
- ///
- /// 检查指定指定类型成员中是否存在指定的Attribute特性。
- ///
- /// 要检查的Attribute特性类型。
- /// 要检查的类型成员
- /// 是否从继承中查找
- /// 是否存在
- public static bool HasAttribute(this MemberInfo memberInfo, bool inherit = true) where T : Attribute
- {
- return memberInfo.IsDefined(typeof(T), inherit);
- }
-
- ///
- /// 从类型成员获取指定Attribute特性
- ///
- /// Attribute特性类型
- /// 类型类型成员
- /// 是否从继承中查找
- /// 存在返回第一个,不存在返回null
- public static T GetAttribute(this MemberInfo memberInfo, bool inherit = true) where T : Attribute
- {
- var attributes = memberInfo.GetCustomAttributes(typeof(T), inherit);
- return attributes.FirstOrDefault() as T;
- }
-
- ///
- /// 从类型成员获取指定Attribute特性。
- ///
- /// Attribute特性类型。
- /// 类型类型成员。
- /// 是否从继承中查找。
- /// 返回所有指定Attribute特性的数组。
- public static T[] GetAttributes(this MemberInfo memberInfo, bool inherit = true) where T : Attribute
- {
- return memberInfo.GetCustomAttributes(typeof(T), inherit).Cast().ToArray();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs
deleted file mode 100644
index fd2ffde8..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.Threading.Tasks;
-
-namespace System.Reflection
-{
- ///
- /// 方法的扩展辅助操作方法
- ///
- public static class MethodInfoExtensions
- {
- ///
- /// 方法是否是异步
- ///
- public static bool IsAsync(this MethodInfo method)
- {
- return (method.ReturnType == typeof(Task<>)
- || method.ReturnType.IsGenericType
- && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>))
- || method.ReturnType == typeof(Task);
- }
-
- ///
- /// 返回当前方法信息是否是重写方法
- ///
- /// 要判断的方法信息
- /// 是否是重写方法
- public static bool IsOverridden(this MethodInfo method)
- {
- return method.GetBaseDefinition().DeclaringType != method.DeclaringType;
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs
deleted file mode 100644
index 31d80338..00000000
--- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs
+++ /dev/null
@@ -1,981 +0,0 @@
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Web;
-using Lion.Abp.Extension;
-using Newtonsoft.Json;
-
-namespace System
-{
- ///
- /// 字符串类型的扩展辅助操作类
- ///
- [DebuggerStepThrough]
- public static class StringExtensions
- {
- #region 正则表达式
-
- ///
- /// 指示所指定的正则表达式在指定的输入字符串中是否找到了匹配项
- ///
- /// 要搜索匹配项的字符串
- /// 要匹配的正则表达式模式
- /// 是否包含,否则全匹配
- /// 如果正则表达式找到匹配项,则为 true;否则,为 false
- public static bool IsMatch(this string value, string pattern, bool isContains = true)
- {
- if (value == null)
- {
- return false;
- }
-
- return isContains
- ? Regex.IsMatch(value, pattern)
- : Regex.Match(value, pattern).Success;
- }
-
- ///
- /// 在指定的输入字符串中搜索指定的正则表达式的第一个匹配项
- ///
- /// 要搜索匹配项的字符串
- /// 要匹配的正则表达式模式
- /// 一个对象,包含有关匹配项的信息
- public static string Match(this string value, string pattern)
- {
- if (value == null)
- {
- return null;
- }
-
- return Regex.Match(value, pattern).Value;
- }
-
- ///
- /// 在指定的输入字符串中匹配并替换符合指定正则表达式的子串
- ///
- public static string ReplaceRegex(this string value, string pattern, string replacement)
- {
- if (value == null)
- {
- return null;
- }
-
- return Regex.Replace(value, pattern, replacement);
- }
-
- ///
- /// 在指定的输入字符串中搜索指定的正则表达式的所有匹配项的字符串集合
- ///
- /// 要搜索匹配项的字符串
- /// 要匹配的正则表达式模式
- /// 一个集合,包含有关匹配项的字符串值
- public static IEnumerable Matches(this string value, string pattern)
- {
- if (value == null)
- {
- return new string[] { };
- }
-
- var matches = Regex.Matches(value, pattern);
- return from Match match in matches select match.Value;
- }
-
- ///
- /// 在指定的输入字符串中匹配第一个数字字符串
- ///
- public static string MatchFirstNumber(this string value)
- {
- var matches = Regex.Matches(value, @"\d+");
- if (matches.Count == 0)
- {
- return string.Empty;
- }
-
- return matches[0].Value;
- }
-
- ///
- /// 在指定字符串中匹配最后一个数字字符串
- ///
- public static string MatchLastNumber(this string value)
- {
- var matches = Regex.Matches(value, @"\d+");
- if (matches.Count == 0)
- {
- return string.Empty;
- }
-
- return matches[matches.Count - 1].Value;
- }
-
- ///
- /// 在指定字符串中匹配所有数字字符串
- ///
- public static IEnumerable MatchNumbers(this string value)
- {
- return Matches(value, @"\d+");
- }
-
- ///
- /// 检测指定字符串中是否包含数字
- ///
- public static bool IsMatchNumber(this string value)
- {
- return IsMatch(value, @"\d");
- }
-
- ///
- /// 检测指定字符串是否全部为数字并且长度等于指定长度
- ///
- public static bool IsMatchNumber(this string value, int length)
- {
- var regex = new Regex(@"^\d{" + length + "}$");
- return regex.IsMatch(value);
- }
-
- ///
- /// 截取指定字符串之间的字符串
- ///
- ///
- /// 起始字符串
- /// 结束字符串,可多个
- /// 返回的中间字符串
- public static string Substring(this string source, string startString, params string[] endStrings)
- {
- if (source.IsMissing())
- {
- return string.Empty;
- }
-
- var startIndex = 0;
- if (!string.IsNullOrEmpty(startString))
- {
- startIndex = source.IndexOf(startString, StringComparison.OrdinalIgnoreCase);
- if (startIndex < 0)
- {
- throw new InvalidOperationException($"在源字符串中无法找到“{startString}”的子串位置");
- }
-
- startIndex += startString.Length;
- }
-
- var endIndex = source.Length;
- endStrings = endStrings.OrderByDescending(m => m.Length).ToArray();
- foreach (var endString in endStrings)
- {
- if (string.IsNullOrEmpty(endString))
- {
- endIndex = source.Length;
- break;
- }
-
- endIndex = source.IndexOf(endString, startIndex, StringComparison.OrdinalIgnoreCase);
- if (endIndex < 0 || endIndex < startIndex)
- {
- continue;
- }
-
- break;
- }
-
- if (endIndex < 0 || endIndex < startIndex)
- {
- throw new InvalidOperationException($"在源字符串中无法找到“{endStrings.ExpandAndToString()}”的子串位置");
- }
-
- var length = endIndex - startIndex;
-
- return source.Substring(startIndex, length);
- }
-
- ///
- /// 用正则表达式截取字符串
- ///
- public static string Substring2(this string source, string startString, string endString)
- {
- return source.Substring2(startString, endString, false);
- }
-
- ///
- /// 用正则表达式截取字符串
- ///
- public static string Substring2(this string source, string startString, string endString, bool containsEmpty)
- {
- if (source.IsMissing())
- {
- return string.Empty;
- }
-
- var inner = containsEmpty ? "\\s\\S" : "\\S";
- var result = source.Match($"(?<={startString})([{inner}]+?)(?={endString})");
- return result.IsMissing() ? null : result;
- }
-
- ///
- /// 是否电子邮件
- ///
- public static bool IsEmail(this string value)
- {
- const string pattern = @"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$";
- return value.IsMatch(pattern);
- }
-
- ///
- /// 是否是IP地址
- ///
- public static bool IsIpAddress(this string value)
- {
- const string pattern =
- @"^((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))$";
- return value.IsMatch(pattern);
- }
-
- ///
- /// 是否是整数
- ///
- public static bool IsNumeric(this string value)
- {
- const string pattern = @"^\-?[0-9]+$";
- return value.IsMatch(pattern);
- }
-
- ///
- /// 是否是Unicode字符串
- ///
- public static bool IsUnicode(this string value)
- {
- const string pattern = @"^[\u4E00-\u9FA5\uE815-\uFA29]+$";
- return value.IsMatch(pattern);
- }
-
- ///
- /// 是否Url字符串
- ///
- public static bool IsUrl(this string value)
- {
- try
- {
- if (string.IsNullOrEmpty(value) || value.Contains(' '))
- {
- return false;
- }
-
- var uri = new Uri(value);
- return true;
- }
- catch (Exception)
- {
- return false;
- }
- }
-
- ///
- /// 是否身份证号,验证如下3种情况:
- /// 1.身份证号码为15位数字;
- /// 2.身份证号码为18位数字;
- /// 3.身份证号码为17位数字+1个字母
- ///
- public static bool IsIdentityCardId(this string value)
- {
- if (value.Length != 15 && value.Length != 18)
- {
- return false;
- }
-
- Regex regex;
- string[] array;
- if (value.Length == 15)
- {
- regex = new Regex(@"^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})_");
- if (!regex.Match(value).Success)
- {
- return false;
- }
-
- array = regex.Split(value);
- return DateTime.TryParse(string.Format("{0}-{1}-{2}", "19" + array[2], array[3], array[4]), out _);
- }
-
- regex = new Regex(@"^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9Xx])$");
- if (!regex.Match(value).Success)
- {
- return false;
- }
-
- array = regex.Split(value);
- if (!DateTime.TryParse(string.Format("{0}-{1}-{2}", array[2], array[3], array[4]), out _))
- {
- return false;
- }
-
- //校验最后一位
- var chars = value.ToCharArray().Select(m => m.ToString()).ToArray();
- int[] weights = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
- var sum = 0;
- for (var i = 0; i < 17; i++)
- {
- var num = int.Parse(chars[i]);
- sum += num * weights[i];
- }
-
- var mod = sum % 11;
- var vCode = "10X98765432"; // 检验码字符串
- var last = vCode.ToCharArray().ElementAt(mod).ToString();
- return chars.Last().ToUpper() == last;
- }
-
- ///
- /// 是否手机号码
- ///
- ///
- /// 是否按严格格式验证
- public static bool IsMobileNumber(this string value, bool isRestrict = false)
- {
- var pattern = isRestrict ? @"^[1][3-8]\d{9}$" : @"^[1]\d{10}$";
- return value.IsMatch(pattern);
- }
-
- #endregion
-
- #region 其他操作
-
- ///
- /// 判断指定的字符串不是 null、空。
- ///
- public static bool IsNotNullOrEmpty(this string str)
- {
- return !string.IsNullOrEmpty(str);
- }
-
- ///
- /// 判断指定的字符串不是 null、空或者仅由空白字符组成
- ///
- public static bool IsNotNullOrWhiteSpace(this string str)
- {
- return !string.IsNullOrWhiteSpace(str);
- }
-
- ///
- /// 指示指定的字符串是 null、空或者仅由空白字符组成
- ///
- public static bool IsMissing(this string value)
- {
- return string.IsNullOrWhiteSpace(value);
- }
-
- ///
- /// 为指定格式的字符串填充相应对象来生成字符串
- ///
- /// 字符串格式,占位符以{n}表示
- /// 用于填充占位符的参数
- /// 格式化后的字符串
- public static string FormatWith(this string format, params object[] args)
- {
- Guard.NotNull(format, nameof(format));
- return string.Format(CultureInfo.CurrentCulture, format, args);
- }
-
- ///
- /// 将字符串反转
- ///
- /// 要反转的字符串
- public static string ReverseString(this string value)
- {
- Guard.NotNull(value, nameof(value));
- return new string(value.Reverse().ToArray());
- }
-
- ///
- /// 单词复数变成单数形式
- ///
- ///
- ///
- public static string ToSingular(this string word)
- {
- var plural1 = new Regex("(?[^aeiou])ies$");
- var plural2 = new Regex("(?[aeiou]y)s$");
- var plural3 = new Regex("(?[sxzh])es$");
- var plural4 = new Regex("(?[^sxzhyu])s$");
-
- if (plural1.IsMatch(word))
- {
- return plural1.Replace(word, "${keep}y");
- }
-
- if (plural2.IsMatch(word))
- {
- return plural2.Replace(word, "${keep}");
- }
-
- if (plural3.IsMatch(word))
- {
- return plural3.Replace(word, "${keep}");
- }
-
- if (plural4.IsMatch(word))
- {
- return plural4.Replace(word, "${keep}");
- }
-
- return word;
- }
-
- ///
- /// 单词单数变成复数形式
- ///
- ///
- ///
- public static string ToPlural(this string word)
- {
- var plural1 = new Regex("(?[^aeiou])y$");
- var plural2 = new Regex("(?[aeiou]y)$");
- var plural3 = new Regex("(?[sxzh])$");
- var plural4 = new Regex("(?[^sxzhy])$");
-
- if (plural1.IsMatch(word))
- {
- return plural1.Replace(word, "${keep}ies");
- }
-
- if (plural2.IsMatch(word))
- {
- return plural2.Replace(word, "${keep}s");
- }
-
- if (plural3.IsMatch(word))
- {
- return plural3.Replace(word, "${keep}es");
- }
-
- if (plural4.IsMatch(word))
- {
- return plural4.Replace(word, "${keep}s");
- }
-
- return word;
- }
-
- ///
- /// 以指定字符串作为分隔符将指定字符串分隔成数组
- ///
- /// 要分割的字符串
- /// 字符串类型的分隔符
- /// 是否移除数据中元素为空字符串的项
- /// 分割后的数据
- public static string[] Split(this string value, string strSplit, bool removeEmptyEntries = false)
- {
- return value.Split(new[] {strSplit},
- removeEmptyEntries ? StringSplitOptions.RemoveEmptyEntries : StringSplitOptions.None);
- }
-
- ///
- /// 支持汉字的字符串长度,汉字长度计为2
- ///
- /// 参数字符串
- /// 当前字符串的长度,汉字长度为2
- public static int TextLength(this string value)
- {
- var ascii = new ASCIIEncoding();
- var tempLen = 0;
- var bytes = ascii.GetBytes(value);
- foreach (var b in bytes)
- {
- if (b == 63)
- {
- tempLen += 2;
- }
- else
- {
- tempLen += 1;
- }
- }
-
- return tempLen;
- }
-
- ///
- /// 将JSON字符串还原为对象
- ///
- /// 要转换的目标类型
- /// JSON字符串
- ///
- public static T FromJsonString(this string json)
- {
- Guard.NotNull(json, nameof(json));
- return JsonConvert.DeserializeObject(json);
- }
-
- ///
- /// 将JSON字符串还原为对象
- ///
- /// JSON字符串
- /// 数据类型
- public static object FromJsonString(this string json, Type type)
- {
- return JsonConvert.DeserializeObject(json, type);
- }
-
- ///
- /// 给URL添加查询参数
- ///
- /// URL字符串
- /// 要添加的参数,形如:"id=1,cid=2"
- ///
- public static string AddUrlQuery(this string url, params string[] queries)
- {
- foreach (var query in queries)
- {
- if (!url.Contains("?"))
- {
- url += "?";
- }
- else if (!url.EndsWith("&"))
- {
- url += "&";
- }
-
- url += query;
- }
-
- return url;
- }
-
- ///
- /// 获取URL中指定参数的值,不存在返回空字符串
- ///
- public static string GetUrlQuery(this string url, string key)
- {
- var uri = new Uri(url);
- var query = uri.Query;
- if (string.IsNullOrEmpty(query))
- {
- return string.Empty;
- }
-
- query = query.TrimStart('?');
- var dict = (from m in query.Split("&", true)
- let strs = m.Split("=")
- select new KeyValuePair(strs[0], strs[1]))
- .ToDictionary(m => m.Key, m => m.Value);
- if (dict.ContainsKey(key))
- {
- return dict[key];
- }
-
- return string.Empty;
- }
-
- ///
- /// 给URL添加 # 参数
- ///
- /// URL字符串
- /// 要添加的参数
- ///
- public static string AddHashFragment(this string url, string query)
- {
- Guard.NotNull(url, nameof(url));
- Guard.NotNull(query, nameof(query));
-
- if (!url.Contains("#"))
- {
- url += "#";
- }
-
- return url + query;
- }
-
-
-
- ///
- /// 将[]数组转换为Base64字符串
- ///
- public static string ToBase64String(this byte[] bytes)
- {
- Guard.NotNull(bytes, nameof(bytes));
-
- return Convert.ToBase64String(bytes);
- }
-
- ///
- /// 将字符串转换为Base64字符串,默认编码为
- ///
- /// 正常的字符串
- /// 编码
- /// Base64字符串
- public static string ToBase64String(this string source, Encoding encoding = null)
- {
- Guard.NotNull(source, nameof(source));
-
- if (encoding == null) encoding = Encoding.UTF8;
-
- return Convert.ToBase64String(encoding.GetBytes(source));
- }
-
- ///
- /// 将Base64字符串转换为正常字符串,默认编码为
- ///
- /// Base64字符串
- /// 编码
- /// 正常字符串
- public static string FromBase64String(this string base64String, Encoding encoding = null)
- {
- Guard.NotNull(base64String, nameof(base64String));
-
- if (encoding == null) encoding = Encoding.UTF8;
-
- var bytes = Convert.FromBase64String(base64String);
- return encoding.GetString(bytes);
- }
-
- ///
- /// 将字符串进行UrlDecode解码
- ///
- /// 待UrlDecode解码的字符串
- /// UrlDecode解码后的字符串
- public static string ToUrlDecode(this string source)
- {
- Guard.NotNull(source, nameof(source));
-
- return HttpUtility.UrlDecode(source);
- }
-
- ///
- /// 将字符串进行UrlEncode编码
- ///
- /// 待UrlEncode编码的字符串
- /// UrlEncode编码后的字符串
- public static string ToUrlEncode(this string source)
- {
- Guard.NotNull(source, nameof(source));
-
- return HttpUtility.UrlEncode(source);
- }
-
- ///
- /// 将字符串进行HtmlDecode解码
- ///
- /// 待HtmlDecode解码的字符串
- /// HtmlDecode解码后的字符串
- public static string ToHtmlDecode(this string source)
- {
- Guard.NotNull(source, nameof(source));
-
- return HttpUtility.HtmlDecode(source);
- }
-
- ///
- /// 将字符串进行HtmlEncode编码
- ///
- /// 待HtmlEncode编码的字符串
- /// HtmlEncode编码后的字符串
- public static string ToHtmlEncode(this string source)
- {
- Guard.NotNull(source, nameof(source));
-
- return HttpUtility.HtmlEncode(source);
- }
-
- ///
- /// 将字符串转换为十六进制字符串,默认编码为
- ///
- public static string ToHexString(this string source, Encoding encoding = null)
- {
- Guard.NotNull(source, nameof(source));
-
- if (encoding == null) encoding = Encoding.UTF8;
-
- byte[] bytes = encoding.GetBytes(source);
- return bytes.ToHexString();
- }
-
- ///
- /// 将十六进制字符串转换为常规字符串,默认编码为
- ///
- public static string FromHexString(this string hexString, Encoding encoding = null)
- {
- Guard.NotNull(hexString, nameof(hexString));
-
- if (encoding == null) encoding = Encoding.UTF8;
-
- var bytes = hexString.ToHexBytes();
- return encoding.GetString(bytes);
- }
-
- ///
- /// 将byte[]编码为十六进制字符串
- ///
- /// byte[]数组
- /// 十六进制字符串
- public static string ToHexString(this byte[] bytes)
- {
- Guard.NotNull(bytes, nameof(bytes));
-
- return bytes.Aggregate(string.Empty, (current, t) => current + t.ToString("X2"));
- }
-
- ///
- /// 将十六进制字符串转换为byte[]
- ///
- /// 十六进制字符串
- /// byte[]数组
- public static byte[] ToHexBytes(this string hexString)
- {
- hexString = hexString ?? "";
- hexString = hexString.Replace(" ", "");
- byte[] bytes = new byte[hexString.Length / 2];
- for (int i = 0; i < bytes.Length; i++)
- {
- bytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
- }
-
- return bytes;
- }
-
- ///
- /// 将字符串进行Unicode编码,变成形如“\u7f16\u7801”的形式
- ///
- /// 要进行编号的字符串
- public static string ToUnicodeString(this string source)
- {
- Guard.NotNull(source, nameof(source));
-
- var regex = new Regex(@"[^\u0000-\u00ff]");
- return regex.Replace(source, m => string.Format(@"\u{0:x4}", (short) m.Value[0]));
- }
-
- ///
- /// 将形如“\u7f16\u7801”的Unicode字符串解码
- ///
- public static string FromUnicodeString(this string source)
- {
- var regex = new Regex(@"\\u([0-9a-fA-F]{4})", RegexOptions.Compiled);
- return regex.Replace(source,
- m =>
- {
- short s;
- if (short.TryParse(m.Groups[1].Value, NumberStyles.HexNumber, CultureInfo.InstalledUICulture,
- out s))
- {
- return "" + (char) s;
- }
-
- return m.Value;
- });
- }
-
- ///
- /// 将驼峰字符串按单词拆分并转换成小写,再以特定字符串分隔
- ///
- /// 待转换的字符串
- /// 分隔符字符
- ///
- public static string UpperToLowerAndSplit(this string str, string splitStr = "-")
- {
- if (string.IsNullOrEmpty(str))
- {
- return str;
- }
-
- List words = new List();
- while (str.Length > 0)
- {
- char c = str.FirstOrDefault(char.IsUpper);
- if (c == default(char))
- {
- words.Add(str);
- break;
- }
-
- int upperIndex = str.IndexOf(c);
- if (upperIndex < 0) //admin
- {
- return str;
- }
-
- if (upperIndex > 0) //adminAdmin
- {
- string first = str.Substring(0, upperIndex);
- words.Add(first);
- str = str.Substring(upperIndex, str.Length - upperIndex);
- continue;
- }
-
- str = char.ToLower(str[0]) + str.Substring(1, str.Length - 1);
- }
-
- return words.ExpandAndToString(splitStr);
- }
-
- ///
- /// 将驼峰字符串的第一个字符小写
- ///
- public static string LowerFirstChar(this string str)
- {
- if (string.IsNullOrEmpty(str) || !char.IsUpper(str[0]))
- {
- return str;
- }
-
- if (str.Length == 1)
- {
- return char.ToLower(str[0]).ToString();
- }
-
- return char.ToLower(str[0]) + str.Substring(1, str.Length - 1);
- }
-
- ///
- /// 将小驼峰字符串的第一个字符大写
- ///
- public static string UpperFirstChar(this string str)
- {
- if (string.IsNullOrEmpty(str) || !char.IsLower(str[0]))
- {
- return str;
- }
-
- if (str.Length == 1)
- {
- return char.ToUpper(str[0]).ToString();
- }
-
- return char.ToUpper(str[0]) + str.Substring(1, str.Length - 1);
- }
-
- ///
- /// 计算当前字符串与指定字符串的编辑距离(相似度)
- ///
- /// 源字符串
- /// 目标字符串
- /// 输出相似度
- /// 是否忽略大小写
- /// 编辑距离
- public static int LevenshteinDistance(this string source, string target, out double similarity,
- bool ignoreCase = false)
- {
- if (string.IsNullOrEmpty(source))
- {
- if (string.IsNullOrEmpty(target))
- {
- similarity = 1;
- return 0;
- }
-
- similarity = 0;
- return target.Length;
- }
-
- if (string.IsNullOrEmpty(target))
- {
- similarity = 0;
- return source.Length;
- }
-
- string from, to;
- if (ignoreCase)
- {
- from = source;
- to = target;
- }
- else
- {
- from = source.ToLower();
- to = source.ToLower();
- }
-
- int m = from.Length, n = to.Length;
- int[,] mn = new int[m + 1, n + 1];
- for (int i = 0; i <= m; i++)
- {
- mn[i, 0] = i;
- }
-
- for (int j = 1; j <= n; j++)
- {
- mn[0, j] = j;
- }
-
- for (int i = 1; i <= m; i++)
- {
- char c = from[i - 1];
- for (int j = 1; j <= n; j++)
- {
- if (c == to[j - 1])
- {
- mn[i, j] = mn[i - 1, j - 1];
- }
- else
- {
- mn[i, j] = Math.Min(mn[i - 1, j - 1], Math.Min(mn[i - 1, j], mn[i, j - 1])) + 1;
- }
- }
- }
-
- int maxLength = Math.Max(m, n);
- similarity = (double) (maxLength - mn[m, n]) / maxLength;
- return mn[m, n];
- }
-
- ///
- /// 计算两个字符串的相似度,应用公式:相似度=kq*q/(kq*q+kr*r+ks*s)(kq>0,kr>=0,ka>=0)
- /// 其中,q是字符串1和字符串2中都存在的单词的总数,s是字符串1中存在,字符串2中不存在的单词总数,r是字符串2中存在,字符串1中不存在的单词总数. kq,kr和ka分别是q,r,s的权重,根据实际的计算情况,我们设kq=2,kr=ks=1.
- ///
- /// 源字符串
- /// 目标字符串
- /// 是否忽略大小写
- /// 字符串相似度
- public static double GetSimilarityWith(this string source, string target, bool ignoreCase = false)
- {
- if (string.IsNullOrEmpty(source) && string.IsNullOrEmpty(target))
- {
- return 1;
- }
-
- if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(target))
- {
- return 0;
- }
-
- const double kq = 2, kr = 1, ks = 1;
- char[] sourceChars = source.ToCharArray(), targetChars = target.ToCharArray();
-
- //获取交集数量
- int q = sourceChars.Intersect(targetChars).Count(), s = sourceChars.Length - q, r = targetChars.Length - q;
- return kq * q / (kq * q + kr * r + ks * s);
- }
-
- ///
- /// 标准化Path字符串,将 \\ 转换为 /
- ///
- /// Path字符串
- public static string NormalizePath(this string path)
- {
- return path.Replace('\\', '/');
- }
-
- ///
- /// (Pascal) 命名法 的字符串 改为 短横线分隔式命名
- /// 例如UserName => user-name
- ///
- public static string PascalToKebabCase(this string value)
- {
- if (string.IsNullOrEmpty(value))
- {
- return value;
- }
-
- return Regex.Replace(
- value,
- "(?
-
+
+
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs
index 45796b9c..a6c5e2ff 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Exceptions;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs
index c7af3e3a..5ba89893 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs
@@ -1,5 +1,5 @@
using System;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs;
using Volo.Abp.Domain.Entities.Auditing;
namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Aggregates
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs
index 39248d69..ac574573 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs
@@ -25,7 +25,6 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries
public async Task FindByIdAsync(
Guid id,
- bool includeDetails = true,
CancellationToken cancellationToken = default)
{
var cacheKey = DataDictionaryDto.CalculateCacheKey(id, null);
@@ -33,7 +32,7 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries
async () =>
{
var entity =
- await _dataDictionaryRepository.FindByIdAsync(id, includeDetails,
+ await _dataDictionaryRepository.FindByIdAsync(id, true,
cancellationToken);
return ObjectMapper.Map(entity);
}, token: cancellationToken);
@@ -41,7 +40,6 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries
public async Task FindByCodeAsync(
string code,
- bool includeDetails = true,
CancellationToken cancellationToken = default)
{
var cacheKey = DataDictionaryDto.CalculateCacheKey(null, code);
@@ -49,7 +47,7 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries
async () =>
{
var entity =
- await _dataDictionaryRepository.FindByCodeAsync(code, includeDetails,
+ await _dataDictionaryRepository.FindByCodeAsync(code, true,
cancellationToken);
return ObjectMapper.Map(entity);
}, token: cancellationToken);
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaries/EfCoreDataDictionaryRepository.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaries/EfCoreDataDictionaryRepository.cs
index d89c82e8..5db4a74d 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaries/EfCoreDataDictionaryRepository.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaries/EfCoreDataDictionaryRepository.cs
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Linq.Dynamic.Core;
using System.Threading;
using System.Threading.Tasks;
using CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Aggregates;
using CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore;
+using CompanyName.ProjectName.Extension.System;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests/DataDictionaries/DataDictionaryManager_Tests.cs b/aspnet-core/modules/DataDictionaryManagement/test/CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests/DataDictionaries/DataDictionaryManager_Tests.cs
index 11ffc118..236d6c75 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests/DataDictionaries/DataDictionaryManager_Tests.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/test/CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests/DataDictionaries/DataDictionaryManager_Tests.cs
@@ -20,8 +20,7 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries
public async Task Test_FindByIdAsync_Ok()
{
var entity =
- await _dataDictionaryManager.FindByIdAsync(DataDictionaryManagementConsts.SeedDataDictionaryId,
- true);
+ await _dataDictionaryManager.FindByIdAsync(DataDictionaryManagementConsts.SeedDataDictionaryId);
entity.DisplayText.ShouldBe("性别");
entity.Details.Count.ShouldBe(3);
entity.Details.FirstOrDefault(e => e.Code == "None").IsEnabled.ShouldBeFalse();
@@ -32,7 +31,7 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries
[Fact]
public async Task Test_FindByCodeAsync_Ok()
{
- var entity = await _dataDictionaryManager.FindByCodeAsync("Gender", true);
+ var entity = await _dataDictionaryManager.FindByCodeAsync("Gender");
entity.DisplayText.ShouldBe("性别");
entity.Details.Count.ShouldBe(3);
diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs
index 44650c06..ab4ba06e 100644
--- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs
+++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs
@@ -1,4 +1,5 @@
-using Lion.Abp.Extension;
+
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.NotificationManagement.Notifications.Dtos
{
diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj
index 72da3aa1..ce6ba795 100644
--- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj
+++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj
@@ -1,6 +1,6 @@
-
+
net5.0
@@ -9,22 +9,24 @@
-
-
+
+
-
+
-
-
+
+
-
+
+
+
diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs
index 1a523686..c369812e 100644
--- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs
+++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs
@@ -2,9 +2,10 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
+using CompanyName.ProjectName.Extension.Customs;
using Volo.Abp.Domain.Entities.Auditing;
using CompanyName.ProjectName.NotificationManagement.Notifications.DistributedEvents;
-using Lion.Abp.Extension;
+
namespace CompanyName.ProjectName.NotificationManagement.Notifications
{
@@ -109,7 +110,8 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications
public void AddNotificationSubscription(Guid notificationSubscriptionId, Guid receiveId)
{
if (NotificationSubscriptions.Any(e => e.ReceiveId == receiveId)) return;
- NotificationSubscriptions.Add(new NotificationSubscription(notificationSubscriptionId, receiveId));
+ NotificationSubscriptions.Add(
+ new NotificationSubscription(notificationSubscriptionId, receiveId));
}
///
@@ -117,7 +119,8 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications
///
///
///
- public void AddBroadCastNotificationSubscription(Guid notificationSubscriptionId, Guid receiveId)
+ public void AddBroadCastNotificationSubscription(Guid notificationSubscriptionId,
+ Guid receiveId)
{
if (NotificationSubscriptions.Any(e => e.ReceiveId == receiveId))
{
diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj
index b551db93..f07c4792 100644
--- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj
+++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj
@@ -35,7 +35,8 @@
-
+
+
diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs
index 9754e084..1214f82a 100644
--- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs
+++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs
@@ -29,10 +29,10 @@ using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.Modularity;
using Volo.Abp.Swashbuckle;
using System.Threading.Tasks;
+using CompanyName.ProjectName.CAP;
using CompanyName.ProjectName.Extensions;
using CompanyName.ProjectName.MultiTenancy;
using CompanyName.ProjectName.Swaggers;
-using Lion.Abp.Cap;
using Savorboard.CAP.InMemoryMessageQueue;
using Serilog;
using Swashbuckle.AspNetCore.SwaggerUI;
@@ -54,7 +54,7 @@ namespace CompanyName.ProjectName
typeof(AbpAccountWebModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpBackgroundJobsHangfireModule),
- typeof(LionAbpCapModule),
+ typeof(ProjectNameAbpCapModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(SharedHostingMicroserviceModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs
index b1d49036..24f047da 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs
@@ -1,6 +1,6 @@
using System;
using System.Net;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.AuditLogs
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/ElasticSearchs/ICompanyNameProjectNameLogAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/ElasticSearchs/ICompanyNameProjectNameLogAppService.cs
index 913fddd4..6b3955ff 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/ElasticSearchs/ICompanyNameProjectNameLogAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/ElasticSearchs/ICompanyNameProjectNameLogAppService.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.ElasticsearchRepository.Dto;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Services;
namespace CompanyName.ProjectName.ElasticSearchs
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs
index 5dc1df33..55c1d440 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.IdentityServers.Dtos
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs
index d9732c48..fe22cd48 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServers.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs
index 3c65039b..9afb0fea 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs
index 3678b9bc..bbe4137b 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs
index 9335d6e0..d4020ce5 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.IdentityServers.Clients
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs
index 2f79cc37..33bdee9b 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs
index eb9ee854..14c62d25 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs
index ceb21f4c..489d6c34 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs
index 7fc664e0..e8882166 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.Roles.Dtos
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/IRoleAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/IRoleAppService.cs
index 6d2b8f46..31c7aa65 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/IRoleAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/IRoleAppService.cs
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
using CompanyName.ProjectName.Roles.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Identity;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs
index c346671f..7fddec37 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.Tenants.Dtos
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs
index 37eae17f..97feb8cb 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs
@@ -1,4 +1,4 @@
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.Users.Dtos
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/IUserAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/IUserAppService.cs
index a6764867..9c02e754 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/IUserAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/IUserAppService.cs
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
using CompanyName.ProjectName.Users.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Identity;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/ElasticSearchs/CompanyNameProjectNameLogAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/ElasticSearchs/CompanyNameProjectNameLogAppService.cs
index c1d8a987..2968d0b7 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/ElasticSearchs/CompanyNameProjectNameLogAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/ElasticSearchs/CompanyNameProjectNameLogAppService.cs
@@ -1,7 +1,7 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.ElasticsearchRepository;
using CompanyName.ProjectName.ElasticsearchRepository.Dto;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.ElasticSearchs
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs
index c5f26935..3be58e0f 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs
@@ -2,7 +2,7 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServer;
using CompanyName.ProjectName.IdentityServers.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.IdentityServer.ApiResources;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs
index bcde6994..aae9cd39 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServer;
using CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.IdentityServer.ApiScopes;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs
index 46beee61..b8236b7c 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServer;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.IdentityServer.Clients;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs
index 35777900..654f8ef2 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServer;
using CompanyName.ProjectName.IdentityServers.IdentityResources;
using CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.IdentityServer.IdentityResources;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/Roles/RoleAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/Roles/RoleAppService.cs
index e25e240b..27dd0a38 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/Roles/RoleAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/Roles/RoleAppService.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CompanyName.ProjectName.Roles.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Identity;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/AccountAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/AccountAppService.cs
index 50e276d7..e3476b2a 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/AccountAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/AccountAppService.cs
@@ -9,10 +9,12 @@ using System.Threading.Tasks;
using CompanyName.ProjectName.ConfigurationOptions;
using CompanyName.ProjectName.Users.Dtos;
using IdentityModel;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
+using CompanyName.ProjectName.Extension.Customs.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
+using Volo.Abp;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
@@ -51,12 +53,12 @@ namespace CompanyName.ProjectName.Users
var result = await _signInManager.PasswordSignInAsync(input.Name, input.Password, false, true);
if (result.IsLockedOut)
{
- throw new Exception("当前用户已被锁定");
+ throw new UserFriendlyException("当前用户已被锁定");
}
if (!result.Succeeded)
{
- throw new Exception("用户名或者密码错误");
+ throw new UserFriendlyException("用户名或者密码错误");
}
var s = _currentTenant.Id;
@@ -65,7 +67,7 @@ namespace CompanyName.ProjectName.Users
}
catch (Exception ex)
{
- throw new Exception(ex.Message);
+ throw new UserFriendlyException(ex.Message);
}
}
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs
index a1fdf072..b84c8671 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CompanyName.ProjectName.Users.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Identity;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj b/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj
index 8301468a..7784a0f0 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj
@@ -29,9 +29,11 @@
-
+
+
+
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs
index 71f46521..78c2386a 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs
@@ -3,9 +3,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using CompanyName.ProjectName.IdentityServers.Dtos;
+using CompanyName.ProjectName.Extension.System;
using Volo.Abp;
-using Volo.Abp.Domain.Services;
using Volo.Abp.IdentityServer.ApiResources;
using IdentityModel;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs
index 6b34e9e5..0636c57f 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs
@@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using CompanyName.ProjectName.Extension.System;
using IdentityModel;
using Volo.Abp;
-using Volo.Abp.Domain.Services;
using Volo.Abp.IdentityServer.Clients;
namespace CompanyName.ProjectName.IdentityServer
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/CompanyNameProjectNameLogRepository.cs b/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/CompanyNameProjectNameLogRepository.cs
index 28da2819..692635ff 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/CompanyNameProjectNameLogRepository.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/CompanyNameProjectNameLogRepository.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CompanyName.ProjectName.ElasticsearchRepository.Dto;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.Extensions.Configuration;
using Nest;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/Dto/PagingElasticSearchLogInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/Dto/PagingElasticSearchLogInput.cs
index df512db8..1f2a40c2 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/Dto/PagingElasticSearchLogInput.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/Dto/PagingElasticSearchLogInput.cs
@@ -1,5 +1,5 @@
using System;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
namespace CompanyName.ProjectName.ElasticsearchRepository.Dto
{
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/ICompanyNameProjectNameLogRepository.cs b/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/ICompanyNameProjectNameLogRepository.cs
index c8e8d2f1..ebd8a4dc 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/ICompanyNameProjectNameLogRepository.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.ElasticsearchRepository/ICompanyNameProjectNameLogRepository.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.ElasticsearchRepository.Dto;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Volo.Abp.DependencyInjection;
namespace CompanyName.ProjectName.ElasticsearchRepository
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs
index 5d1d40c7..e8609dcb 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs
@@ -1,9 +1,10 @@
using System.Collections.Generic;
using System.Threading.Tasks;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using CompanyName.ProjectName.IdentityServers;
using CompanyName.ProjectName.IdentityServers.Dtos;
using CompanyName.ProjectName.Permissions;
-using Lion.Abp.Extension;
+
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs
index 57bf03a7..2771fa51 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Threading.Tasks;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using CompanyName.ProjectName.IdentityServers.ApiScopes;
using CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos;
using CompanyName.ProjectName.Permissions;
-using Lion.Abp.Extension;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs
index a5da6983..b940f4a2 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs
@@ -1,7 +1,7 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServers.Clients;
using CompanyName.ProjectName.Permissions;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs
index 941f8bfc..cd3ec5aa 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
using CompanyName.ProjectName.IdentityServers.IdentityResources;
using CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos;
using CompanyName.ProjectName.Permissions;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/CompanyNameProjectNameLogController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/CompanyNameProjectNameLogController.cs
index e4f8ee39..537b67da 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/CompanyNameProjectNameLogController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/CompanyNameProjectNameLogController.cs
@@ -2,7 +2,7 @@
using CompanyName.ProjectName.ElasticsearchRepository.Dto;
using CompanyName.ProjectName.ElasticSearchs;
using CompanyName.ProjectName.Permissions;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs
index 415f8374..3c06229c 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs
@@ -2,7 +2,7 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.Roles;
using CompanyName.ProjectName.Roles.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs
index 136292ed..cb464a3f 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
using CompanyName.ProjectName.Permissions;
using CompanyName.ProjectName.Users;
using CompanyName.ProjectName.Users.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs
index 2d13724d..d0bf9f95 100644
--- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs
+++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using CompanyName.ProjectName.Tenants.Dtos;
-using Lion.Abp.Extension;
+using CompanyName.ProjectName.Extension.Customs.Dtos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
diff --git a/aspnet-core/services/test/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp.csproj b/aspnet-core/services/test/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp.csproj
index f6f39de6..c886800c 100644
--- a/aspnet-core/services/test/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp.csproj
+++ b/aspnet-core/services/test/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp/CompanyName.ProjectName.HttpApi.Client.ConsoleTestApp.csproj
@@ -1,4 +1,5 @@
+
Exe