diff --git a/src/AbpDesk/AbpDesk.Application.Contracts/AbpDesk/AbpDeskApplicationContractsModule.cs b/src/AbpDesk/AbpDesk.Application.Contracts/AbpDesk/AbpDeskApplicationContractsModule.cs new file mode 100644 index 0000000000..7786b1df5c --- /dev/null +++ b/src/AbpDesk/AbpDesk.Application.Contracts/AbpDesk/AbpDeskApplicationContractsModule.cs @@ -0,0 +1,11 @@ +using Volo.Abp; +using Volo.Abp.Modularity; + +namespace AbpDesk +{ + [DependsOn(typeof(AbpCommonModule))] + public class AbpDeskApplicationContractsModule : AbpModule + { + + } +} diff --git a/src/AbpDesk/AbpDesk.Application/AbpDesk/AbpDeskApplicationModule.cs b/src/AbpDesk/AbpDesk.Application/AbpDesk/AbpDeskApplicationModule.cs index 8eca7c59cb..eae5693f53 100644 --- a/src/AbpDesk/AbpDesk.Application/AbpDesk/AbpDeskApplicationModule.cs +++ b/src/AbpDesk/AbpDesk.Application/AbpDesk/AbpDeskApplicationModule.cs @@ -4,7 +4,11 @@ using Volo.Abp.Modularity; namespace AbpDesk { - [DependsOn(typeof(AbpDeskDomainModule), typeof(AbpAutoMapperModule))] + [DependsOn( + typeof(AbpDeskDomainModule), + typeof(AbpDeskApplicationContractsModule), + typeof(AbpAutoMapperModule) + )] public class AbpDeskApplicationModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/AbpDesk/AbpDesk.Domain/AbpDesk/AbpDeskDomainModule.cs b/src/AbpDesk/AbpDesk.Domain/AbpDesk/AbpDeskDomainModule.cs index e02eb299c8..ac0859ba17 100644 --- a/src/AbpDesk/AbpDesk.Domain/AbpDesk/AbpDeskDomainModule.cs +++ b/src/AbpDesk/AbpDesk.Domain/AbpDesk/AbpDeskDomainModule.cs @@ -1,8 +1,10 @@ using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; using Volo.Abp.Modularity; namespace AbpDesk { + [DependsOn(typeof(AbpCommonModule))] public class AbpDeskDomainModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/AbpDesk/AbpDesk.SamplePlugInModule/AbpDeskSamplePlugInModule.cs b/src/AbpDesk/AbpDesk.SamplePlugInModule/AbpDeskSamplePlugInModule.cs index 29e3de98e2..99b3a94a14 100644 --- a/src/AbpDesk/AbpDesk.SamplePlugInModule/AbpDeskSamplePlugInModule.cs +++ b/src/AbpDesk/AbpDesk.SamplePlugInModule/AbpDeskSamplePlugInModule.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; using Volo.Abp.Modularity; namespace AbpDesk.SamplePlugInModule @@ -6,6 +7,7 @@ namespace AbpDesk.SamplePlugInModule /* This is just a sample plugin module to test loading plugin modules. */ + [DependsOn(typeof(AbpCommonModule))] public class AbpDeskSamplePlugInModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll b/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll index 5570b82fea..0231fbe6f3 100644 Binary files a/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll and b/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll differ diff --git a/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs b/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs index 7c57bb8c50..19ef08e8ff 100644 --- a/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs +++ b/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.Modularity; namespace Volo.Abp.Account { + [DependsOn(typeof(AbpCommonModule))] public class AbpAccountApplicationContractsModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs b/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs index 07a3345e33..2515fcde6e 100644 --- a/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs +++ b/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs @@ -10,6 +10,7 @@ using Volo.Abp.Reflection; namespace Volo.Abp.AutoMapper { + [DependsOn(typeof(AbpCommonModule))] public class AbpAutoMapperModule : AbpModule { private static volatile bool _createdMappingsBefore; diff --git a/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj b/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj index 49ed5ff8f0..0dbde0baf7 100644 --- a/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj +++ b/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj @@ -19,7 +19,6 @@ - \ No newline at end of file diff --git a/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/AbpCastleCoreModule.cs b/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/AbpCastleCoreModule.cs index d250aab5d0..55c4302af8 100644 --- a/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/AbpCastleCoreModule.cs +++ b/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/AbpCastleCoreModule.cs @@ -4,6 +4,7 @@ using Volo.Abp.Modularity; namespace Volo.Abp.Castle { + [DependsOn(typeof(AbpCommonModule))] public class AbpCastleCoreModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionApplicationExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionApplicationExtensions.cs similarity index 100% rename from src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionApplicationExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionApplicationExtensions.cs diff --git a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs similarity index 94% rename from src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs index 36188d5422..240513a5ce 100644 --- a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs +++ b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs @@ -124,7 +124,7 @@ namespace Microsoft.Extensions.DependencyInjection /// Returns a to resolve a service from given /// once dependency injection registration phase completed. /// - internal static Lazy GetServiceLazy(this IServiceCollection services) + public static Lazy GetServiceLazy(this IServiceCollection services) { return new Lazy(services.GetService, true); } @@ -133,7 +133,7 @@ namespace Microsoft.Extensions.DependencyInjection /// Returns a to resolve a service from given /// once dependency injection registration phase completed. /// - internal static Lazy GetServiceLazy(this IServiceCollection services, Type type) + public static Lazy GetServiceLazy(this IServiceCollection services, Type type) { return new Lazy(() => services.GetService(type), true); } @@ -142,7 +142,7 @@ namespace Microsoft.Extensions.DependencyInjection /// Returns a to resolve a service from given /// once dependency injection registration phase completed. /// - internal static Lazy GetRequiredServiceLazy(this IServiceCollection services) + public static Lazy GetRequiredServiceLazy(this IServiceCollection services) { return new Lazy(services.GetRequiredService, true); } @@ -151,7 +151,7 @@ namespace Microsoft.Extensions.DependencyInjection /// Returns a to resolve a service from given /// once dependency injection registration phase completed. /// - internal static Lazy GetRequiredServiceLazy(this IServiceCollection services, Type type) + public static Lazy GetRequiredServiceLazy(this IServiceCollection services, Type type) { return new Lazy(() => services.GetRequiredService(type), true); } diff --git a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionConventionalRegistrationExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConventionalRegistrationExtensions.cs similarity index 100% rename from src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionConventionalRegistrationExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConventionalRegistrationExtensions.cs diff --git a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionObjectAccessorExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionObjectAccessorExtensions.cs similarity index 100% rename from src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionObjectAccessorExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionObjectAccessorExtensions.cs diff --git a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionPreConfigureExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionPreConfigureExtensions.cs similarity index 100% rename from src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionPreConfigureExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionPreConfigureExtensions.cs diff --git a/src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionRegistrationActionExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionRegistrationActionExtensions.cs similarity index 100% rename from src/Volo.Abp/Microsoft/Extensions/DependencyInjection/ServiceCollectionRegistrationActionExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionRegistrationActionExtensions.cs diff --git a/src/Volo.Abp/Microsoft/Extensions/Logging/LoggerExtensions.cs b/src/Volo.Abp.Core/Microsoft/Extensions/Logging/LoggerExtensions.cs similarity index 65% rename from src/Volo.Abp/Microsoft/Extensions/Logging/LoggerExtensions.cs rename to src/Volo.Abp.Core/Microsoft/Extensions/Logging/LoggerExtensions.cs index ff6362b3ae..76fe1a421f 100644 --- a/src/Volo.Abp/Microsoft/Extensions/Logging/LoggerExtensions.cs +++ b/src/Volo.Abp.Core/Microsoft/Extensions/Logging/LoggerExtensions.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Linq; using Volo.Abp.Logging; -using Volo.Abp.Validation; namespace Microsoft.Extensions.Logging { @@ -63,42 +61,37 @@ namespace Microsoft.Extensions.Logging var logLevel = (ex as IHasLogLevel)?.LogLevel ?? LogLevel.Error; logger.LogWithLevel(logLevel, ex.Message, ex); - LogValidationErrors(logger, ex); + LogDetails(logger, ex); } - private static void LogValidationErrors(ILogger logger, Exception exception) + private static void LogDetails(ILogger logger, Exception exception) { - //Try to find inner validation exception - if (exception is AggregateException && exception.InnerException != null) - { - var aggException = exception as AggregateException; - if (aggException.InnerException is AbpValidationException) - { - exception = aggException.InnerException; - } - } + var loggingExceptions = new List(); - if (!(exception is AbpValidationException)) + if (exception is IExceptionCanLogDetails) { - return; + loggingExceptions.Add(exception as IExceptionCanLogDetails); } - - var validationException = exception as AbpValidationException; - if (validationException.ValidationErrors.IsNullOrEmpty()) + else if (exception is AggregateException && exception.InnerException != null) { - return; - } + var aggException = exception as AggregateException; + if (aggException.InnerException is IExceptionCanLogDetails) + { + loggingExceptions.Add(aggException.InnerException as IExceptionCanLogDetails); + } - logger.LogWithLevel(validationException.LogLevel, "There are " + validationException.ValidationErrors.Count + " validation errors:"); - foreach (var validationResult in validationException.ValidationErrors) - { - var memberNames = ""; - if (validationResult.MemberNames != null && validationResult.MemberNames.Any()) + foreach (var innerException in aggException.InnerExceptions) { - memberNames = " (" + string.Join(", ", validationResult.MemberNames) + ")"; + if (innerException is IExceptionCanLogDetails) + { + loggingExceptions.AddIfNotContains(innerException as IExceptionCanLogDetails); + } } + } - logger.LogWithLevel(validationException.LogLevel, validationResult.ErrorMessage + memberNames); + foreach (var ex in loggingExceptions) + { + ex.LogDetails(logger); } } } diff --git a/src/Volo.Abp/System/AbpComparableExtensions.cs b/src/Volo.Abp.Core/System/AbpComparableExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpComparableExtensions.cs rename to src/Volo.Abp.Core/System/AbpComparableExtensions.cs diff --git a/src/Volo.Abp/System/AbpDayOfWeekExtensions.cs b/src/Volo.Abp.Core/System/AbpDayOfWeekExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpDayOfWeekExtensions.cs rename to src/Volo.Abp.Core/System/AbpDayOfWeekExtensions.cs diff --git a/src/Volo.Abp/System/AbpEventHandlerExtensions.cs b/src/Volo.Abp.Core/System/AbpEventHandlerExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpEventHandlerExtensions.cs rename to src/Volo.Abp.Core/System/AbpEventHandlerExtensions.cs diff --git a/src/Volo.Abp/System/AbpExceptionExtensions.cs b/src/Volo.Abp.Core/System/AbpExceptionExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpExceptionExtensions.cs rename to src/Volo.Abp.Core/System/AbpExceptionExtensions.cs diff --git a/src/Volo.Abp/System/AbpObjectExtensions.cs b/src/Volo.Abp.Core/System/AbpObjectExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpObjectExtensions.cs rename to src/Volo.Abp.Core/System/AbpObjectExtensions.cs diff --git a/src/Volo.Abp/System/AbpStringExtensions.cs b/src/Volo.Abp.Core/System/AbpStringExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpStringExtensions.cs rename to src/Volo.Abp.Core/System/AbpStringExtensions.cs diff --git a/src/Volo.Abp/System/AbpTypeExtensions.cs b/src/Volo.Abp.Core/System/AbpTypeExtensions.cs similarity index 100% rename from src/Volo.Abp/System/AbpTypeExtensions.cs rename to src/Volo.Abp.Core/System/AbpTypeExtensions.cs diff --git a/src/Volo.Abp/System/Collections/Generic/AbpCollectionExtensions.cs b/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs similarity index 100% rename from src/Volo.Abp/System/Collections/Generic/AbpCollectionExtensions.cs rename to src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs diff --git a/src/Volo.Abp/System/Collections/Generic/AbpDictionaryExtensions.cs b/src/Volo.Abp.Core/System/Collections/Generic/AbpDictionaryExtensions.cs similarity index 100% rename from src/Volo.Abp/System/Collections/Generic/AbpDictionaryExtensions.cs rename to src/Volo.Abp.Core/System/Collections/Generic/AbpDictionaryExtensions.cs diff --git a/src/Volo.Abp/System/Collections/Generic/AbpEnumerableExtensions.cs b/src/Volo.Abp.Core/System/Collections/Generic/AbpEnumerableExtensions.cs similarity index 100% rename from src/Volo.Abp/System/Collections/Generic/AbpEnumerableExtensions.cs rename to src/Volo.Abp.Core/System/Collections/Generic/AbpEnumerableExtensions.cs diff --git a/src/Volo.Abp/System/Collections/Generic/AbpListExtensions.cs b/src/Volo.Abp.Core/System/Collections/Generic/AbpListExtensions.cs similarity index 100% rename from src/Volo.Abp/System/Collections/Generic/AbpListExtensions.cs rename to src/Volo.Abp.Core/System/Collections/Generic/AbpListExtensions.cs diff --git a/src/Volo.Abp/System/IO/AbpStreamExtensions.cs b/src/Volo.Abp.Core/System/IO/AbpStreamExtensions.cs similarity index 100% rename from src/Volo.Abp/System/IO/AbpStreamExtensions.cs rename to src/Volo.Abp.Core/System/IO/AbpStreamExtensions.cs diff --git a/src/Volo.Abp/System/Linq/AbpQueryableExtensions.cs b/src/Volo.Abp.Core/System/Linq/AbpQueryableExtensions.cs similarity index 77% rename from src/Volo.Abp/System/Linq/AbpQueryableExtensions.cs rename to src/Volo.Abp.Core/System/Linq/AbpQueryableExtensions.cs index eb95316974..58b72e953b 100644 --- a/src/Volo.Abp/System/Linq/AbpQueryableExtensions.cs +++ b/src/Volo.Abp.Core/System/Linq/AbpQueryableExtensions.cs @@ -1,7 +1,6 @@ using System.Linq.Expressions; using JetBrains.Annotations; using Volo.Abp; -using Volo.Abp.Application.Dtos; namespace System.Linq { @@ -20,18 +19,6 @@ namespace System.Linq return query.Skip(skipCount).Take(maxResultCount); } - /// - /// Used for paging with an object. - /// - /// Queryable to apply paging - /// An object implements interface - public static IQueryable PageBy([NotNull] this IQueryable query, IPagedResultRequest pagedResultRequest) - { - Check.NotNull(query, nameof(query)); - - return query.PageBy(pagedResultRequest.SkipCount, pagedResultRequest.MaxResultCount); - } - /// /// Filters a by given predicate if given condition is true. /// diff --git a/src/Volo.Abp/System/Reflection/AbpMemberInfoExtensions.cs b/src/Volo.Abp.Core/System/Reflection/AbpMemberInfoExtensions.cs similarity index 100% rename from src/Volo.Abp/System/Reflection/AbpMemberInfoExtensions.cs rename to src/Volo.Abp.Core/System/Reflection/AbpMemberInfoExtensions.cs diff --git a/src/Volo.Abp/Volo/Abp/AbpApplicationBase.cs b/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs similarity index 98% rename from src/Volo.Abp/Volo/Abp/AbpApplicationBase.cs rename to src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs index f6811ba9be..ac5d87e284 100644 --- a/src/Volo.Abp/Volo/Abp/AbpApplicationBase.cs +++ b/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs @@ -37,6 +37,8 @@ namespace Volo.Abp services.AddSingleton(this); services.AddSingleton(this); + + services.AddCoreServices(); services.AddCoreAbpServices(this); Modules = LoadModules(services, options); diff --git a/src/Volo.Abp/Volo/Abp/AbpApplicationCreationOptions.cs b/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/AbpApplicationCreationOptions.cs rename to src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs diff --git a/src/Volo.Abp/Volo/Abp/AbpApplicationFactory.cs b/src/Volo.Abp.Core/Volo/Abp/AbpApplicationFactory.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/AbpApplicationFactory.cs rename to src/Volo.Abp.Core/Volo/Abp/AbpApplicationFactory.cs diff --git a/src/Volo.Abp/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs b/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs rename to src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs diff --git a/src/Volo.Abp/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs b/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs rename to src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs diff --git a/src/Volo.Abp/Volo/Abp/AbpException.cs b/src/Volo.Abp.Core/Volo/Abp/AbpException.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/AbpException.cs rename to src/Volo.Abp.Core/Volo/Abp/AbpException.cs diff --git a/src/Volo.Abp/Volo/Abp/ApplicationInitializationContext.cs b/src/Volo.Abp.Core/Volo/Abp/ApplicationInitializationContext.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/ApplicationInitializationContext.cs rename to src/Volo.Abp.Core/Volo/Abp/ApplicationInitializationContext.cs diff --git a/src/Volo.Abp/Volo/Abp/ApplicationShutdownContext.cs b/src/Volo.Abp.Core/Volo/Abp/ApplicationShutdownContext.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/ApplicationShutdownContext.cs rename to src/Volo.Abp.Core/Volo/Abp/ApplicationShutdownContext.cs diff --git a/src/Volo.Abp/Volo/Abp/Check.cs b/src/Volo.Abp.Core/Volo/Abp/Check.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Check.cs rename to src/Volo.Abp.Core/Volo/Abp/Check.cs diff --git a/src/Volo.Abp/Volo/Abp/Collections/ITypeList.cs b/src/Volo.Abp.Core/Volo/Abp/Collections/ITypeList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Collections/ITypeList.cs rename to src/Volo.Abp.Core/Volo/Abp/Collections/ITypeList.cs diff --git a/src/Volo.Abp/Volo/Abp/Collections/TypeList.cs b/src/Volo.Abp.Core/Volo/Abp/Collections/TypeList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Collections/TypeList.cs rename to src/Volo.Abp.Core/Volo/Abp/Collections/TypeList.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/AutoRegistrationHelper.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/AutoRegistrationHelper.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/AutoRegistrationHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/AutoRegistrationHelper.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ConventionalRegistrarList.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ConventionalRegistrarList.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarList.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/DependencyAttribute.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DependencyAttribute.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/DependencyAttribute.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DependencyAttribute.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/DisableConventionalRegistrationAttribute.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DisableConventionalRegistrationAttribute.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/DisableConventionalRegistrationAttribute.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DisableConventionalRegistrationAttribute.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ExposeServicesAttribute.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ExposeServicesAttribute.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ExposeServicesAttribute.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ExposeServicesAttribute.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IConventionalRegistrar.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IConventionalRegistrar.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IConventionalRegistrar.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IConventionalRegistrar.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IExposedServiceTypesProvider.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IExposedServiceTypesProvider.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IExposedServiceTypesProvider.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IExposedServiceTypesProvider.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IObjectAccessor.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IObjectAccessor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IObjectAccessor.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IObjectAccessor.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IOnServiceRegistredContext.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IOnServiceRegistredContext.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IOnServiceRegistredContext.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IOnServiceRegistredContext.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IScopedDependency.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IScopedDependency.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IScopedDependency.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IScopedDependency.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/IServiceProviderAccessor.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IServiceProviderAccessor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/IServiceProviderAccessor.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IServiceProviderAccessor.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ISingletonDependency.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ISingletonDependency.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ISingletonDependency.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ISingletonDependency.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ITransientDependency.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ITransientDependency.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ITransientDependency.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ITransientDependency.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ObjectAccessor.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ObjectAccessor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ObjectAccessor.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ObjectAccessor.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/OnServiceRegistredContext.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceRegistredContext.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/OnServiceRegistredContext.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceRegistredContext.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ServiceExposingActionList.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceExposingActionList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ServiceExposingActionList.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceExposingActionList.cs diff --git a/src/Volo.Abp/Volo/Abp/DependencyInjection/ServiceRegistrationActionList.cs b/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceRegistrationActionList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DependencyInjection/ServiceRegistrationActionList.cs rename to src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceRegistrationActionList.cs diff --git a/src/Volo.Abp/Volo/Abp/DisposeAction.cs b/src/Volo.Abp.Core/Volo/Abp/DisposeAction.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DisposeAction.cs rename to src/Volo.Abp.Core/Volo/Abp/DisposeAction.cs diff --git a/src/Volo.Abp/Volo/Abp/DynamicProxy/AbpInterceptor.cs b/src/Volo.Abp.Core/Volo/Abp/DynamicProxy/AbpInterceptor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DynamicProxy/AbpInterceptor.cs rename to src/Volo.Abp.Core/Volo/Abp/DynamicProxy/AbpInterceptor.cs diff --git a/src/Volo.Abp/Volo/Abp/DynamicProxy/IAbpInterceptor.cs b/src/Volo.Abp.Core/Volo/Abp/DynamicProxy/IAbpInterceptor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DynamicProxy/IAbpInterceptor.cs rename to src/Volo.Abp.Core/Volo/Abp/DynamicProxy/IAbpInterceptor.cs diff --git a/src/Volo.Abp/Volo/Abp/DynamicProxy/IAbpMethodInvocation.cs b/src/Volo.Abp.Core/Volo/Abp/DynamicProxy/IAbpMethodInvocation.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DynamicProxy/IAbpMethodInvocation.cs rename to src/Volo.Abp.Core/Volo/Abp/DynamicProxy/IAbpMethodInvocation.cs diff --git a/src/Volo.Abp/Volo/Abp/DynamicProxy/ProxyHelper.cs b/src/Volo.Abp.Core/Volo/Abp/DynamicProxy/ProxyHelper.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/DynamicProxy/ProxyHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/DynamicProxy/ProxyHelper.cs diff --git a/src/Volo.Abp/Volo/Abp/IAbpApplication.cs b/src/Volo.Abp.Core/Volo/Abp/IAbpApplication.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/IAbpApplication.cs rename to src/Volo.Abp.Core/Volo/Abp/IAbpApplication.cs diff --git a/src/Volo.Abp/Volo/Abp/IAbpApplicationWithExternalServiceProvider.cs b/src/Volo.Abp.Core/Volo/Abp/IAbpApplicationWithExternalServiceProvider.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/IAbpApplicationWithExternalServiceProvider.cs rename to src/Volo.Abp.Core/Volo/Abp/IAbpApplicationWithExternalServiceProvider.cs diff --git a/src/Volo.Abp/Volo/Abp/IAbpApplicationWithInternalServiceProvider.cs b/src/Volo.Abp.Core/Volo/Abp/IAbpApplicationWithInternalServiceProvider.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/IAbpApplicationWithInternalServiceProvider.cs rename to src/Volo.Abp.Core/Volo/Abp/IAbpApplicationWithInternalServiceProvider.cs diff --git a/src/Volo.Abp/Volo/Abp/IOnApplicationInitialization.cs b/src/Volo.Abp.Core/Volo/Abp/IOnApplicationInitialization.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/IOnApplicationInitialization.cs rename to src/Volo.Abp.Core/Volo/Abp/IOnApplicationInitialization.cs diff --git a/src/Volo.Abp/Volo/Abp/IOnApplicationShutdown.cs b/src/Volo.Abp.Core/Volo/Abp/IOnApplicationShutdown.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/IOnApplicationShutdown.cs rename to src/Volo.Abp.Core/Volo/Abp/IOnApplicationShutdown.cs diff --git a/src/Volo.Abp/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs b/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs similarity index 50% rename from src/Volo.Abp/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs rename to src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs index cb1029876d..8c7b4d4a9b 100644 --- a/src/Volo.Abp/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs +++ b/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs @@ -7,6 +7,13 @@ namespace Volo.Abp.Internal { internal static class InternalServiceCollectionExtensions { + internal static void AddCoreServices(this IServiceCollection services) + { + services.AddOptions(); + services.AddLogging(); + services.AddLocalization(); + } + internal static void AddCoreAbpServices(this IServiceCollection services, IAbpApplication abpApplication) { var moduleLoader = new ModuleLoader(); @@ -16,6 +23,16 @@ namespace Volo.Abp.Internal services.TryAddSingleton(moduleLoader); services.TryAddSingleton(assemblyFinder); services.TryAddSingleton(typeFinder); + + services.AddAssemblyOf(); + + services.Configure(options => + { + options.Contributers.Add(); + options.Contributers.Add(); + options.Contributers.Add(); + options.Contributers.Add(); + }); } } } \ No newline at end of file diff --git a/src/Volo.Abp/Volo/Abp/Internal/Utf8Helper.cs b/src/Volo.Abp.Core/Volo/Abp/Internal/Utf8Helper.cs similarity index 94% rename from src/Volo.Abp/Volo/Abp/Internal/Utf8Helper.cs rename to src/Volo.Abp.Core/Volo/Abp/Internal/Utf8Helper.cs index b7e7297e68..bde6c16bdf 100644 --- a/src/Volo.Abp/Volo/Abp/Internal/Utf8Helper.cs +++ b/src/Volo.Abp.Core/Volo/Abp/Internal/Utf8Helper.cs @@ -3,7 +3,7 @@ using System.Text; namespace Volo.Abp.Internal { - internal static class Utf8Helper + public static class Utf8Helper { public static string ReadStringFromStream(Stream stream) { diff --git a/src/Volo.Abp.Core/Volo/Abp/Logging/IExceptionCanLogDetails.cs b/src/Volo.Abp.Core/Volo/Abp/Logging/IExceptionCanLogDetails.cs new file mode 100644 index 0000000000..eabef4dc83 --- /dev/null +++ b/src/Volo.Abp.Core/Volo/Abp/Logging/IExceptionCanLogDetails.cs @@ -0,0 +1,9 @@ +using Microsoft.Extensions.Logging; + +namespace Volo.Abp.Logging +{ + public interface IExceptionCanLogDetails + { + void LogDetails(ILogger logger); + } +} \ No newline at end of file diff --git a/src/Volo.Abp/Volo/Abp/Logging/IHasLogLevel.cs b/src/Volo.Abp.Core/Volo/Abp/Logging/IHasLogLevel.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Logging/IHasLogLevel.cs rename to src/Volo.Abp.Core/Volo/Abp/Logging/IHasLogLevel.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/AbpModule.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModule.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/AbpModule.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModule.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/AbpModuleDescriptor.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleDescriptor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/AbpModuleDescriptor.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleDescriptor.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/AbpModuleHelper.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleHelper.cs similarity index 96% rename from src/Volo.Abp/Volo/Abp/Modularity/AbpModuleHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleHelper.cs index 295356ad31..ace08b293e 100644 --- a/src/Volo.Abp/Volo/Abp/Modularity/AbpModuleHelper.cs +++ b/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleHelper.cs @@ -11,7 +11,6 @@ namespace Volo.Abp.Modularity { var moduleTypes = new List(); AddModuleAndDependenciesResursively(moduleTypes, startupModuleType); - moduleTypes.AddIfNotContains(typeof(AbpKernelModule)); return moduleTypes; } diff --git a/src/Volo.Abp/Volo/Abp/Modularity/DefaultModuleLifecycleContributer.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/DefaultModuleLifecycleContributer.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/DefaultModuleLifecycleContributer.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/DefaultModuleLifecycleContributer.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/DependsOnAttribute.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/DependsOnAttribute.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/DependsOnAttribute.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/DependsOnAttribute.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IAbpModule.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IAbpModule.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IAbpModuleDescriptor.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModuleDescriptor.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IAbpModuleDescriptor.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModuleDescriptor.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IDependedModuleTypesProvider.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IDependedModuleTypesProvider.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IDependedModuleTypesProvider.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IDependedModuleTypesProvider.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IModuleContainer.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleContainer.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IModuleContainer.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleContainer.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IModuleLifecycleContributer.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleLifecycleContributer.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IModuleLifecycleContributer.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleLifecycleContributer.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IModuleLoader.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleLoader.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IModuleLoader.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleLoader.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IModuleManager.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleManager.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IModuleManager.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IModuleManager.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IOnPostApplicationInitialization.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IOnPostApplicationInitialization.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IOnPostApplicationInitialization.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IOnPostApplicationInitialization.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IOnPreApplicationInitialization.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IOnPreApplicationInitialization.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IOnPreApplicationInitialization.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IOnPreApplicationInitialization.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IPostConfigureServices.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IPostConfigureServices.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IPostConfigureServices.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IPostConfigureServices.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/IPreConfigureServices.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/IPreConfigureServices.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/IPreConfigureServices.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/IPreConfigureServices.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/ModuleLifecycleOptions.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleOptions.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/ModuleLifecycleOptions.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleOptions.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/ModuleLoader.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLoader.cs similarity index 98% rename from src/Volo.Abp/Volo/Abp/Modularity/ModuleLoader.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLoader.cs index 4c28f2b316..762cbde139 100644 --- a/src/Volo.Abp/Volo/Abp/Modularity/ModuleLoader.cs +++ b/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLoader.cs @@ -73,7 +73,6 @@ namespace Volo.Abp.Modularity protected virtual List SortByDependency(List modules, Type startupModuleType) { var sortedModules = modules.SortByDependencies(m => m.Dependencies); - sortedModules.MoveItem(m => m.Type == typeof(AbpKernelModule), 0); sortedModules.MoveItem(m => m.Type == startupModuleType, modules.Count - 1); return sortedModules; } diff --git a/src/Volo.Abp/Volo/Abp/Modularity/ModuleManager.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/ModuleManager.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/FilePlugInSource.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/FilePlugInSource.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/FilePlugInSource.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/FilePlugInSource.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/FolderPlugInSource.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/FolderPlugInSource.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/FolderPlugInSource.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/FolderPlugInSource.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/IPlugInSource.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/IPlugInSource.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/IPlugInSource.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/IPlugInSource.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/PlugInSourceExtensions.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/PlugInSourceExtensions.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/PlugInSourceExtensions.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/PlugInSourceExtensions.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/PlugInSourceList.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/PlugInSourceList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/PlugInSourceList.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/PlugInSourceList.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/PlugInSourceListExtensions.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/PlugInSourceListExtensions.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/PlugInSourceListExtensions.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/PlugInSourceListExtensions.cs diff --git a/src/Volo.Abp/Volo/Abp/Modularity/PlugIns/TypePlugInSource.cs b/src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/TypePlugInSource.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Modularity/PlugIns/TypePlugInSource.cs rename to src/Volo.Abp.Core/Volo/Abp/Modularity/PlugIns/TypePlugInSource.cs diff --git a/src/Volo.Abp/Volo/Abp/NullDisposable.cs b/src/Volo.Abp.Core/Volo/Abp/NullDisposable.cs similarity index 81% rename from src/Volo.Abp/Volo/Abp/NullDisposable.cs rename to src/Volo.Abp.Core/Volo/Abp/NullDisposable.cs index ddc174eb64..c7af9e2292 100644 --- a/src/Volo.Abp/Volo/Abp/NullDisposable.cs +++ b/src/Volo.Abp.Core/Volo/Abp/NullDisposable.cs @@ -2,7 +2,7 @@ using System; namespace Volo.Abp { - internal sealed class NullDisposable : IDisposable + public sealed class NullDisposable : IDisposable { public static NullDisposable Instance { get; } = new NullDisposable(); diff --git a/src/Volo.Abp/Volo/Abp/Options/PreConfigureActionList.cs b/src/Volo.Abp.Core/Volo/Abp/Options/PreConfigureActionList.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Options/PreConfigureActionList.cs rename to src/Volo.Abp.Core/Volo/Abp/Options/PreConfigureActionList.cs diff --git a/src/Volo.Abp/Volo/Abp/RandomHelper.cs b/src/Volo.Abp.Core/Volo/Abp/RandomHelper.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/RandomHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/RandomHelper.cs diff --git a/src/Volo.Abp/Volo/Abp/Reflection/AssemblyFinder.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/AssemblyFinder.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Reflection/AssemblyFinder.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/AssemblyFinder.cs diff --git a/src/Volo.Abp/Volo/Abp/Reflection/AssemblyHelper.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/AssemblyHelper.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Reflection/AssemblyHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/AssemblyHelper.cs diff --git a/src/Volo.Abp/Volo/Abp/Reflection/IAssemblyFinder.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/IAssemblyFinder.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Reflection/IAssemblyFinder.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/IAssemblyFinder.cs diff --git a/src/Volo.Abp/Volo/Abp/Reflection/ITypeFinder.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/ITypeFinder.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Reflection/ITypeFinder.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/ITypeFinder.cs diff --git a/src/Volo.Abp/Volo/Abp/Reflection/ReflectionHelper.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs similarity index 98% rename from src/Volo.Abp/Volo/Abp/Reflection/ReflectionHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs index 4a90159789..1c4b162b21 100644 --- a/src/Volo.Abp/Volo/Abp/Reflection/ReflectionHelper.cs +++ b/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs @@ -111,7 +111,7 @@ namespace Volo.Abp.Reflection /// /// Gets value of a property by it's full path from given object /// - internal static object GetValueByPath(object obj, Type objectType, string propertyPath) + public static object GetValueByPath(object obj, Type objectType, string propertyPath) { var value = obj; var currentType = objectType; diff --git a/src/Volo.Abp/Volo/Abp/Reflection/TypeFinder.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Reflection/TypeFinder.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs diff --git a/src/Volo.Abp/Volo/Abp/Reflection/TypeHelper.cs b/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs similarity index 100% rename from src/Volo.Abp/Volo/Abp/Reflection/TypeHelper.cs rename to src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs diff --git a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs index 6c1947ebd7..187f553054 100644 --- a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs +++ b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs @@ -5,6 +5,7 @@ using Volo.Abp.Uow.EntityFrameworkCore; namespace Volo.Abp.EntityFrameworkCore { + [DependsOn(typeof(AbpCommonModule))] public class AbpEntityFrameworkCoreModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp.Http/Volo.Abp.Http.csproj b/src/Volo.Abp.Http/Volo.Abp.Http.csproj index dfd933615c..d0a34a1b8b 100644 --- a/src/Volo.Abp.Http/Volo.Abp.Http.csproj +++ b/src/Volo.Abp.Http/Volo.Abp.Http.csproj @@ -15,7 +15,6 @@ - \ No newline at end of file diff --git a/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs b/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs index 19548f2171..be7d5df91a 100644 --- a/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs +++ b/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.Modularity; namespace Volo.Abp.Identity { + [DependsOn(typeof(AbpCommonModule))] public class AbpIdentityApplicationContractsModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs b/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs index ffb7b7cb80..91be79aef7 100644 --- a/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs +++ b/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs @@ -2,6 +2,7 @@ namespace Volo.Abp.Identity { + [DependsOn(typeof(AbpCommonModule))] public class AbpIdentityDomainSharedModule : AbpModule { diff --git a/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbModule.cs b/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbModule.cs index 7a009991d3..d9a453310c 100644 --- a/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbModule.cs +++ b/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbModule.cs @@ -5,6 +5,7 @@ using Volo.Abp.Uow.MemoryDb; namespace Volo.Abp.MemoryDb { + [DependsOn(typeof(AbpCommonModule))] public class AbpMemoryDbModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs b/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs index 0accee847a..6b6e5aca36 100644 --- a/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs +++ b/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs @@ -5,6 +5,7 @@ using Volo.Abp.Uow.MongoDB; namespace Volo.Abp.MongoDB { + [DependsOn(typeof(AbpCommonModule))] public class AbpMongoDbModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs b/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs index d92f07bcf6..ad2162c944 100644 --- a/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs +++ b/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.Modularity; namespace Volo.Abp.MultiTenancy { + [DependsOn(typeof(AbpCommonModule))] public class AbpMultiTenancyModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp.TestBase/AbpTestBaseModule.cs b/src/Volo.Abp.TestBase/AbpTestBaseModule.cs index 859ccb3e72..c705dc1885 100644 --- a/src/Volo.Abp.TestBase/AbpTestBaseModule.cs +++ b/src/Volo.Abp.TestBase/AbpTestBaseModule.cs @@ -2,6 +2,7 @@ namespace Volo.Abp.TestBase { + [DependsOn(typeof(AbpCommonModule))] public class AbpTestBaseModule : AbpModule { diff --git a/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemModule.cs b/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemModule.cs index cef8ab811e..0f25bebd61 100644 --- a/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemModule.cs +++ b/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.Modularity; namespace Volo.Abp.VirtualFileSystem { + [DependsOn(typeof(AbpCommonModule))] public class AbpVirtualFileSystemModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/src/Volo.Abp/System/Linq/AbpPagingQueryableExtensions.cs b/src/Volo.Abp/System/Linq/AbpPagingQueryableExtensions.cs new file mode 100644 index 0000000000..bb1fc621dc --- /dev/null +++ b/src/Volo.Abp/System/Linq/AbpPagingQueryableExtensions.cs @@ -0,0 +1,21 @@ +using JetBrains.Annotations; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace System.Linq +{ + public static class AbpPagingQueryableExtensions + { + /// + /// Used for paging with an object. + /// + /// Queryable to apply paging + /// An object implements interface + public static IQueryable PageBy([NotNull] this IQueryable query, IPagedResultRequest pagedResultRequest) + { + Check.NotNull(query, nameof(query)); + + return query.PageBy(pagedResultRequest.SkipCount, pagedResultRequest.MaxResultCount); + } + } +} diff --git a/src/Volo.Abp/Volo.Abp.csproj b/src/Volo.Abp/Volo.Abp.csproj index 3122d6de78..f2d2573019 100644 --- a/src/Volo.Abp/Volo.Abp.csproj +++ b/src/Volo.Abp/Volo.Abp.csproj @@ -21,4 +21,8 @@ + + + + diff --git a/src/Volo.Abp/Volo/Abp/AbpKernelModule.cs b/src/Volo.Abp/Volo/Abp/AbpCommonModule.cs similarity index 70% rename from src/Volo.Abp/Volo/Abp/AbpKernelModule.cs rename to src/Volo.Abp/Volo/Abp/AbpCommonModule.cs index 575863d6a6..6a3c90662c 100644 --- a/src/Volo.Abp/Volo/Abp/AbpKernelModule.cs +++ b/src/Volo.Abp/Volo/Abp/AbpCommonModule.cs @@ -12,7 +12,7 @@ using Volo.Abp.Validation; namespace Volo.Abp { - public class AbpKernelModule : AbpModule + public class AbpCommonModule : AbpModule { public override void PreConfigureServices(IServiceCollection services) { @@ -34,30 +34,18 @@ namespace Volo.Abp public override void ConfigureServices(IServiceCollection services) { - services.AddOptions(); - services.AddLogging(); - services.AddLocalization(); - AbpStringLocalizerFactory.Replace(services); - services.AddAssemblyOf(); - services.AddSingleton(NullCancellationTokenProvider.Instance); services.AddSingleton(NullRequestedApiVersion.Instance); services.AddSingleton(typeof(IDataFilter<>), typeof(DataFilter<>)); - services.Configure(options => - { - options.Contributers.Add(); - options.Contributers.Add(); - options.Contributers.Add(); - options.Contributers.Add(); - }); - services.Configure(options => { options.Resources.AddJson("en"); }); + + services.AddAssemblyOf(); } } } diff --git a/src/Volo.Abp/Volo/Abp/Validation/AbpValidationException.cs b/src/Volo.Abp/Volo/Abp/Validation/AbpValidationException.cs index 427e369e4f..ea99c262cf 100644 --- a/src/Volo.Abp/Volo/Abp/Validation/AbpValidationException.cs +++ b/src/Volo.Abp/Volo/Abp/Validation/AbpValidationException.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Linq; using System.Runtime.Serialization; using Microsoft.Extensions.Logging; using Volo.Abp.Logging; @@ -11,7 +12,7 @@ namespace Volo.Abp.Validation /// This exception type is used to throws validation exceptions. /// [Serializable] - public class AbpValidationException : AbpException, IHasLogLevel, IHasValidationErrors + public class AbpValidationException : AbpException, IHasLogLevel, IHasValidationErrors, IExceptionCanLogDetails { /// /// Detailed list of validation errors for this exception. @@ -77,5 +78,25 @@ namespace Volo.Abp.Validation ValidationErrors = new List(); LogLevel = LogLevel.Warning; } + + public void LogDetails(ILogger logger) + { + if (ValidationErrors.IsNullOrEmpty()) + { + return; + } + + logger.LogWithLevel(LogLevel, "There are " + ValidationErrors.Count + " validation errors:"); + foreach (var validationResult in ValidationErrors) + { + var memberNames = ""; + if (validationResult.MemberNames != null && validationResult.MemberNames.Any()) + { + memberNames = " (" + string.Join(", ", validationResult.MemberNames) + ")"; + } + + logger.LogWithLevel(LogLevel, validationResult.ErrorMessage + memberNames); + } + } } } diff --git a/test/SimpleConsoleDemo/Program.cs b/test/SimpleConsoleDemo/Program.cs index 8193538354..182f763c09 100644 --- a/test/SimpleConsoleDemo/Program.cs +++ b/test/SimpleConsoleDemo/Program.cs @@ -30,6 +30,7 @@ namespace SimpleConsoleDemo } } + [DependsOn(typeof(AbpCommonModule))] public class MyConsoleModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj index 5c04368a4b..7e829b67f9 100644 --- a/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj +++ b/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj @@ -13,7 +13,6 @@ - diff --git a/test/Volo.Abp.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs b/test/Volo.Abp.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs index 6317f2f8d7..d894c30ff9 100644 --- a/test/Volo.Abp.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs +++ b/test/Volo.Abp.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs @@ -38,6 +38,7 @@ namespace Volo.Abp.Data _connectionStringResolver.Resolve(Database2Name).ShouldBe(DefaultConnString); } + [DependsOn(typeof(AbpCommonModule))] public class TestModule : AbpModule { public override void ConfigureServices(IServiceCollection services) diff --git a/test/Volo.Abp.Tests/Volo/Abp/Modularity/IndependentEmptyModule.cs b/test/Volo.Abp.Tests/Volo/Abp/Modularity/IndependentEmptyModule.cs index 9f4fca906a..5112dc4d40 100644 --- a/test/Volo.Abp.Tests/Volo/Abp/Modularity/IndependentEmptyModule.cs +++ b/test/Volo.Abp.Tests/Volo/Abp/Modularity/IndependentEmptyModule.cs @@ -1,5 +1,6 @@ namespace Volo.Abp.Modularity { + [DependsOn(typeof(AbpCommonModule))] public class IndependentEmptyModule : TestModuleBase { diff --git a/test/Volo.Abp.Tests/Volo/Abp/Modularity/ModuleLoader_Tests.cs b/test/Volo.Abp.Tests/Volo/Abp/Modularity/ModuleLoader_Tests.cs index 74e45d91b0..f062af8981 100644 --- a/test/Volo.Abp.Tests/Volo/Abp/Modularity/ModuleLoader_Tests.cs +++ b/test/Volo.Abp.Tests/Volo/Abp/Modularity/ModuleLoader_Tests.cs @@ -13,12 +13,13 @@ namespace Volo.Abp.Modularity var moduleLoader = new ModuleLoader(); var modules = moduleLoader.LoadModules(new ServiceCollection(), typeof(MyStartupModule), new PlugInSourceList()); modules.Length.ShouldBe(3); - modules[0].Type.ShouldBe(typeof(AbpKernelModule)); + modules[0].Type.ShouldBe(typeof(AbpCommonModule)); modules[1].Type.ShouldBe(typeof(IndependentEmptyModule)); modules[2].Type.ShouldBe(typeof(MyStartupModule)); } [DependsOn(typeof(IndependentEmptyModule))] + [DependsOn(typeof(AbpCommonModule))] public class MyStartupModule : IAbpModule { public void ConfigureServices(IServiceCollection services) diff --git a/test/Volo.Abp.Tests/Volo/Abp/Reflection/AssemblyFinder_Tests.cs b/test/Volo.Abp.Tests/Volo/Abp/Reflection/AssemblyFinder_Tests.cs index 37c5b01518..367b0aac8b 100644 --- a/test/Volo.Abp.Tests/Volo/Abp/Reflection/AssemblyFinder_Tests.cs +++ b/test/Volo.Abp.Tests/Volo/Abp/Reflection/AssemblyFinder_Tests.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.Reflection [Theory] [InlineData(new object[] { new Type[] { } })] [InlineData(new object[] { new[] { typeof(IndependentEmptyModule) } })] - [InlineData(new object[] { new[] { typeof(AbpKernelModule), typeof(IndependentEmptyModule) } })] + [InlineData(new object[] { new[] { typeof(AbpCommonModule), typeof(IndependentEmptyModule) } })] public void Should_Get_Assemblies_Of_Given_Modules(Type[] moduleTypes) { //Arrange diff --git a/test/Volo.Abp.Tests/Volo/Abp/Reflection/TypeFinder_Tests.cs b/test/Volo.Abp.Tests/Volo/Abp/Reflection/TypeFinder_Tests.cs index c4be4e9f6d..48242b4285 100644 --- a/test/Volo.Abp.Tests/Volo/Abp/Reflection/TypeFinder_Tests.cs +++ b/test/Volo.Abp.Tests/Volo/Abp/Reflection/TypeFinder_Tests.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.Reflection var fakeAssemblyFinder = Substitute.For(); fakeAssemblyFinder.Assemblies.Returns(new List { - typeof(AbpKernelModule).Assembly, + typeof(AbpCommonModule).Assembly, typeof(TypeFinder_Tests).Assembly }); @@ -26,7 +26,7 @@ namespace Volo.Abp.Reflection //Assert - typeFinder.Types.ShouldContain(typeof(AbpKernelModule)); + typeFinder.Types.ShouldContain(typeof(AbpCommonModule)); typeFinder.Types.ShouldContain(typeof(TypeFinder_Tests)); } } diff --git a/test/Volo.Abp.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs b/test/Volo.Abp.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs index aefab8b35b..bf286dd056 100644 --- a/test/Volo.Abp.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs +++ b/test/Volo.Abp.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs @@ -32,6 +32,7 @@ namespace Volo.Abp.Ui.Navigation mainMenu.Items[1].Items[2].Name.ShouldBe("Administration.DashboardSettings"); } + [DependsOn(typeof(AbpCommonModule))] public class TestModule : AbpModule { public override void ConfigureServices(IServiceCollection services)