From 6a3e2726edcf82fbdf4d8b83a2d59091bd9a4eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 20 May 2022 15:28:39 +0300 Subject: [PATCH] Resolved #12681: Introduce Volo.Abp.RemoteServices package. --- framework/Volo.Abp.sln | 7 +++++ .../Volo.Abp.Http.Client.csproj | 1 + .../Abp/Http/Client/AbpHttpClientModule.cs | 7 ++--- .../Volo.Abp.RemoteServices/FodyWeavers.xml | 3 ++ .../Volo.Abp.RemoteServices/FodyWeavers.xsd | 30 +++++++++++++++++++ .../Volo.Abp.RemoteServices.csproj | 21 +++++++++++++ .../Http/Client/AbpRemoteServiceOptions.cs | 0 .../IRemoteServiceConfigurationProvider.cs | 0 .../Http/Client/RemoteServiceConfiguration.cs | 0 .../RemoteServiceConfigurationDictionary.cs | 0 .../RemoteServiceConfigurationProvider.cs | 0 ...eServiceConfigurationProviderExtensions.cs | 0 .../RemoteServices/AbpRemoteServicesModule.cs | 14 +++++++++ nupkg/common.ps1 | 1 + 14 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 framework/src/Volo.Abp.RemoteServices/FodyWeavers.xml create mode 100644 framework/src/Volo.Abp.RemoteServices/FodyWeavers.xsd create mode 100644 framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj rename framework/src/{Volo.Abp.Http.Client => Volo.Abp.RemoteServices}/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs (100%) rename framework/src/{Volo.Abp.Http.Client => Volo.Abp.RemoteServices}/Volo/Abp/Http/Client/IRemoteServiceConfigurationProvider.cs (100%) rename framework/src/{Volo.Abp.Http.Client => Volo.Abp.RemoteServices}/Volo/Abp/Http/Client/RemoteServiceConfiguration.cs (100%) rename framework/src/{Volo.Abp.Http.Client => Volo.Abp.RemoteServices}/Volo/Abp/Http/Client/RemoteServiceConfigurationDictionary.cs (100%) rename framework/src/{Volo.Abp.Http.Client => Volo.Abp.RemoteServices}/Volo/Abp/Http/Client/RemoteServiceConfigurationProvider.cs (100%) rename framework/src/{Volo.Abp.Http.Client => Volo.Abp.RemoteServices}/Volo/Abp/Http/Client/RemoteServiceConfigurationProviderExtensions.cs (100%) create mode 100644 framework/src/Volo.Abp.RemoteServices/Volo/Abp/RemoteServices/AbpRemoteServicesModule.cs diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 94a2e79415..f92a9d336b 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -405,6 +405,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BackgroundWorkers. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Gdpr.Abstractions", "src\Volo.Abp.Gdpr.Abstractions\Volo.Abp.Gdpr.Abstractions.csproj", "{3683340D-92F5-4B14-B77B-34A163333309}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.RemoteServices", "src\Volo.Abp.RemoteServices\Volo.Abp.RemoteServices.csproj", "{EDFFDA74-090D-439C-A58D-06CCF86D4423}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1207,6 +1209,10 @@ Global {3683340D-92F5-4B14-B77B-34A163333309}.Debug|Any CPU.Build.0 = Debug|Any CPU {3683340D-92F5-4B14-B77B-34A163333309}.Release|Any CPU.ActiveCfg = Release|Any CPU {3683340D-92F5-4B14-B77B-34A163333309}.Release|Any CPU.Build.0 = Release|Any CPU + {EDFFDA74-090D-439C-A58D-06CCF86D4423}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDFFDA74-090D-439C-A58D-06CCF86D4423}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDFFDA74-090D-439C-A58D-06CCF86D4423}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDFFDA74-090D-439C-A58D-06CCF86D4423}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1411,6 +1417,7 @@ Global {C4F54FB5-C828-414D-BA03-E8E7A10C784D} = {447C8A77-E5F0-4538-8687-7383196D04EA} {E5FCE710-C5A3-4F94-B9C9-BD1E99252BFB} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {3683340D-92F5-4B14-B77B-34A163333309} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {EDFFDA74-090D-439C-A58D-06CCF86D4423} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj index 92d4cc81b7..67aef7dd89 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj +++ b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj @@ -23,6 +23,7 @@ + diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs index 6dbdcb221f..8bca3702c5 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs @@ -6,6 +6,7 @@ using Volo.Abp.Threading; using Volo.Abp.Validation; using Volo.Abp.ExceptionHandling; using Volo.Abp.Http.Client.DynamicProxying; +using Volo.Abp.RemoteServices; namespace Volo.Abp.Http.Client; @@ -15,15 +16,13 @@ namespace Volo.Abp.Http.Client; typeof(AbpThreadingModule), typeof(AbpMultiTenancyModule), typeof(AbpValidationModule), - typeof(AbpExceptionHandlingModule) + typeof(AbpExceptionHandlingModule), + typeof(AbpRemoteServicesModule) )] public class AbpHttpClientModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - var configuration = context.Services.GetConfiguration(); - Configure(configuration); - context.Services.AddTransient(typeof(DynamicHttpProxyInterceptorClientProxy<>)); } } diff --git a/framework/src/Volo.Abp.RemoteServices/FodyWeavers.xml b/framework/src/Volo.Abp.RemoteServices/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.RemoteServices/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.RemoteServices/FodyWeavers.xsd b/framework/src/Volo.Abp.RemoteServices/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.RemoteServices/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj b/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj new file mode 100644 index 0000000000..74ad1df500 --- /dev/null +++ b/framework/src/Volo.Abp.RemoteServices/Volo.Abp.RemoteServices.csproj @@ -0,0 +1,21 @@ + + + + + + + netstandard2.0 + Volo.Abp.RemoteServices + Volo.Abp.RemoteServices + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs similarity index 100% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs rename to framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/IRemoteServiceConfigurationProvider.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/IRemoteServiceConfigurationProvider.cs similarity index 100% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/IRemoteServiceConfigurationProvider.cs rename to framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/IRemoteServiceConfigurationProvider.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfiguration.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfiguration.cs similarity index 100% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfiguration.cs rename to framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfiguration.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfigurationDictionary.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfigurationDictionary.cs similarity index 100% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfigurationDictionary.cs rename to framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfigurationDictionary.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfigurationProvider.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfigurationProvider.cs similarity index 100% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfigurationProvider.cs rename to framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfigurationProvider.cs diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfigurationProviderExtensions.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfigurationProviderExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceConfigurationProviderExtensions.cs rename to framework/src/Volo.Abp.RemoteServices/Volo/Abp/Http/Client/RemoteServiceConfigurationProviderExtensions.cs diff --git a/framework/src/Volo.Abp.RemoteServices/Volo/Abp/RemoteServices/AbpRemoteServicesModule.cs b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/RemoteServices/AbpRemoteServicesModule.cs new file mode 100644 index 0000000000..dba4842597 --- /dev/null +++ b/framework/src/Volo.Abp.RemoteServices/Volo/Abp/RemoteServices/AbpRemoteServicesModule.cs @@ -0,0 +1,14 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; + +namespace Volo.Abp.RemoteServices; + +public class AbpRemoteServicesModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + Configure(configuration); + } +} \ No newline at end of file diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 6d1214918c..d0dc8e9359 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -202,6 +202,7 @@ $projects = ( "framework/src/Volo.Abp.ObjectMapping", "framework/src/Volo.Abp.Quartz", "framework/src/Volo.Abp.RabbitMQ", + "framework/src/Volo.Abp.RemoteServices", "framework/src/Volo.Abp.Security", "framework/src/Volo.Abp.Serialization", "framework/src/Volo.Abp.Settings",