From 5de19c03f73b0c338c8179c36502538610a33782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 18 Dec 2017 17:29:56 +0300 Subject: [PATCH] Created Volo.Abp.Core package. --- .../AbpDeskApplicationContractsModule.cs | 11 ++++ .../AbpDesk/AbpDeskApplicationModule.cs | 6 ++- .../AbpDesk/AbpDeskDomainModule.cs | 2 + .../AbpDeskSamplePlugInModule.cs | 2 + src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll | Bin 14848 -> 15360 bytes .../AbpAccountApplicationContractsModule.cs | 1 + .../Abp/AutoMapper/AbpAutoMapperModule.cs | 1 + src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj | 1 - .../Volo/Abp/Castle/AbpCastleCoreModule.cs | 1 + .../ServiceCollectionApplicationExtensions.cs | 0 .../ServiceCollectionCommonExtensions.cs | 8 +-- ...ctionConventionalRegistrationExtensions.cs | 0 ...rviceCollectionObjectAccessorExtensions.cs | 0 ...ServiceCollectionPreConfigureExtensions.cs | 0 ...eCollectionRegistrationActionExtensions.cs | 0 .../Extensions/Logging/LoggerExtensions.cs | 47 ++++++++---------- .../System/AbpComparableExtensions.cs | 0 .../System/AbpDayOfWeekExtensions.cs | 0 .../System/AbpEventHandlerExtensions.cs | 0 .../System/AbpExceptionExtensions.cs | 0 .../System/AbpObjectExtensions.cs | 0 .../System/AbpStringExtensions.cs | 0 .../System/AbpTypeExtensions.cs | 0 .../Generic/AbpCollectionExtensions.cs | 0 .../Generic/AbpDictionaryExtensions.cs | 0 .../Generic/AbpEnumerableExtensions.cs | 0 .../Collections/Generic/AbpListExtensions.cs | 0 .../System/IO/AbpStreamExtensions.cs | 0 .../System/Linq/AbpQueryableExtensions.cs | 13 ----- .../Reflection/AbpMemberInfoExtensions.cs | 0 .../Volo/Abp/AbpApplicationBase.cs | 2 + .../Volo/Abp/AbpApplicationCreationOptions.cs | 0 .../Volo/Abp/AbpApplicationFactory.cs | 0 ...pApplicationWithExternalServiceProvider.cs | 0 ...pApplicationWithInternalServiceProvider.cs | 0 .../Volo/Abp/AbpException.cs | 0 .../Abp/ApplicationInitializationContext.cs | 0 .../Volo/Abp/ApplicationShutdownContext.cs | 0 .../Volo/Abp/Check.cs | 0 .../Volo/Abp/Collections/ITypeList.cs | 0 .../Volo/Abp/Collections/TypeList.cs | 0 .../AutoRegistrationHelper.cs | 0 .../ConventionalRegistrarBase.cs | 0 .../ConventionalRegistrarList.cs | 0 .../DefaultConventionalRegistrar.cs | 0 .../DependencyAttribute.cs | 0 ...isableConventionalRegistrationAttribute.cs | 0 .../ExposeServicesAttribute.cs | 0 .../IConventionalRegistrar.cs | 0 .../IExposedServiceTypesProvider.cs | 0 .../DependencyInjection/IObjectAccessor.cs | 0 .../IOnServiceRegistredContext.cs | 0 .../DependencyInjection/IScopedDependency.cs | 0 .../IServiceExposingArgs.cs | 0 .../IServiceProviderAccessor.cs | 0 .../ISingletonDependency.cs | 0 .../ITransientDependency.cs | 0 .../Abp/DependencyInjection/ObjectAccessor.cs | 0 .../OnServiceExposingArgs.cs | 0 .../OnServiceRegistredContext.cs | 0 .../ServiceExposingActionList.cs | 0 .../ServiceRegistrationActionList.cs | 0 .../Volo/Abp/DisposeAction.cs | 0 .../Volo/Abp/DynamicProxy/AbpInterceptor.cs | 0 .../Volo/Abp/DynamicProxy/IAbpInterceptor.cs | 0 .../Abp/DynamicProxy/IAbpMethodInvocation.cs | 0 .../Volo/Abp/DynamicProxy/ProxyHelper.cs | 0 .../Volo/Abp/IAbpApplication.cs | 0 ...pApplicationWithExternalServiceProvider.cs | 0 ...pApplicationWithInternalServiceProvider.cs | 0 .../Volo/Abp/IOnApplicationInitialization.cs | 0 .../Volo/Abp/IOnApplicationShutdown.cs | 0 .../InternalServiceCollectionExtensions.cs | 17 +++++++ .../Volo/Abp/Internal/Utf8Helper.cs | 2 +- .../Abp/Logging/IExceptionCanLogDetails.cs | 9 ++++ .../Volo/Abp/Logging/IHasLogLevel.cs | 0 .../Volo/Abp/Modularity/AbpModule.cs | 0 .../Abp/Modularity/AbpModuleDescriptor.cs | 0 .../Volo/Abp/Modularity/AbpModuleHelper.cs | 1 - .../DefaultModuleLifecycleContributer.cs | 0 .../Volo/Abp/Modularity/DependsOnAttribute.cs | 0 .../Volo/Abp/Modularity/IAbpModule.cs | 0 .../Abp/Modularity/IAbpModuleDescriptor.cs | 0 .../IDependedModuleTypesProvider.cs | 0 .../Volo/Abp/Modularity/IModuleContainer.cs | 0 .../Modularity/IModuleLifecycleContributer.cs | 0 .../Volo/Abp/Modularity/IModuleLoader.cs | 0 .../Volo/Abp/Modularity/IModuleManager.cs | 0 .../IOnPostApplicationInitialization.cs | 0 .../IOnPreApplicationInitialization.cs | 0 .../Abp/Modularity/IPostConfigureServices.cs | 0 .../Abp/Modularity/IPreConfigureServices.cs | 0 .../ModuleLifecycleContributerBase.cs | 0 .../Abp/Modularity/ModuleLifecycleOptions.cs | 0 .../Volo/Abp/Modularity/ModuleLoader.cs | 1 - .../Volo/Abp/Modularity/ModuleManager.cs | 0 .../Modularity/PlugIns/FilePlugInSource.cs | 0 .../Modularity/PlugIns/FolderPlugInSource.cs | 0 .../Abp/Modularity/PlugIns/IPlugInSource.cs | 0 .../PlugIns/PlugInSourceExtensions.cs | 0 .../Modularity/PlugIns/PlugInSourceList.cs | 0 .../PlugIns/PlugInSourceListExtensions.cs | 0 .../Modularity/PlugIns/TypePlugInSource.cs | 0 .../Volo/Abp/NullDisposable.cs | 2 +- .../Abp/Options/PreConfigureActionList.cs | 0 .../Volo/Abp/RandomHelper.cs | 0 .../Volo/Abp/Reflection/AssemblyFinder.cs | 0 .../Volo/Abp/Reflection/AssemblyHelper.cs | 0 .../Volo/Abp/Reflection/IAssemblyFinder.cs | 0 .../Volo/Abp/Reflection/ITypeFinder.cs | 0 .../Volo/Abp/Reflection/ReflectionHelper.cs | 2 +- .../Volo/Abp/Reflection/TypeFinder.cs | 0 .../Volo/Abp/Reflection/TypeHelper.cs | 0 .../AbpEntityFrameworkCoreModule.cs | 1 + src/Volo.Abp.Http/Volo.Abp.Http.csproj | 1 - .../AbpIdentityApplicationContractsModule.cs | 1 + .../Identity/AbpIdentityDomainSharedModule.cs | 1 + .../Volo/Abp/MemoryDb/AbpMemoryDbModule.cs | 1 + .../Volo/Abp/MongoDB/AbpMongoDbModule.cs | 1 + .../Abp/MultiTenancy/AbpMultiTenancyModule.cs | 1 + src/Volo.Abp.TestBase/AbpTestBaseModule.cs | 1 + .../AbpVirtualFileSystemModule.cs | 1 + .../Linq/AbpPagingQueryableExtensions.cs | 21 ++++++++ src/Volo.Abp/Volo.Abp.csproj | 4 ++ ...{AbpKernelModule.cs => AbpCommonModule.cs} | 18 ++----- .../Abp/Validation/AbpValidationException.cs | 23 ++++++++- test/SimpleConsoleDemo/Program.cs | 1 + test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj | 1 - .../Data/ConnectionStringResolver_Tests.cs | 1 + .../Abp/Modularity/IndependentEmptyModule.cs | 1 + .../Volo/Abp/Modularity/ModuleLoader_Tests.cs | 3 +- .../Abp/Reflection/AssemblyFinder_Tests.cs | 2 +- .../Volo/Abp/Reflection/TypeFinder_Tests.cs | 4 +- .../Abp/Ui/Navigation/MenuManager_Tests.cs | 1 + 134 files changed, 145 insertions(+), 73 deletions(-) create mode 100644 src/AbpDesk/AbpDesk.Application.Contracts/AbpDesk/AbpDeskApplicationContractsModule.cs rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/DependencyInjection/ServiceCollectionApplicationExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs (94%) rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/DependencyInjection/ServiceCollectionConventionalRegistrationExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/DependencyInjection/ServiceCollectionObjectAccessorExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/DependencyInjection/ServiceCollectionPreConfigureExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/DependencyInjection/ServiceCollectionRegistrationActionExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Microsoft/Extensions/Logging/LoggerExtensions.cs (65%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpComparableExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpDayOfWeekExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpEventHandlerExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpExceptionExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpObjectExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpStringExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/AbpTypeExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/Collections/Generic/AbpCollectionExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/Collections/Generic/AbpDictionaryExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/Collections/Generic/AbpEnumerableExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/Collections/Generic/AbpListExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/IO/AbpStreamExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/System/Linq/AbpQueryableExtensions.cs (77%) rename src/{Volo.Abp => Volo.Abp.Core}/System/Reflection/AbpMemberInfoExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/AbpApplicationBase.cs (98%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/AbpApplicationCreationOptions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/AbpApplicationFactory.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/AbpException.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/ApplicationInitializationContext.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/ApplicationShutdownContext.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Check.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Collections/ITypeList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Collections/TypeList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/AutoRegistrationHelper.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ConventionalRegistrarList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/DependencyAttribute.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/DisableConventionalRegistrationAttribute.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ExposeServicesAttribute.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IConventionalRegistrar.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IExposedServiceTypesProvider.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IObjectAccessor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IOnServiceRegistredContext.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IScopedDependency.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/IServiceProviderAccessor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ISingletonDependency.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ITransientDependency.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ObjectAccessor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/OnServiceRegistredContext.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ServiceExposingActionList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DependencyInjection/ServiceRegistrationActionList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DisposeAction.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DynamicProxy/AbpInterceptor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DynamicProxy/IAbpInterceptor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DynamicProxy/IAbpMethodInvocation.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/DynamicProxy/ProxyHelper.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/IAbpApplication.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/IAbpApplicationWithExternalServiceProvider.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/IAbpApplicationWithInternalServiceProvider.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/IOnApplicationInitialization.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/IOnApplicationShutdown.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs (50%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Internal/Utf8Helper.cs (94%) create mode 100644 src/Volo.Abp.Core/Volo/Abp/Logging/IExceptionCanLogDetails.cs rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Logging/IHasLogLevel.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/AbpModule.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/AbpModuleDescriptor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/AbpModuleHelper.cs (96%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/DefaultModuleLifecycleContributer.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/DependsOnAttribute.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IAbpModule.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IAbpModuleDescriptor.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IDependedModuleTypesProvider.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IModuleContainer.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IModuleLifecycleContributer.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IModuleLoader.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IModuleManager.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IOnPostApplicationInitialization.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IOnPreApplicationInitialization.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IPostConfigureServices.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/IPreConfigureServices.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/ModuleLifecycleOptions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/ModuleLoader.cs (98%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/ModuleManager.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/FilePlugInSource.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/FolderPlugInSource.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/IPlugInSource.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/PlugInSourceExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/PlugInSourceList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/PlugInSourceListExtensions.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Modularity/PlugIns/TypePlugInSource.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/NullDisposable.cs (81%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Options/PreConfigureActionList.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/RandomHelper.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/AssemblyFinder.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/AssemblyHelper.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/IAssemblyFinder.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/ITypeFinder.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/ReflectionHelper.cs (98%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/TypeFinder.cs (100%) rename src/{Volo.Abp => Volo.Abp.Core}/Volo/Abp/Reflection/TypeHelper.cs (100%) create mode 100644 src/Volo.Abp/System/Linq/AbpPagingQueryableExtensions.cs rename src/Volo.Abp/Volo/Abp/{AbpKernelModule.cs => AbpCommonModule.cs} (70%) 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 5570b82feab8e693ba25a0f4d5fea810359f51f7..0231fbe6f3ca4efd5635cda96852bfdc16172dd8 100644 GIT binary patch delta 2128 zcmZvdYiv|i5Xb*>?%n&?-Fv&;LV*>VcKb>T0)@)65o>@70i-+%s6bE@8Y)Odv4Ach zB98`XF4z!12pEIXqSWOP2#N@nM+#ctgCHfPkpLPoB2fdRI_E49Fr4K6c4p4Znb~va zoV#THk~i0_j5g%#@Nj3eBAOncUO*umjD#^fwq{!y9q@>9eH}`H{@%QP-Mz__>+jr~ zJ<|Cp^j1?h>g(;MTpH+IpeX(6kw|g6W&xB~1>@rxVvsT5wjaoR8<-UU^dy$Y&95w< zGxIg+RS^NsYiye^4o{~6A+}|fOc*|deJ=w+1o4J=bU zplkjl#5k9MWMiRapj>f`;#{A!T+{ope}m#`Uy^Cyq_Y32D42e%)N9GbdOJp8G-GXy z19ZKOUHkcDvavpmS&1G2KUO=nWMCbn{R3U{9Y=cZ)1(|%_T!kyK3gnl-_5b97^-D+ zf-)^e5q#`xbt71=wYq7jwo0uChPm}t8h+7AttdXjMI#o*6mz*7##eSKFZwLxLRHLE zJY{#ca&Rel(hQ@EuP>#d(9LG%nc1B3ASVu^$vMPPQ+RI-oK{?>3L??QQ8(N}T+ru% zQY#;4m=P>w8o18oreUa*W2kf6%qUWV7mX;Y?TbbjRkkeX@4#}`zzy*|2fPHyKU8r~ zm~v@9t>u(gIE{gJW&{(>dMk`8IOLDu<$$zrGTKZ(2J?pZz-)IHuW;4;!RU>xb}jWr z9q%sx`A&9U%E4vlq?v;({;#qFx~c{sZZzVK*wd;%?E@T$}AbV z+D)h3_zpV!O55$Udy@m%PLo?N%9d=>c8UU=_tpe@I`j3D!a#-H%*^tR1bTLBvTcnp zBVA@+ff_eO6R1~OBeMNnS#vVvTq8nWM(`2#H{iqmXu{SxP@ws6T4^gfC+5y8t)}xS zZ)Pwr*5K~vch)6S`X9FUxgqZ2sL~qk=bR@s6Zv=MW;r8R>!Y;gYAp*-Dow6DL94N?naNz1fq9BG2x-++#qxSur7Xo_ zi}@iHVFyPIQKc8DzAF{A?l&@l(?|`p&Qf=LVzkg?A$v1JyzY!@qhl&;x|r$S zrgCwOgvdfASz;u`5%Ki? V=PB+M-qb{g-tpxAzf(;w^FMxGmgE2c delta 2080 zcmY+F3v3is6o&tEXLlaEJHvK?1qx}}Eo~{~(b9%@Vk^iiHc)v;L8?tqtW->EB~-9m zl@O{#sZ-J*k3i6XfC^bELP#xAN)W+7tH`5>1`HU%8mS>l&~xtsft$>?=bZbWd+y#j zGgG^)wrcI_$i5Rt>v3;fMkLu!*}w=6=<(pqqWYb4XoE|X;q96MjCNDz+n(u*!;32&YjS z_*bD7BartBl(&wl?OFx$5i|qJk6R0Q^t32ZWvE! zXz77 zBhN}QBRCsqF+%WrM^YH+P8zenk;WwtbKwx0?IzBe&S#_JsN!2{LnJyl>sP1A7seL< z1T!6N%n-_%I%MJG;f4+AZ2Xk%Lq2yZ+(!3!YO#M~QWs8Fr8Phi5fgmPS~Z zEUT}=+fGkSV7Kzx(8o7`Jv&9twL!Qkf&Q%5;l-gyJm&M~XkN4{Z&ly;+(qTp_ic3- z1u~=CoI`xi`tid9v|78JAa`*@d2Lpqov#@fd~a@^J&nCw<*ig}naEe3TzR%;qCW0n zq!xr9JCxUkVa6c}pfm1S?`hJzs=QXK(d}W|SqoWV6K~8tu z?X>7u{Dc!;VhxJW7D{xr^gBq3@!Jr2} znNr`WvbqA&?urHsl)*x?MMz-s9bx*A$qXV#ag1Vt;#6jD6e+t{u~e~4u|lz0aXm8; zTbc67lst`YTk@oq%ny!?SQKrx(osgT*m~wrys0JvnBtj)0KT=SGv^!6@L@JvOK^bh z+Eo~!?8B7dX~1#Xr|&`vb(`mLj&5t0nN8w4ANmdF4zAN*hC!KXmc$LC4_V@%Gno0M zJ&sbulBhkI3TTRFCJn?Hdm-gvKP{&*RN>K)Bl4LEye%CSiuDL;Yp9y-2C7q$0?}Y> zpz+wlSrgUP$E&_85_L|CEMT|MUZos@t@=3{f=0cQiiPaW6tT!I{DqFIv{F&*+@UgY zlY|(EN;1Wh_{d5Xvv7&dapNANQEb=Qom4Ftsuw!50|vll*3*2V7ws~xTixsGjq9F z-{6_oH8@GGJ=Jzc3#J=xy$`|`MazP7* zx9@o+{mRBk>k3!B)V|t!JhnD{b)ff=)|O8}g)?M1`4t^h#FslXH#Io??5IIcMH2FN wg|mvUe%NZb&*eTFI>OWUN2j!t>r=w~xxSV=E#{2;M-yE+v4pXIP<^)XKNEhH;{X5v 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)