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 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); } } ```` 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.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs index b477c6c11e..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 @@ -30,7 +30,7 @@ public class PermissionDefinition : IHasSimpleStateCheckers - public List Providers { get; } //TODO: Rename to AllowedProviders? + public List Providers { get; } public List> StateCheckers { get; } @@ -122,14 +122,14 @@ 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) { if (!providers.IsNullOrEmpty()) { - Providers.AddRange(providers); + Providers.AddIfNotContains(providers); } return this; 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; + } +} 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; } 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..536a407271 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. @@ -91,14 +91,14 @@ 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) { if (!providers.IsNullOrEmpty()) { - Providers.AddRange(providers); + Providers.AddIfNotContains(providers); } return this;