Browse Source

Merge branch 'dev' into Doc-Dynamic-Widget

pull/13269/head
malik masis 4 years ago
parent
commit
9ea224418b
  1. 2
      docs/en/Distributed-Event-Bus.md
  2. 8
      docs/en/Object-To-Object-Mapping.md
  3. 8
      docs/zh-Hans/Object-To-Object-Mapping.md
  4. 1
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs
  5. 6
      framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs
  6. 15
      framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUiModalExtensions.cs
  7. 2
      framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/IHasExtraProperties.cs
  8. 6
      framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs

2
docs/en/Distributed-Event-Bus.md

@ -228,7 +228,7 @@ namespace AbpDemo
```` ````
* `MyHandler` implements the `IDistributedEventHandler<EntityUpdatedEto<ProductEto>>`. * `MyHandler` implements the `IDistributedEventHandler<EntityUpdatedEto<ProductEto>>`.
* 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 ### Configuration

8
docs/en/Object-To-Object-Mapping.md

@ -12,7 +12,7 @@ public class UserAppService : ApplicationService
_userRepository = userRepository; _userRepository = userRepository;
} }
public void CreateUser(CreateUserInput input) public async Task CreateUser(CreateUserInput input)
{ {
//Manually creating a User object from the CreateUserInput object //Manually creating a User object from the CreateUserInput object
var user = new User var user = new User
@ -23,7 +23,7 @@ public class UserAppService : ApplicationService
Password = input.Password Password = input.Password
}; };
_userRepository.Insert(user); await _userRepository.InsertAsync(user);
} }
} }
``` ```
@ -46,12 +46,12 @@ public class UserAppService : ApplicationService
_userRepository = userRepository; _userRepository = userRepository;
} }
public void CreateUser(CreateUserInput input) public async Task CreateUser(CreateUserInput input)
{ {
//Automatically creating a new User object using the CreateUserInput object //Automatically creating a new User object using the CreateUserInput object
var user = ObjectMapper.Map<CreateUserInput, User>(input); var user = ObjectMapper.Map<CreateUserInput, User>(input);
_userRepository.Insert(user); await _userRepository.InsertAsync(user);
} }
} }
```` ````

8
docs/zh-Hans/Object-To-Object-Mapping.md

@ -12,7 +12,7 @@ public class UserAppService : ApplicationService
_userRepository = userRepository; _userRepository = userRepository;
} }
public void CreateUser(CreateUserInput input) public async Task CreateUser(CreateUserInput input)
{ {
//Manually creating a User object from the CreateUserInput object //Manually creating a User object from the CreateUserInput object
var user = new User var user = new User
@ -23,7 +23,7 @@ public class UserAppService : ApplicationService
Password = input.Password Password = input.Password
}; };
_userRepository.Insert(user); await _userRepository.InsertAsync(user);
} }
} }
``` ```
@ -46,12 +46,12 @@ public class UserAppService : ApplicationService
_userRepository = userRepository; _userRepository = userRepository;
} }
public void CreateUser(CreateUserInput input) public async Task CreateUser(CreateUserInput input)
{ {
//Automatically creating a new User object using the CreateUserInput object //Automatically creating a new User object using the CreateUserInput object
var user = ObjectMapper.Map<CreateUserInput, User>(input); var user = ObjectMapper.Map<CreateUserInput, User>(input);
_userRepository.Insert(user); await _userRepository.InsertAsync(user);
} }
} }
```` ````

1
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] [Serializable]
public class ApplicationLocalizationConfigurationDto public class ApplicationLocalizationConfigurationDto
{ {
//TODO: Rename to Texts?
public Dictionary<string, Dictionary<string, string>> Values { get; set; } public Dictionary<string, Dictionary<string, string>> Values { get; set; }
public List<LanguageInfo> Languages { get; set; } public List<LanguageInfo> Languages { get; set; }

6
framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs

@ -30,7 +30,7 @@ public class PermissionDefinition : IHasSimpleStateCheckers<PermissionDefinition
/// A list of allowed providers to get/set value of this permission. /// A list of allowed providers to get/set value of this permission.
/// An empty list indicates that all providers are allowed. /// An empty list indicates that all providers are allowed.
/// </summary> /// </summary>
public List<string> Providers { get; } //TODO: Rename to AllowedProviders? public List<string> Providers { get; }
public List<ISimpleStateChecker<PermissionDefinition>> StateCheckers { get; } public List<ISimpleStateChecker<PermissionDefinition>> StateCheckers { get; }
@ -122,14 +122,14 @@ public class PermissionDefinition : IHasSimpleStateCheckers<PermissionDefinition
} }
/// <summary> /// <summary>
/// Set the <see cref="StateProviders"/> property. /// Adds one or more providers to the <see cref="Providers"/> list.
/// This is a shortcut for nested calls on this object. /// This is a shortcut for nested calls on this object.
/// </summary> /// </summary>
public virtual PermissionDefinition WithProviders(params string[] providers) public virtual PermissionDefinition WithProviders(params string[] providers)
{ {
if (!providers.IsNullOrEmpty()) if (!providers.IsNullOrEmpty())
{ {
Providers.AddRange(providers); Providers.AddIfNotContains(providers);
} }
return this; return this;

15
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;
}
}

2
framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/IHasExtraProperties.cs

@ -1,7 +1,5 @@
namespace Volo.Abp.Data; namespace Volo.Abp.Data;
//TODO: Move to Volo.Abp.Data.ObjectExtending namespace at 4.0?
public interface IHasExtraProperties public interface IHasExtraProperties
{ {
ExtraPropertyDictionary ExtraProperties { get; } ExtraPropertyDictionary ExtraProperties { get; }

6
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. /// A list of allowed providers to get/set value of this setting.
/// An empty list indicates that all providers are allowed. /// An empty list indicates that all providers are allowed.
/// </summary> /// </summary>
public List<string> Providers { get; } //TODO: Rename to AllowedProviders public List<string> Providers { get; }
/// <summary> /// <summary>
/// Is this setting inherited from parent scopes. /// Is this setting inherited from parent scopes.
@ -91,14 +91,14 @@ public class SettingDefinition
} }
/// <summary> /// <summary>
/// Sets a property in the <see cref="Properties"/> dictionary. /// Adds one or more providers to the <see cref="Providers"/> list.
/// This is a shortcut for nested calls on this object. /// This is a shortcut for nested calls on this object.
/// </summary> /// </summary>
public virtual SettingDefinition WithProviders(params string[] providers) public virtual SettingDefinition WithProviders(params string[] providers)
{ {
if (!providers.IsNullOrEmpty()) if (!providers.IsNullOrEmpty())
{ {
Providers.AddRange(providers); Providers.AddIfNotContains(providers);
} }
return this; return this;

Loading…
Cancel
Save