From 6b15fbe1de064dcb055c995f85ef8a47b03db314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Fri, 20 Mar 2020 16:23:22 +0300 Subject: [PATCH 1/4] blogging module updated --- .../Volo/Blogging/BloggingRemoteServiceConsts.cs | 7 +++++++ .../Volo/Blogging/BloggingHttpApiClientModule.cs | 5 ++--- .../Volo/Blogging/BlogFilesController.cs | 2 +- .../Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs | 2 +- .../Volo/Blogging/CommentsController.cs | 2 +- .../Volo.Blogging.HttpApi/Volo/Blogging/PostsController.cs | 2 +- .../Volo.Blogging.HttpApi/Volo/Blogging/TagsController.cs | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingRemoteServiceConsts.cs diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingRemoteServiceConsts.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingRemoteServiceConsts.cs new file mode 100644 index 0000000000..e11f75adfb --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Blogging +{ + public static class BloggingRemoteServiceConsts + { + public const string RemoteServiceName = "Blogging"; + } +} diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs index 7e1418cbb0..0b33ff3367 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs @@ -9,11 +9,10 @@ namespace Volo.Blogging typeof(AbpHttpClientModule))] public class BloggingHttpApiClientModule : AbpModule { - public const string RemoteServiceName = "Blogging"; - public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(BloggingApplicationContractsModule).Assembly, RemoteServiceName); + context.Services.AddHttpClientProxies(typeof(BloggingApplicationContractsModule).Assembly, + BloggingRemoteServiceConsts.RemoteServiceName); } } diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogFilesController.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogFilesController.cs index 818435a78c..f71a0af6c2 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogFilesController.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogFilesController.cs @@ -10,7 +10,7 @@ using Volo.Blogging.Files; namespace Volo.Blogging { - [RemoteService] + [RemoteService(Name = BloggingRemoteServiceConsts.RemoteServiceName)] [Area("blogging")] [Route("api/blogging/files")] public class BlogFilesController : AbpController, IFileAppService diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs index 084afb958a..cb67ac3fb7 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs @@ -9,7 +9,7 @@ using Volo.Blogging.Blogs.Dtos; namespace Volo.Blogging { - [RemoteService] + [RemoteService(Name = BloggingRemoteServiceConsts.RemoteServiceName)] [Area("blogging")] [Route("api/blogging/blogs")] public class BlogsController : AbpController, IBlogAppService diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/CommentsController.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/CommentsController.cs index 270d8f1e13..caea1cfa2f 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/CommentsController.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/CommentsController.cs @@ -9,7 +9,7 @@ using Volo.Blogging.Comments.Dtos; namespace Volo.Blogging { - [RemoteService] + [RemoteService(Name = BloggingRemoteServiceConsts.RemoteServiceName)] [Area("blogging")] [Route("api/blogging/comments")] public class CommentsController : AbpController, ICommentAppService diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/PostsController.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/PostsController.cs index 332f60c256..f7a1c01703 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/PostsController.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/PostsController.cs @@ -8,7 +8,7 @@ using Volo.Blogging.Posts; namespace Volo.Blogging { - [RemoteService] + [RemoteService(Name = BloggingRemoteServiceConsts.RemoteServiceName)] [Area("blogging")] [Route("api/blogging/posts")] public class PostsController : AbpController, IPostAppService diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/TagsController.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/TagsController.cs index ede42dd264..6f17623a5e 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/TagsController.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/TagsController.cs @@ -9,7 +9,7 @@ using Volo.Blogging.Tagging.Dtos; namespace Volo.Blogging { - [RemoteService] + [RemoteService(Name = BloggingRemoteServiceConsts.RemoteServiceName)] [Area("blogging")] [Route("api/blogging/tags")] public class TagsController : AbpController, ITagAppService From a2049e19490920ae0e1009f60a4a98e72a3249a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Fri, 20 Mar 2020 16:32:22 +0300 Subject: [PATCH 2/4] feature management module updated --- .../FeatureManagementRemoteServiceConsts.cs | 7 +++++++ .../AbpFeatureManagementHttpApiClientModule.cs | 4 +--- .../Volo/Abp/FeatureManagement/FeaturesController.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementRemoteServiceConsts.cs diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementRemoteServiceConsts.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementRemoteServiceConsts.cs new file mode 100644 index 0000000000..749805da05 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.FeatureManagement +{ + public class FeatureManagementRemoteServiceConsts + { + public const string RemoteServiceName = "FeatureManagement"; + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs index 002a7c3a9a..1bfd2a752c 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiClientModule.cs @@ -9,13 +9,11 @@ namespace Volo.Abp.FeatureManagement typeof(AbpHttpClientModule))] public class AbpFeatureManagementHttpApiClientModule : AbpModule { - public const string RemoteServiceName = "AbpFeatureManagement"; - public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddHttpClientProxies( typeof(AbpFeatureManagementApplicationContractsModule).Assembly, - RemoteServiceName + FeatureManagementRemoteServiceConsts.RemoteServiceName ); } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeaturesController.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeaturesController.cs index a56ff24275..e3eda46033 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeaturesController.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeaturesController.cs @@ -4,7 +4,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace Volo.Abp.FeatureManagement { - [RemoteService] + [RemoteService(Name = FeatureManagementRemoteServiceConsts.RemoteServiceName)] [Area("abp")] public class FeaturesController : AbpController, IFeatureAppService { From 8277fd06fff75e278cd0a01e32e2bfae16a3f8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Fri, 20 Mar 2020 16:56:40 +0300 Subject: [PATCH 3/4] permission management module updated --- .../PermissionManagementRemoteServiceConsts.cs | 7 +++++++ .../AbpPermissionManagementHttpApiClientModule.cs | 4 +--- .../Volo/Abp/PermissionManagement/PermissionsController.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo/Abp/PermissionManagement/PermissionManagementRemoteServiceConsts.cs diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo/Abp/PermissionManagement/PermissionManagementRemoteServiceConsts.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo/Abp/PermissionManagement/PermissionManagementRemoteServiceConsts.cs new file mode 100644 index 0000000000..4a9644b061 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo/Abp/PermissionManagement/PermissionManagementRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.PermissionManagement +{ + public class PermissionManagementRemoteServiceConsts + { + public const string RemoteServiceName = "AbpPermissionManagement"; + } +} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs index 6bdc958780..35932bba56 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiClientModule.cs @@ -9,13 +9,11 @@ namespace Volo.Abp.PermissionManagement typeof(AbpHttpClientModule))] public class AbpPermissionManagementHttpApiClientModule : AbpModule { - public const string RemoteServiceName = "AbpPermissionManagement"; - public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddHttpClientProxies( typeof(AbpPermissionManagementApplicationContractsModule).Assembly, - RemoteServiceName + PermissionManagementRemoteServiceConsts.RemoteServiceName ); } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/PermissionsController.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/PermissionsController.cs index 2dacd79d1f..2ed9a4d044 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/PermissionsController.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/PermissionsController.cs @@ -4,7 +4,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace Volo.Abp.PermissionManagement { - [RemoteService] + [RemoteService(Name = PermissionManagementRemoteServiceConsts.RemoteServiceName)] [Area("abp")] public class PermissionsController : AbpController, IPermissionAppService { From c1429f1f09727d211a358ac8d6860f78240d33e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Fri, 20 Mar 2020 17:01:41 +0300 Subject: [PATCH 4/4] tenant management module updated --- .../TenantManagementRemoteServiceConsts.cs | 7 +++++++ .../AbpTenantManagementHttpApiClientModule.cs | 4 +--- .../Volo/Abp/TenantManagement/TenantController.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementRemoteServiceConsts.cs diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementRemoteServiceConsts.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementRemoteServiceConsts.cs new file mode 100644 index 0000000000..c820c1bd49 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.TenantManagement +{ + public class TenantManagementRemoteServiceConsts + { + public const string RemoteServiceName = "AbpTenantManagement"; + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs index 1cbdb36a10..7be0b53a72 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs @@ -9,13 +9,11 @@ namespace Volo.Abp.TenantManagement typeof(AbpHttpClientModule))] public class AbpTenantManagementHttpApiClientModule : AbpModule { - public const string RemoteServiceName = "AbpTenantManagement"; - public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddHttpClientProxies( typeof(AbpTenantManagementApplicationContractsModule).Assembly, - RemoteServiceName + TenantManagementRemoteServiceConsts.RemoteServiceName ); } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/TenantController.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/TenantController.cs index 5b821fbc71..317e7e62d0 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/TenantController.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/TenantController.cs @@ -7,7 +7,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace Volo.Abp.TenantManagement { [Controller] - [RemoteService] + [RemoteService(Name = TenantManagementRemoteServiceConsts.RemoteServiceName)] [Area("multi-tenancy")] [Route("api/multi-tenancy/tenants")] public class TenantController : AbpController, ITenantAppService //TODO: Throws exception on validation if we inherit from Controller