From a4b8c10bc8167150460ab87cf6635558481ca2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 14 Jul 2022 23:31:37 +0300 Subject: [PATCH 1/7] Fix the ITransientDependency naming. --- docs/en/Distributed-Event-Bus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Distributed-Event-Bus.md b/docs/en/Distributed-Event-Bus.md index 5fe85a468d..21b1b07256 100644 --- a/docs/en/Distributed-Event-Bus.md +++ b/docs/en/Distributed-Event-Bus.md @@ -228,7 +228,7 @@ namespace AbpDemo ```` * `MyHandler` implements the `IDistributedEventHandler>`. -* It is required to register your handler class to the [dependency injection](Dependency-Injection.md) system. Implementing `ITransient` like in this example is an easy way. +* It is required to register your handler class to the [dependency injection](Dependency-Injection.md) system. Implementing `ITransientDependency` like in this example is an easy way. ### Configuration From b2dd9040f8734041b3a78fc913214a4d09b84f1a Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 15 Jul 2022 09:13:07 +0800 Subject: [PATCH 2/7] Add `CancelClosingModalWhenFocusLost` extension method. --- .../AbpBlazoriseUiModalExtensions.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUiModalExtensions.cs diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUiModalExtensions.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUiModalExtensions.cs new file mode 100644 index 0000000000..3b71613fc5 --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUiModalExtensions.cs @@ -0,0 +1,15 @@ +using System.Threading.Tasks; +using Blazorise; + +namespace Volo.Abp.BlazoriseUI; + +public static class AbpBlazoriseUiModalExtensions +{ + public static Task CancelClosingModalWhenFocusLost(this Modal modal, ModalClosingEventArgs eventArgs) + { + // cancel close if clicked outside of modal area + eventArgs.Cancel = eventArgs.CloseReason == CloseReason.FocusLostClosing; + + return Task.CompletedTask; + } +} From c4a1157e5ff90f54a06d646f8d045d91dbe33a64 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Jul 2022 09:35:24 +0800 Subject: [PATCH 3/7] Update Object To Object Mapping document --- docs/en/Object-To-Object-Mapping.md | 8 ++++---- docs/zh-Hans/Object-To-Object-Mapping.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/Object-To-Object-Mapping.md b/docs/en/Object-To-Object-Mapping.md index f5ca805611..c12b260921 100644 --- a/docs/en/Object-To-Object-Mapping.md +++ b/docs/en/Object-To-Object-Mapping.md @@ -12,7 +12,7 @@ public class UserAppService : ApplicationService _userRepository = userRepository; } - public void CreateUser(CreateUserInput input) + public async Task CreateUser(CreateUserInput input) { //Manually creating a User object from the CreateUserInput object var user = new User @@ -23,7 +23,7 @@ public class UserAppService : ApplicationService Password = input.Password }; - _userRepository.Insert(user); + await _userRepository.InsertAsync(user); } } ``` @@ -46,12 +46,12 @@ public class UserAppService : ApplicationService _userRepository = userRepository; } - public void CreateUser(CreateUserInput input) + public async Task CreateUser(CreateUserInput input) { //Automatically creating a new User object using the CreateUserInput object var user = ObjectMapper.Map(input); - _userRepository.Insert(user); + await _userRepository.InsertAsync(user); } } ```` diff --git a/docs/zh-Hans/Object-To-Object-Mapping.md b/docs/zh-Hans/Object-To-Object-Mapping.md index 402acdc4f6..62c1d17add 100644 --- a/docs/zh-Hans/Object-To-Object-Mapping.md +++ b/docs/zh-Hans/Object-To-Object-Mapping.md @@ -12,7 +12,7 @@ public class UserAppService : ApplicationService _userRepository = userRepository; } - public void CreateUser(CreateUserInput input) + public async Task CreateUser(CreateUserInput input) { //Manually creating a User object from the CreateUserInput object var user = new User @@ -23,7 +23,7 @@ public class UserAppService : ApplicationService Password = input.Password }; - _userRepository.Insert(user); + await _userRepository.InsertAsync(user); } } ``` @@ -46,12 +46,12 @@ public class UserAppService : ApplicationService _userRepository = userRepository; } - public void CreateUser(CreateUserInput input) + public async Task CreateUser(CreateUserInput input) { //Automatically creating a new User object using the CreateUserInput object var user = ObjectMapper.Map(input); - _userRepository.Insert(user); + await _userRepository.InsertAsync(user); } } ```` From 0b6619d08a926bc26c1f22726216c5cdb319dca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 15 Jul 2022 10:27:03 +0300 Subject: [PATCH 4/7] Do not add duplicated providers to PermissionDefinition. --- .../Abp/Authorization/Permissions/PermissionDefinition.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs index b477c6c11e..be559352c9 100644 --- a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs @@ -30,7 +30,7 @@ public class PermissionDefinition : IHasSimpleStateCheckers - public List Providers { get; } //TODO: Rename to AllowedProviders? + public List Providers { get; } public List> StateCheckers { get; } @@ -129,7 +129,7 @@ public class PermissionDefinition : IHasSimpleStateCheckers Date: Fri, 15 Jul 2022 11:05:11 +0300 Subject: [PATCH 5/7] Prevent duplicate providers in the list. --- .../Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs index ee96d1c160..21527c0ff2 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs @@ -39,7 +39,7 @@ public class SettingDefinition /// A list of allowed providers to get/set value of this setting. /// An empty list indicates that all providers are allowed. /// - public List Providers { get; } //TODO: Rename to AllowedProviders + public List Providers { get; } /// /// Is this setting inherited from parent scopes. @@ -98,7 +98,7 @@ public class SettingDefinition { if (!providers.IsNullOrEmpty()) { - Providers.AddRange(providers); + Providers.AddIfNotContains(providers); } return this; From 80f907ff4146ae4a4e4ee19fccce839bc6125c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 15 Jul 2022 11:06:14 +0300 Subject: [PATCH 6/7] Fix method summaries --- .../Volo/Abp/Authorization/Permissions/PermissionDefinition.cs | 2 +- .../Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs index be559352c9..75d463f30f 100644 --- a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs @@ -122,7 +122,7 @@ public class PermissionDefinition : IHasSimpleStateCheckers - /// Set the property. + /// Adds one or more providers to the list. /// This is a shortcut for nested calls on this object. /// public virtual PermissionDefinition WithProviders(params string[] providers) diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs index 21527c0ff2..536a407271 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs @@ -91,7 +91,7 @@ public class SettingDefinition } /// - /// Sets a property in the dictionary. + /// Adds one or more providers to the list. /// This is a shortcut for nested calls on this object. /// public virtual SettingDefinition WithProviders(params string[] providers) From 761a2180d1359bf309c08982acd36ea14dd572ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 15 Jul 2022 12:01:55 +0300 Subject: [PATCH 7/7] Remove TODOs that we won't implement. --- .../ApplicationLocalizationConfigurationDto.cs | 1 - .../Volo/Abp/Data/IHasExtraProperties.cs | 2 -- 2 files changed, 3 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs index 0b229235fa..f92c9d7bb9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs @@ -7,7 +7,6 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; [Serializable] public class ApplicationLocalizationConfigurationDto { - //TODO: Rename to Texts? public Dictionary> Values { get; set; } public List Languages { get; set; } diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/IHasExtraProperties.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/IHasExtraProperties.cs index 03598e1164..ed2d11c250 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/IHasExtraProperties.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/IHasExtraProperties.cs @@ -1,7 +1,5 @@ namespace Volo.Abp.Data; -//TODO: Move to Volo.Abp.Data.ObjectExtending namespace at 4.0? - public interface IHasExtraProperties { ExtraPropertyDictionary ExtraProperties { get; }