diff --git a/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs b/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs index 499c2431c5..516e842563 100644 --- a/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs +++ b/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs @@ -11,9 +11,9 @@ namespace Microsoft.AspNetCore.Authorization /// /// Gets all policies. - /// + /// /// IMPORTANT NOTE: Use this method carefully. - /// It relies on reflection to get all policies from a private field of the . + /// It relies on reflection to get all policies from a private field of the . /// This method may be removed in the future if internals of changes. /// /// @@ -23,4 +23,4 @@ namespace Microsoft.AspNetCore.Authorization return ((IDictionary) PolicyMapProperty.GetValue(options)).Keys.ToList(); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs index 602fdd9c50..38873fe1b8 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs @@ -54,7 +54,7 @@ namespace Volo.Abp.Authorization.Permissions /// /// Disabling a permission would be helpful to hide a related application /// functionality from users/clients. - /// + /// /// Default: true. /// public bool IsEnabled { get; set; } @@ -64,8 +64,8 @@ namespace Volo.Abp.Authorization.Permissions /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// public object this[string name] { @@ -74,7 +74,7 @@ namespace Volo.Abp.Authorization.Permissions } protected internal PermissionDefinition( - [NotNull] string name, + [NotNull] string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both, bool isEnabled = true) @@ -90,14 +90,14 @@ namespace Volo.Abp.Authorization.Permissions } public virtual PermissionDefinition AddChild( - [NotNull] string name, + [NotNull] string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both, bool isEnabled = true) { var child = new PermissionDefinition( - name, - displayName, + name, + displayName, multiTenancySide, isEnabled) { @@ -138,4 +138,4 @@ namespace Volo.Abp.Authorization.Permissions return $"[{nameof(PermissionDefinition)} {Name}]"; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs index 5038e8e064..6d3a937a94 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs @@ -36,8 +36,8 @@ namespace Volo.Abp.Authorization.Permissions /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// public object this[string name] { @@ -46,7 +46,7 @@ namespace Volo.Abp.Authorization.Permissions } protected internal PermissionGroupDefinition( - string name, + string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both) { @@ -59,7 +59,7 @@ namespace Volo.Abp.Authorization.Permissions } public virtual PermissionDefinition AddPermission( - string name, + string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both, bool isEnabled = true) @@ -131,4 +131,4 @@ namespace Volo.Abp.Authorization.Permissions return null; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs index 262d95d35b..18f38128db 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs @@ -8,9 +8,9 @@ namespace Volo.Abp.BackgroundJobs public interface IAsyncBackgroundJob { /// - /// Executes the job with the . + /// Executes the job with the . /// /// Job arguments. Task ExecuteAsync(TArgs args); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs index e7c942ec4c..94b75f4c91 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs @@ -6,9 +6,9 @@ public interface IBackgroundJob { /// - /// Executes the job with the . + /// Executes the job with the . /// /// Job arguments. void Execute(TArgs args); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs b/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs index 1dc51a2a72..e2d5ff25e9 100644 --- a/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs +++ b/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs @@ -6,7 +6,6 @@ /// Gets a named container. /// /// The blob container manager - /// Cancellation token /// /// The container object. /// @@ -19,4 +18,4 @@ ); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs index 76ae06a5e0..f272484611 100644 --- a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs @@ -88,7 +88,7 @@ namespace System /// Gets index of nth occurrence of a char in a string. /// /// source string to be searched - /// Char to search in + /// Char to search in /// Count of the occurrence public static int NthIndexOf(this string str, char c, int n) { diff --git a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs index e014ee9e21..f55bdd3bc8 100644 --- a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs @@ -107,7 +107,7 @@ namespace System.Collections.Generic } /// - /// Removes all items from the collection those satisfy the given . + /// Removes all items from the collection. /// /// Type of the items in the collection /// The collection diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs index 6576f08318..71ea895fd2 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Reflection allTypes.AddRange(typesInThisAssembly.Where(type => type != null)); } - catch (Exception ex) + catch { //TODO: Trigger a global event? } @@ -46,4 +46,4 @@ namespace Volo.Abp.Reflection return allTypes; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs index 6d21fc2a73..00d25681e4 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.Text.Formatting /// /// /// Say that str is "My name is Neo." and format is "My name is {name}.". - /// Then Extract method gets "Neo" as "name". + /// Then Extract method gets "Neo" as "name". /// public class FormattedStringValueExtracter { @@ -84,7 +84,7 @@ namespace Volo.Abp.Text.Formatting } /// - /// Checks if given fits to given . + /// Checks if given fits to given . /// Also gets extracted values. /// /// String including dynamic values @@ -127,4 +127,4 @@ namespace Volo.Abp.Text.Formatting } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs index 6cda2f6e39..6c470312d8 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs @@ -13,8 +13,8 @@ namespace Volo.Abp.Data /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// [CanBeNull] public object this[string name] @@ -45,4 +45,4 @@ namespace Volo.Abp.Data return this; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs index 368fa2dc96..53d2f142cd 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs @@ -9,11 +9,11 @@ namespace Volo.Abp.DependencyInjection IServiceCollection Services { get; } /// - /// Registers default repositories for this DbContext. + /// Registers default repositories for this DbContext. /// /// /// Registers repositories only for aggregate root entities by default. - /// set to true to include all entities. + /// set to true to include all entities. /// IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false); @@ -67,4 +67,4 @@ namespace Volo.Abp.DependencyInjection /// The DbContext type to be replaced IAbpCommonDbContextRegistrationOptionsBuilder ReplaceDbContext(Type otherDbContextType); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs index 1d93c05580..d28b3ab2a4 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.EventBus /// /// Registers to an event. - /// A new instance of object is created for every event occurrence. + /// A new instance of object is created for every event occurrence. /// /// Event type /// Type of the event handler @@ -116,4 +116,4 @@ namespace Volo.Abp.EventBus /// Event type void UnsubscribeAll(Type eventType); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs index 72a8c753cd..9ff8b89cd8 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs @@ -16,8 +16,8 @@ namespace Volo.Abp.EventBus { /// /// Returns true if this event data has a Tenant Id information. - /// If so, it should set the our parameter. - /// Otherwise, the our parameter value should not be informative + /// If so, it should set the our parameter. + /// Otherwise, the our parameter value should not be informative /// (it will be null as expected, but doesn't indicate a tenant with null tenant id). /// /// diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs index b2b11f0a18..609f42acd2 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs @@ -69,8 +69,8 @@ namespace Volo.Abp.Features /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// [CanBeNull] public object this[string name] diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs index cba38070a7..b4dd98eb5b 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs @@ -29,8 +29,8 @@ namespace Volo.Abp.Features /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// public object this[string name] { @@ -39,7 +39,7 @@ namespace Volo.Abp.Features } protected internal FeatureGroupDefinition( - string name, + string name, ILocalizableString displayName = null) { Name = name; @@ -108,4 +108,4 @@ namespace Volo.Abp.Features return $"[{nameof(FeatureGroupDefinition)} {Name}]"; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs index df867c2320..ed225ccc58 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs @@ -9,8 +9,8 @@ namespace Volo.Abp.Uow public class UnitOfWorkFailedEventArgs : UnitOfWorkEventArgs { /// - /// Exception that caused failure. This is set only if an error occurred during . - /// Can be null if there is no exception, but is not called. + /// Exception that caused failure. This is set only if an error occurred during . + /// Can be null if there is no exception, but is not called. /// Can be null if another exception occurred during the UOW. /// [CanBeNull] diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs index 3ac2246dcc..ea70649350 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs @@ -38,12 +38,12 @@ namespace Volo.Abp.AutoMapper } //[Fact] TODO: Disabled because of https://github.com/AutoMapper/AutoMapper/pull/2379#issuecomment-355899664 - public void Should_Not_Map_Objects_With_AutoMap_Attributes() + /*public void Should_Not_Map_Objects_With_AutoMap_Attributes() { Assert.ThrowsAny(() => { _objectMapper.Map(new MyEntity {Number = 42}); }); - } + }*/ } } diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs index bf120d2e33..8fd3d68b18 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs +++ b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.Uow { uow.OnCompleted(() => { - completed = true; + completed = true; return Task.CompletedTask; }); @@ -50,7 +50,12 @@ namespace Volo.Abp.Uow { using (var childUow = _unitOfWorkManager.Begin()) { - childUow.OnCompleted(async () => completed = true); + childUow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + uow.Disposed += (sender, args) => disposed = true; await childUow.CompleteAsync(); @@ -80,9 +85,14 @@ namespace Volo.Abp.Uow using (var uow = _unitOfWorkManager.Begin()) { - uow.OnCompleted(async () => completed = true); - uow.Failed += (sender, args) => failed = true; - uow.Disposed += (sender, args) => disposed = true; + uow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + + uow.Failed += (_, _) => failed = true; + uow.Disposed += (_, _) => disposed = true; } completed.ShouldBeFalse(); @@ -101,7 +111,12 @@ namespace Volo.Abp.Uow { using (var uow = _unitOfWorkManager.Begin()) { - uow.OnCompleted(async () => completed = true); + uow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + uow.Failed += (sender, args) => failed = true; uow.Disposed += (sender, args) => disposed = true; @@ -125,7 +140,12 @@ namespace Volo.Abp.Uow using (var uow = _unitOfWorkManager.Begin()) { - uow.OnCompleted(async () => completed = true); + uow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + uow.Failed += (sender, args) => { failed = true; args.IsRolledback.ShouldBeTrue(); }; uow.Disposed += (sender, args) => disposed = true;