diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalizationModule.cs b/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalizationModule.cs index 8a6ca5dfdc..19c707bfad 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalizationModule.cs +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalizationModule.cs @@ -19,12 +19,12 @@ namespace AbpIoLocalization { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("AbpIoLocalization"); }); - Configure(options => + Configure(options => { options.MapCodeNamespace("Volo.AbpIo.Commercial", typeof(AbpIoCommercialResource)); options.MapCodeNamespace("Volo.AbpIo.Domain", typeof(AbpIoBaseResource)); diff --git a/docs/en/Getting-Started-Angular-Template.md b/docs/en/Getting-Started-Angular-Template.md index 31186eaa35..5ae006d82e 100644 --- a/docs/en/Getting-Started-Angular-Template.md +++ b/docs/en/Getting-Started-Angular-Template.md @@ -75,7 +75,7 @@ Hit F5 (or Ctrl+F5) to run the application. It will have an output like shown be #### Using EF Core Update-Database Command -Ef Core has `Update-Database` command which creates database if necessary and applies pending migrations. Right click to the `.Web` project and select **Set as StartUp Project**: +Ef Core has `Update-Database` command which creates database if necessary and applies pending migrations. Right click to the `.HttpApi.Host` project and select **Set as StartUp Project**: ![set-as-startup-project](images/set-as-startup-project.png) diff --git a/docs/en/Getting-Started-AspNetCore-Application.md b/docs/en/Getting-Started-AspNetCore-Application.md index aad2254ab0..f0a715aacd 100644 --- a/docs/en/Getting-Started-AspNetCore-Application.md +++ b/docs/en/Getting-Started-AspNetCore-Application.md @@ -125,7 +125,7 @@ public class AppModule : AbpModule } ```` -3. Update `Program.cs` to use AutoMapper: +3. Update `Program.cs` to use Autofac: ````csharp using Microsoft.AspNetCore.Hosting; diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs index 64219b14d2..d757b2f5f8 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.TenantResolvers.Add(new QueryStringTenantResolveContributor()); options.TenantResolvers.Add(new RouteTenantResolveContributor()); diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyOptions.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs similarity index 77% rename from framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyOptions.cs rename to framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs index b985aae73e..63b83885f9 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs @@ -2,14 +2,14 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { - public class AspNetCoreMultiTenancyOptions + public class AbpAspNetCoreMultiTenancyOptions { /// /// Default: . /// public string TenantKey { get; set; } - public AspNetCoreMultiTenancyOptions() + public AbpAspNetCoreMultiTenancyOptions() { TenantKey = TenantResolverConsts.DefaultTenantKey; } diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/CookieTenantResolveContributor.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/CookieTenantResolveContributor.cs index 3de810a203..7d4a109d9c 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/CookieTenantResolveContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/CookieTenantResolveContributor.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy protected override string GetTenantIdOrNameFromHttpContextOrNull(ITenantResolveContext context, HttpContext httpContext) { - return httpContext.Request?.Cookies[context.GetAspNetCoreMultiTenancyOptions().TenantKey]; + return httpContext.Request?.Cookies[context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey]; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HeaderTenantResolveContributor.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HeaderTenantResolveContributor.cs index 0e93d8f8d0..25487f8b4d 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HeaderTenantResolveContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HeaderTenantResolveContributor.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy return null; } - var tenantIdKey = context.GetAspNetCoreMultiTenancyOptions().TenantKey; + var tenantIdKey = context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey; var tenantIdHeader = httpContext.Request.Headers[tenantIdKey]; if (tenantIdHeader == string.Empty || tenantIdHeader.Count < 1) diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/QueryStringTenantResolveContributor.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/QueryStringTenantResolveContributor.cs index 3dcb4c5140..5144088d00 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/QueryStringTenantResolveContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/QueryStringTenantResolveContributor.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy return null; } - return httpContext.Request.Query[context.GetAspNetCoreMultiTenancyOptions().TenantKey]; + return httpContext.Request.Query[context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey]; } } } diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/RouteTenantResolveContributor.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/RouteTenantResolveContributor.cs index 4d073db9f8..4548daeb04 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/RouteTenantResolveContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/RouteTenantResolveContributor.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy protected override string GetTenantIdOrNameFromHttpContextOrNull(ITenantResolveContext context, HttpContext httpContext) { - var tenantId = httpContext.GetRouteValue(context.GetAspNetCoreMultiTenancyOptions().TenantKey); + var tenantId = httpContext.GetRouteValue(context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey); if (tenantId == null) { return null; diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/TenantResolveContextExtensions.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/TenantResolveContextExtensions.cs index 3f1d4dfe6c..e57d847a26 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/TenantResolveContextExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/TenantResolveContextExtensions.cs @@ -6,9 +6,9 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { public static class TenantResolveContextExtensions { - public static AspNetCoreMultiTenancyOptions GetAspNetCoreMultiTenancyOptions(this ITenantResolveContext context) + public static AbpAspNetCoreMultiTenancyOptions GetAbpAspNetCoreMultiTenancyOptions(this ITenantResolveContext context) { - return context.ServiceProvider.GetRequiredService>().Value; + return context.ServiceProvider.GetRequiredService>().Value; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs index 4b473cbf38..aa6f0fdb0e 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs @@ -3,9 +3,9 @@ using Volo.Abp.AspNetCore.MultiTenancy; namespace Volo.Abp.MultiTenancy { - public static class MultiTenancyOptionsExtensions + public static class AbpMultiTenancyOptionsExtensions { - public static void AddDomainTenantResolver(this TenantResolveOptions options, string domainFormat) + public static void AddDomainTenantResolver(this AbpTenantResolveOptions options, string domainFormat) { options.TenantResolvers.InsertAfter( r => r is CurrentUserTenantResolveContributor, diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs index d038d64789..889ffdc96e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Bootstrap"); }); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleContributorOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs similarity index 90% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleContributorOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs index 1e7d15bf23..1a95c3c98b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleContributorOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs @@ -4,11 +4,11 @@ using JetBrains.Annotations; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling { - public class BundleContributorOptions + public class AbpBundleContributorOptions { public ConcurrentDictionary AllExtensions { get; } - public BundleContributorOptions() + public AbpBundleContributorOptions() { AllExtensions = new ConcurrentDictionary(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs index 653794bda8..48290291bf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs @@ -21,8 +21,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling { public ILogger Logger { get; set; } - protected readonly BundlingOptions Options; - protected readonly BundleContributorOptions ContributorOptions; + protected readonly AbpBundlingOptions Options; + protected readonly AbpBundleContributorOptions ContributorOptions; protected readonly IWebContentFileProvider WebContentFileProvider; protected readonly IWebHostEnvironment HostingEnvironment; protected readonly IScriptBundler ScriptBundler; @@ -33,8 +33,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling protected readonly IWebRequestResources RequestResources; public BundleManager( - IOptions options, - IOptions contributorOptions, + IOptions options, + IOptions contributorOptions, IScriptBundler scriptBundler, IStyleBundler styleBundler, IWebHostEnvironment hostingEnvironment, diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlingOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlingOptions.cs index b762e87631..bc0fbcb3d2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlingOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlingOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling { - public class BundlingOptions + public class AbpBundlingOptions { public BundleConfigurationCollection StyleBundles { get; set; } @@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling /// public BundlingMode Mode { get; set; } = BundlingMode.Auto; - public BundlingOptions() + public AbpBundlingOptions() { StyleBundles = new BundleConfigurationCollection(); ScriptBundles = new BundleConfigurationCollection(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs index 981da4e4da..8eb6903592 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs @@ -20,12 +20,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers protected IBundleManager BundleManager { get; } protected IWebContentFileProvider WebContentFileProvider { get; } protected IWebHostEnvironment HostingEnvironment { get; } - protected readonly BundlingOptions Options; + protected readonly AbpBundlingOptions Options; protected AbpTagHelperResourceService( IBundleManager bundleManager, IWebContentFileProvider webContentFileProvider, - IOptions options, + IOptions options, IWebHostEnvironment hostingEnvironment) { BundleManager = bundleManager; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs index 8c8e2abc5a..ae69dddbc7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers public AbpTagHelperScriptService( IBundleManager bundleManager, IWebContentFileProvider webContentFileProvider, - IOptions options, + IOptions options, IWebHostEnvironment hostingEnvironment ) : base( bundleManager, diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs index 400a75553f..60d45d8f2f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers public AbpTagHelperStyleService( IBundleManager bundleManager, IWebContentFileProvider webContentFileProvider, - IOptions options, + IOptions options, IWebHostEnvironment hostingEnvironment ) : base( bundleManager, diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs index aa1108d4e5..bfdbb98db8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs @@ -17,11 +17,11 @@ namespace Pages.Abp.MultiTenancy public TenantInfoModel Input { get; set; } protected ITenantStore TenantStore { get; } - protected AspNetCoreMultiTenancyOptions Options { get; } + protected AbpAspNetCoreMultiTenancyOptions Options { get; } public TenantSwitchModalModel( ITenantStore tenantStore, - IOptions options) + IOptions options) { TenantStore = tenantStore; Options = options.Value; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/AbpAspNetCoreMvcUiMultiTenancyModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/AbpAspNetCoreMvcUiMultiTenancyModule.cs index 9a6e12c1ac..b01d6d32a1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/AbpAspNetCoreMvcUiMultiTenancyModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/AbpAspNetCoreMvcUiMultiTenancyModule.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -47,7 +47,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy .AddVirtualJson("/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization"); }); - Configure(options => + Configure(options => { options.ScriptBundles .Get(StandardBundles.Scripts.Global) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerScriptContributor.cs new file mode 100644 index 0000000000..8de698c723 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerScriptContributor.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.Globalization; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery; +using Volo.Abp.Modularity; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Timeago +{ + [DependsOn(typeof(JQueryScriptContributor))] + public class BootstrapDatepickerScriptContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/bootstrap-datepicker/bootstrap-datepicker.min.js"); + } + + public override void ConfigureDynamicResources(BundleConfigurationContext context) + { + var cultureName = CultureInfo.CurrentUICulture.DateTimeFormat.Calendar.AlgorithmType == + CalendarAlgorithmType.LunarCalendar + ? "en" + : CultureInfo.CurrentUICulture.Name; + + if (TryAddCultureFile(context, cultureName)) + { + return; + } + } + + protected virtual bool TryAddCultureFile(BundleConfigurationContext context, string cultureName) + { + var filePath = $"/libs/bootstrap-datepicker/locales/bootstrap-datepicker.{cultureName}.min.js"; + + if (!context.FileProvider.GetFileInfo(filePath).Exists) + { + return false; + } + + context.Files.AddIfNotContains(filePath); + return true; + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerStyleContributor.cs new file mode 100644 index 0000000000..bc345e34b3 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerStyleContributor.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2 +{ + public class BootstrapDatepickerStyleContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/bootstrap-datepicker/bootstrap-datepicker.min.css"); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FontAwesome/FontAwesomeStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FontAwesome/FontAwesomeStyleContributor.cs index 7f01e15859..a3270f8d70 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FontAwesome/FontAwesomeStyleContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FontAwesome/FontAwesomeStyleContributor.cs @@ -7,7 +7,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.FontAwesome { public override void ConfigureBundle(BundleConfigurationContext context) { - context.Files.AddIfNotContains("/libs/font-awesome/css/font-awesome.css"); + context.Files.AddIfNotContains("/libs/@fortawesome/fontawesome-free/css/all.css"); + context.Files.AddIfNotContains("/libs/@fortawesome/fontawesome-free/css/v4-shims.css"); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs index e13857a8db..212967ee4a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.Themes.Add(); @@ -38,17 +38,17 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic } }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic"); }); - Configure(options => + Configure(options => { options.Contributors.Add(new BasicThemeMainTopToolbarContributor()); }); - Configure(options => + Configure(options => { options .StyleBundles diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml index 7e855834da..7b43c6d969 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml @@ -14,7 +14,7 @@ @using Volo.Abp.MultiTenancy @inject IAbpAntiForgeryManager AbpAntiForgeryManager @inject IBrandingProvider BrandingProvider -@inject IOptions MultiTenancyOptions +@inject IOptions MultiTenancyOptions @inject ICurrentTenant CurrentTenant @inject IStringLocalizer MultiTenancyStringLocalizer @inject ITenantResolveResultAccessor TenantResolveResultAccessor diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs index 06c39f9357..8d6955b15b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs @@ -26,12 +26,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared"); }); - Configure(options => + Configure(options => { options .StyleBundles diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs index d067281978..0f4cc752c9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs @@ -27,7 +27,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling typeof(ToastrScriptBundleContributor), typeof(MalihuCustomScrollbarPluginScriptBundleContributor), typeof(LuxonScriptContributor), - typeof(TimeagoScriptContributor) + typeof(TimeagoScriptContributor), + typeof(BootstrapDatepickerScriptContributor) )] public class SharedThemeGlobalScriptContributor : BundleContributor { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs index 23107c2d3a..d1703113d0 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs @@ -17,7 +17,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling typeof(ToastrStyleBundleContributor), typeof(Select2StyleContributor), typeof(MalihuCustomScrollbarPluginStyleBundleContributor), - typeof(DatatablesNetBs4StyleContributor) + typeof(DatatablesNetBs4StyleContributor), + typeof(BootstrapDatepickerStyleContributor) )] public class SharedThemeGlobalStyleContributor : BundleContributor { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/AbpToolbarOptions.cs similarity index 81% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/AbpToolbarOptions.cs index e830f3fcf6..b4d010c608 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/AbpToolbarOptions.cs @@ -3,12 +3,12 @@ using JetBrains.Annotations; namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars { - public class ToolbarOptions + public class AbpToolbarOptions { [NotNull] public List Contributors { get; } - public ToolbarOptions() + public AbpToolbarOptions() { Contributors = new List(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs index 77fbd67534..f1ac30779a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs @@ -10,11 +10,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars public class ToolbarManager : IToolbarManager, ITransientDependency { protected IThemeManager ThemeManager { get; } - protected ToolbarOptions Options { get; } + protected AbpToolbarOptions Options { get; } protected IServiceProvider ServiceProvider { get; } public ToolbarManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider, IThemeManager themeManager) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpAspNetCoreMvcUiWidgetsModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpAspNetCoreMvcUiWidgetsModule.cs index e8f90483f8..91ebc02428 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpAspNetCoreMvcUiWidgetsModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpAspNetCoreMvcUiWidgetsModule.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets { context.Services.AddTransient(); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -47,7 +47,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets } }); - services.Configure(options => + services.Configure(options => { foreach (var widgetType in widgetTypes) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs index 1ef15ac8e6..826c7635cf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs @@ -14,13 +14,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets [Dependency(ReplaceServices = true)] public class AbpViewComponentHelper : IViewComponentHelper, IViewContextAware, ITransientDependency { - protected WidgetOptions Options { get; } + protected AbpWidgetOptions Options { get; } protected IPageWidgetManager PageWidgetManager { get; } protected DefaultViewComponentHelper DefaultViewComponentHelper { get; } public AbpViewComponentHelper( DefaultViewComponentHelper defaultViewComponentHelper, - IOptions widgetOptions, + IOptions widgetOptions, IPageWidgetManager pageWidgetManager) { DefaultViewComponentHelper = defaultViewComponentHelper; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpWidgetOptions.cs similarity index 74% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpWidgetOptions.cs index 46fa88fe16..3d2190447b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpWidgetOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets { - public class WidgetOptions + public class AbpWidgetOptions { public WidgetDefinitionCollection Widgets { get; } - public WidgetOptions() + public AbpWidgetOptions() { Widgets = new WidgetDefinitionCollection(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetScripts/WidgetScriptsViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetScripts/WidgetScriptsViewComponent.cs index 88f7214c7a..7d2f55cbce 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetScripts/WidgetScriptsViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetScripts/WidgetScriptsViewComponent.cs @@ -7,11 +7,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts public class WidgetScriptsViewComponent : AbpViewComponent { protected IPageWidgetManager PageWidgetManager { get; } - protected WidgetOptions Options { get; } + protected AbpWidgetOptions Options { get; } public WidgetScriptsViewComponent( IPageWidgetManager pageWidgetManager, - IOptions options) + IOptions options) { PageWidgetManager = pageWidgetManager; Options = options.Value; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetStyles/WidgetStylesViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetStyles/WidgetStylesViewComponent.cs index 1a5b150b09..f72500ff39 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetStyles/WidgetStylesViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetStyles/WidgetStylesViewComponent.cs @@ -6,11 +6,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles public class WidgetStylesViewComponent : AbpViewComponent { protected IPageWidgetManager PageWidgetManager { get; } - protected WidgetOptions Options { get; } + protected AbpWidgetOptions Options { get; } public WidgetStylesViewComponent( IPageWidgetManager pageWidgetManager, - IOptions options) + IOptions options) { PageWidgetManager = pageWidgetManager; Options = options.Value; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs index 54bd8cb274..ffd03d28dc 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs @@ -9,12 +9,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets { public class WidgetManager : IWidgetManager { - protected WidgetOptions Options { get; } + protected AbpWidgetOptions Options { get; } protected IAuthorizationService AuthorizationService { get; } protected ICurrentUser CurrentUser { get; } public WidgetManager( - IOptions widgetOptions, + IOptions widgetOptions, IAuthorizationService authorizationService, ICurrentUser currentUser) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs index b7e2b04e5c..515e7a40a1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/AbpLayoutHookOptions.cs similarity index 73% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/AbpLayoutHookOptions.cs index e51f491f64..fd874b6706 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/AbpLayoutHookOptions.cs @@ -3,16 +3,16 @@ using System.Collections.Generic; namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook { - public class LayoutHookOptions + public class AbpLayoutHookOptions { public IDictionary> Hooks { get; } - public LayoutHookOptions() + public AbpLayoutHookOptions() { Hooks = new Dictionary>(); } - public LayoutHookOptions Add(string name, Type componentType, string layout = null) + public AbpLayoutHookOptions Add(string name, Type componentType, string layout = null) { Hooks .GetOrAdd(name, () => new List()) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs index 85527037a8..5f5d050e4d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs @@ -7,9 +7,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook { public class LayoutHookViewComponent : AbpViewComponent { - protected LayoutHookOptions Options { get; } + protected AbpLayoutHookOptions Options { get; } - public LayoutHookViewComponent(IOptions options) + public LayoutHookViewComponent(IOptions options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/ThemingOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs similarity index 76% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/ThemingOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs index 58de144e88..3214c30367 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/ThemingOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs @@ -1,12 +1,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theming { - public class ThemingOptions + public class AbpThemingOptions { public ThemeDictionary Themes { get; } public string DefaultThemeName { get; set; } - public ThemingOptions() + public AbpThemingOptions() { Themes = new ThemeDictionary(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/DefaultThemeSelector.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/DefaultThemeSelector.cs index e5f4329b47..3af9d29b89 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/DefaultThemeSelector.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/DefaultThemeSelector.cs @@ -6,9 +6,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theming { public class DefaultThemeSelector : IThemeSelector, ITransientDependency { - protected ThemingOptions Options { get; } + protected AbpThemingOptions Options { get; } - public DefaultThemeSelector(IOptions options) + public DefaultThemeSelector(IOptions options) { Options = options.Value; } @@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theming { if (!Options.Themes.Any()) { - throw new AbpException($"No theme registered! Use {nameof(ThemingOptions)} to register themes."); + throw new AbpException($"No theme registered! Use {nameof(AbpThemingOptions)} to register themes."); } if (Options.DefaultThemeName == null) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs index 1c8ae167e3..ebc086dee6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs @@ -57,7 +57,7 @@ namespace Volo.Abp.AspNetCore.Mvc ) ); - Configure(options => + Configure(options => { options.IgnoredInterfaces.AddIfNotContains(typeof(IAsyncActionFilter)); options.IgnoredInterfaces.AddIfNotContains(typeof(IFilterMetadata)); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcOptions.cs index 6dec2fde14..fb29e17496 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcOptions.cs @@ -4,11 +4,11 @@ namespace Volo.Abp.AspNetCore.Mvc { public class AbpAspNetCoreMvcOptions { - public ConventionalControllerOptions ConventionalControllers { get; } + public AbpConventionalControllerOptions ConventionalControllers { get; } public AbpAspNetCoreMvcOptions() { - ConventionalControllers = new ConventionalControllerOptions(); + ConventionalControllers = new AbpConventionalControllerOptions(); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index c215fabf97..d9cb936326 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -25,12 +25,12 @@ namespace Volo.Abp.AspNetCore.Mvc private readonly IApiDescriptionGroupCollectionProvider _descriptionProvider; private readonly AbpAspNetCoreMvcOptions _options; - private readonly ApiDescriptionModelOptions _modelOptions; + private readonly AbpApiDescriptionModelOptions _modelOptions; public AspNetCoreApiDescriptionModelProvider( IApiDescriptionGroupCollectionProvider descriptionProvider, IOptions options, - IOptions modelOptions) + IOptions modelOptions) { _descriptionProvider = descriptionProvider; _options = options.Value; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs similarity index 78% rename from framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs index a574716ef1..e28ff37717 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs @@ -7,13 +7,13 @@ using Volo.Abp.Http.Modeling; namespace Volo.Abp.AspNetCore.Mvc.Conventions { - public class ConventionalControllerOptions + public class AbpConventionalControllerOptions { public ConventionalControllerSettingList ConventionalControllerSettings { get; } public List FormBodyBindingIgnoredTypes { get; } - public ConventionalControllerOptions() + public AbpConventionalControllerOptions() { ConventionalControllerSettings = new ConventionalControllerSettingList(); @@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions }; } - public ConventionalControllerOptions Create(Assembly assembly, [CanBeNull] Action optionsAction = null) + public AbpConventionalControllerOptions Create(Assembly assembly, [CanBeNull] Action optionsAction = null) { var setting = new ConventionalControllerSetting(assembly, ModuleApiDescriptionModel.DefaultRootPath); optionsAction?.Invoke(setting); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs index 0a03a0dc67..552ce7e04e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs @@ -13,9 +13,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow public class AbpUowActionFilter : IAsyncActionFilter, ITransientDependency { private readonly IUnitOfWorkManager _unitOfWorkManager; - private readonly UnitOfWorkDefaultOptions _defaultOptions; + private readonly AbpUnitOfWorkDefaultOptions _defaultOptions; - public AbpUowActionFilter(IUnitOfWorkManager unitOfWorkManager, IOptions options) + public AbpUowActionFilter(IUnitOfWorkManager unitOfWorkManager, IOptions options) { _unitOfWorkManager = unitOfWorkManager; _defaultOptions = options.Value; @@ -68,9 +68,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow } } - private UnitOfWorkOptions CreateOptions(ActionExecutingContext context, UnitOfWorkAttribute unitOfWorkAttribute) + private AbpUnitOfWorkOptions CreateOptions(ActionExecutingContext context, UnitOfWorkAttribute unitOfWorkAttribute) { - var options = new UnitOfWorkOptions(); + var options = new AbpUnitOfWorkOptions(); unitOfWorkAttribute?.SetOptions(options); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs index a300e40968..ca87f2b962 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs @@ -26,11 +26,8 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation return; } - using (AbpCrossCuttingConcerns.Applying(context.Controller, AbpCrossCuttingConcerns.Validation)) - { - _validator.Validate(context.ModelState); - await next(); - } + _validator.Validate(context.ModelState); + await next(); } } } diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj index 7ec3846531..a468d4cfd6 100644 --- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj @@ -19,6 +19,7 @@ + diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs index ae238f3694..d1881b0cbd 100644 --- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs @@ -3,9 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Net.Http; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; namespace Volo.Abp.AspNetCore.TestBase { @@ -20,31 +22,36 @@ namespace Volo.Abp.AspNetCore.TestBase protected AbpAspNetCoreIntegratedTestBase() { - var builder = CreateWebHostBuilder(); - Server = CreateTestServer(builder); - Client = Server.CreateClient(); - ServiceProvider = Server.Host.Services; + var builder = CreateHostBuilder(); + + var host = builder.Build(); + host.Start(); + + Server = host.GetTestServer(); + Client = host.GetTestClient(); + + ServiceProvider = Server.Services; ServiceProvider.GetRequiredService().Server = Server; } - protected virtual IWebHostBuilder CreateWebHostBuilder() + protected virtual IHostBuilder CreateHostBuilder() { - return new WebHostBuilder() - .UseStartup() + return Host.CreateDefaultBuilder() + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + webBuilder.UseTestServer(); + }) + .UseAutofac() .ConfigureServices(ConfigureServices); } - protected virtual void ConfigureServices(WebHostBuilderContext context, IServiceCollection services) + protected virtual void ConfigureServices(HostBuilderContext context, IServiceCollection services) { } - protected virtual TestServer CreateTestServer(IWebHostBuilder builder) - { - return new TestServer(builder); - } - #region GetUrl /// diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs index 039e819b38..2b38af50f1 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs @@ -7,9 +7,9 @@ namespace Microsoft.AspNetCore.Hosting { public static IConfigurationRoot BuildConfiguration( this IWebHostEnvironment env, - ConfigurationBuilderOptions options = null) + AbpConfigurationBuilderOptions options = null) { - options = options ?? new ConfigurationBuilderOptions(); + options = options ?? new AbpConfigurationBuilderOptions(); if (options.BasePath.IsNullOrEmpty()) { diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs index 9d754b8da4..33e685ac4e 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs @@ -1,6 +1,4 @@ -using System; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; +using Microsoft.AspNetCore.Hosting; namespace Microsoft.Extensions.DependencyInjection { @@ -10,19 +8,5 @@ namespace Microsoft.Extensions.DependencyInjection { return services.GetSingletonInstance(); } - - [Obsolete] - public static IConfigurationRoot BuildConfiguration(this IServiceCollection services, ConfigurationBuilderOptions options = null) - { - return services.GetHostingEnvironment().BuildConfiguration(options); - } - - [Obsolete] - public static IConfigurationRoot AddConfiguration(this IServiceCollection services, ConfigurationBuilderOptions options = null) - { - var configuration = services.BuildConfiguration(options); - services.SetConfiguration(configuration); - return configuration; - } } } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs index f7cc0710e7..298fffd20e 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs @@ -29,11 +29,6 @@ namespace Volo.Abp.AspNetCore )] public class AbpAspNetCoreModule : AbpModule { - public override void PreConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddConfiguration(); - } - public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/ExceptionHttpStatusCodeOptions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHttpStatusCodeOptions.cs similarity index 82% rename from framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/ExceptionHttpStatusCodeOptions.cs rename to framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHttpStatusCodeOptions.cs index d8766219f8..03374e5a39 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/ExceptionHttpStatusCodeOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHttpStatusCodeOptions.cs @@ -3,11 +3,11 @@ using System.Net; namespace Volo.Abp.AspNetCore.ExceptionHandling { - public class ExceptionHttpStatusCodeOptions + public class AbpExceptionHttpStatusCodeOptions { public IDictionary ErrorCodeToHttpStatusCodeMappings { get; } - public ExceptionHttpStatusCodeOptions() + public AbpExceptionHttpStatusCodeOptions() { ErrorCodeToHttpStatusCodeMappings = new Dictionary(); } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs index d1ae5dd59a..5bf59b0cc9 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs @@ -21,13 +21,13 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling { public bool SendAllExceptionsToClients { get; set; } = false; - protected ExceptionLocalizationOptions LocalizationOptions { get; } + protected AbpExceptionLocalizationOptions LocalizationOptions { get; } protected IStringLocalizerFactory StringLocalizerFactory { get; } protected IStringLocalizer L { get; } protected IServiceProvider ServiceProvider { get; } public DefaultExceptionToErrorInfoConverter( - IOptions localizationOptions, + IOptions localizationOptions, IStringLocalizerFactory stringLocalizerFactory, IStringLocalizer abpUiStringLocalizer, IServiceProvider serviceProvider) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs index d9079fc347..cf49642459 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs @@ -12,10 +12,10 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling { public class DefaultHttpExceptionStatusCodeFinder : IHttpExceptionStatusCodeFinder, ITransientDependency { - protected ExceptionHttpStatusCodeOptions Options { get; } + protected AbpExceptionHttpStatusCodeOptions Options { get; } public DefaultHttpExceptionStatusCodeFinder( - IOptions options) + IOptions options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs index e9a7def252..b3ee565100 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs @@ -8,10 +8,10 @@ namespace Volo.Abp.AspNetCore.Tracing { public class AbpCorrelationIdMiddleware : IMiddleware, ITransientDependency { - private readonly CorrelationIdOptions _options; + private readonly AbpCorrelationIdOptions _options; private readonly ICorrelationIdProvider _correlationIdProvider; - public AbpCorrelationIdMiddleware(IOptions options, + public AbpCorrelationIdMiddleware(IOptions options, ICorrelationIdProvider correlationIdProvider) { _options = options.Value; @@ -34,7 +34,7 @@ namespace Volo.Abp.AspNetCore.Tracing protected virtual void CheckAndSetCorrelationIdOnResponse( HttpContext httpContext, - CorrelationIdOptions options, + AbpCorrelationIdOptions options, string correlationId) { if (httpContext.Response.HasStarted) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AspNetCoreCorrelationIdProvider.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AspNetCoreCorrelationIdProvider.cs index e62f1ed2a4..7b9915cbd9 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AspNetCoreCorrelationIdProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AspNetCoreCorrelationIdProvider.cs @@ -10,11 +10,11 @@ namespace Volo.Abp.AspNetCore.Tracing public class AspNetCoreCorrelationIdProvider : ICorrelationIdProvider, ITransientDependency { protected IHttpContextAccessor HttpContextAccessor { get; } - protected CorrelationIdOptions Options { get; } + protected AbpCorrelationIdOptions Options { get; } public AspNetCoreCorrelationIdProvider( IHttpContextAccessor httpContextAccessor, - IOptions options) + IOptions options) { HttpContextAccessor = httpContextAccessor; Options = options.Value; diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreContentOptions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs similarity index 89% rename from framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreContentOptions.cs rename to framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs index c4265c7ced..ce6e454f54 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreContentOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs @@ -2,12 +2,12 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem { - public class AspNetCoreContentOptions + public class AbpAspNetCoreContentOptions { public List AllowedExtraWebContentFolders { get; } public List AllowedExtraWebContentFileExtensions { get; } - public AspNetCoreContentOptions() + public AbpAspNetCoreContentOptions() { AllowedExtraWebContentFolders = new List { diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs index ebc7446d68..1b71dad8cb 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs @@ -17,12 +17,12 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem private readonly IWebHostEnvironment _hostingEnvironment; private string _rootPath = "/wwwroot"; //TODO: How to handle wwwroot naming? - protected AspNetCoreContentOptions Options { get; } + protected AbpAspNetCoreContentOptions Options { get; } public WebContentFileProvider( IVirtualFileProvider virtualFileProvider, IWebHostEnvironment hostingEnvironment, - IOptions options) + IOptions options) { _virtualFileProvider = virtualFileProvider; _hostingEnvironment = hostingEnvironment; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs index 5a9c3fa4db..86b2b18d04 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.Authorization context.Services.AddSingleton(); - Configure(options => + Configure(options => { options.ValueProviders.Add(); options.ValueProviders.Add(); @@ -49,7 +49,7 @@ namespace Volo.Abp.Authorization } }); - services.Configure(options => + services.Configure(options => { options.DefinitionProviders.AddIfNotContains(definitionProviders); }); diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs index 45cb2ec39d..74314e815d 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using Volo.Abp.Aspects; using Volo.Abp.DependencyInjection; using Volo.Abp.DynamicProxy; using Volo.Abp.Threading; @@ -17,24 +16,12 @@ namespace Volo.Abp.Authorization public override void Intercept(IAbpMethodInvocation invocation) { - if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.Authorization)) - { - invocation.Proceed(); - return; - } - AsyncHelper.RunSync(() => AuthorizeAsync(invocation)); invocation.Proceed(); } public override async Task InterceptAsync(IAbpMethodInvocation invocation) { - if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.Authorization)) - { - await invocation.ProceedAsync(); - return; - } - await AuthorizeAsync(invocation); await invocation.ProceedAsync(); } diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionOptions.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AbpPermissionOptions.cs similarity index 84% rename from framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionOptions.cs rename to framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AbpPermissionOptions.cs index 30c1170e49..ce9dc06798 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionOptions.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AbpPermissionOptions.cs @@ -2,13 +2,13 @@ namespace Volo.Abp.Authorization.Permissions { - public class PermissionOptions + public class AbpPermissionOptions { public ITypeList DefinitionProviders { get; } public ITypeList ValueProviders { get; } - public PermissionOptions() + public AbpPermissionOptions() { DefinitionProviders = new TypeList(); ValueProviders = new TypeList(); diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs index 87b391443d..d6975e38ec 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.Authorization.Permissions { public class ClientPermissionValueProvider : PermissionValueProvider { - public const string ProviderName = "Client"; + public const string ProviderName = "C"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinitionManager.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinitionManager.cs index bb58089c82..7e193feda0 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinitionManager.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinitionManager.cs @@ -16,12 +16,12 @@ namespace Volo.Abp.Authorization.Permissions protected IDictionary PermissionDefinitions => _lazyPermissionDefinitions.Value; private readonly Lazy> _lazyPermissionDefinitions; - protected PermissionOptions Options { get; } + protected AbpPermissionOptions Options { get; } private readonly IServiceProvider _serviceProvider; public PermissionDefinitionManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs index 323ccb1c2e..d26297a258 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs @@ -12,11 +12,11 @@ namespace Volo.Abp.Authorization.Permissions public IReadOnlyList ValueProviders => _lazyProviders.Value; private readonly Lazy> _lazyProviders; - protected PermissionOptions Options { get; } + protected AbpPermissionOptions Options { get; } public PermissionValueProviderManager( IServiceProvider serviceProvider, - IOptions options) + IOptions options) { Options = options.Value; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs index 314e88411a..b98867a78e 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs @@ -6,7 +6,7 @@ namespace Volo.Abp.Authorization.Permissions { public class RolePermissionValueProvider : PermissionValueProvider { - public const string ProviderName = "Role"; + public const string ProviderName = "R"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs index f04a85910f..c7f327c40c 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.Authorization.Permissions { public class UserPermissionValueProvider : PermissionValueProvider { - public const string ProviderName = "User"; + public const string ProviderName = "U"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs similarity index 96% rename from framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs rename to framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs index 0b058756c0..a16bc418a7 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs @@ -4,7 +4,7 @@ using System.Collections.Immutable; namespace Volo.Abp.BackgroundJobs { - public class BackgroundJobOptions + public class AbpBackgroundJobOptions { private readonly Dictionary _jobConfigurationsByArgsType; private readonly Dictionary _jobConfigurationsByName; @@ -15,7 +15,7 @@ namespace Volo.Abp.BackgroundJobs /// public bool IsJobExecutionEnabled { get; set; } = true; - public BackgroundJobOptions() + public AbpBackgroundJobOptions() { _jobConfigurationsByArgsType = new Dictionary(); _jobConfigurationsByName = new Dictionary(); diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs index 224c9b1d2c..38a0afb2cd 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.BackgroundJobs } }); - services.Configure(options => + services.Configure(options => { foreach (var jobType in jobTypes) { diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs index 59352bc892..df0ec36dd6 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.BackgroundJobs { public ILogger Logger { protected get; set; } - protected BackgroundJobOptions Options { get; } + protected AbpBackgroundJobOptions Options { get; } - public BackgroundJobExecuter(IOptions options) + public BackgroundJobExecuter(IOptions options) { Options = options.Value; diff --git a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs index 96c3b1ee0b..4a61aa2845 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs @@ -5,12 +5,12 @@ namespace Volo.Abp.BackgroundJobs.Hangfire { public class HangfireJobExecutionAdapter { - protected BackgroundJobOptions Options { get; } + protected AbpBackgroundJobOptions Options { get; } protected IServiceScopeFactory ServiceScopeFactory { get; } protected IBackgroundJobExecuter JobExecuter { get; } public HangfireJobExecutionAdapter( - IOptions options, + IOptions options, IBackgroundJobExecuter jobExecuter, IServiceScopeFactory serviceScopeFactory) { diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobOptions.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs similarity index 85% rename from framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobOptions.cs rename to framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs index 95ad677e55..8d588debe9 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobOptions.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; namespace Volo.Abp.BackgroundJobs.RabbitMQ { - public class RabbitMqBackgroundJobOptions + public class AbpRabbitMqBackgroundJobOptions { /// /// Key: Job Args Type @@ -15,7 +15,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ /// public string DefaultQueueNamePrefix { get; set; } - public RabbitMqBackgroundJobOptions() + public AbpRabbitMqBackgroundJobOptions() { JobQueues = new Dictionary(); DefaultQueueNamePrefix = "AbpBackgroundJobs."; diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs index 8d7012bde1..f2b00345a1 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs @@ -24,8 +24,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ public ILogger> Logger { get; set; } - protected BackgroundJobOptions BackgroundJobOptions { get; } - protected RabbitMqBackgroundJobOptions RabbitMqBackgroundJobOptions { get; } + protected AbpBackgroundJobOptions AbpBackgroundJobOptions { get; } + protected AbpRabbitMqBackgroundJobOptions AbpRabbitMqBackgroundJobOptions { get; } protected IChannelPool ChannelPool { get; } protected IRabbitMqSerializer Serializer { get; } protected IBackgroundJobExecuter JobExecuter { get; } @@ -35,21 +35,21 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ protected bool IsDiposed { get; private set; } public JobQueue( - IOptions backgroundJobOptions, - IOptions rabbitMqBackgroundJobOptions, + IOptions backgroundJobOptions, + IOptions rabbitMqAbpBackgroundJobOptions, IChannelPool channelPool, IRabbitMqSerializer serializer, IBackgroundJobExecuter jobExecuter, IServiceScopeFactory serviceScopeFactory) { - BackgroundJobOptions = backgroundJobOptions.Value; - RabbitMqBackgroundJobOptions = rabbitMqBackgroundJobOptions.Value; + AbpBackgroundJobOptions = backgroundJobOptions.Value; + AbpRabbitMqBackgroundJobOptions = rabbitMqAbpBackgroundJobOptions.Value; Serializer = serializer; JobExecuter = jobExecuter; ServiceScopeFactory = serviceScopeFactory; ChannelPool = channelPool; - JobConfiguration = BackgroundJobOptions.GetJob(typeof(TArgs)); + JobConfiguration = AbpBackgroundJobOptions.GetJob(typeof(TArgs)); QueueConfiguration = GetOrCreateJobQueueConfiguration(); Logger = NullLogger>.Instance; @@ -57,10 +57,10 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration() { - return RabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ?? + return AbpRabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ?? new JobQueueConfiguration( typeof(TArgs), - RabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName + AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName ); } @@ -85,7 +85,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ { CheckDisposed(); - if (!BackgroundJobOptions.IsJobExecutionEnabled) + if (!AbpBackgroundJobOptions.IsJobExecutionEnabled) { return; } @@ -129,7 +129,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ var result = QueueConfiguration.Declare(ChannelAccessor.Channel); Logger.LogDebug($"RabbitMQ Queue '{QueueConfiguration.QueueName}' has {result.MessageCount} messages and {result.ConsumerCount} consumers."); - if (BackgroundJobOptions.IsJobExecutionEnabled) + if (AbpBackgroundJobOptions.IsJobExecutionEnabled) { Consumer = new EventingBasicConsumer(ChannelAccessor.Channel); Consumer.Received += MessageReceived; diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs index 7ffe9ec82a..73b7c21d2a 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs @@ -15,10 +15,10 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ protected IServiceProvider ServiceProvider { get; } - protected BackgroundJobOptions Options { get; } + protected AbpBackgroundJobOptions Options { get; } public JobQueueManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerOptions.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs similarity index 93% rename from framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerOptions.cs rename to framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs index f89bc40e67..69878d28f2 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerOptions.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.BackgroundJobs { - public class BackgroundJobWorkerOptions + public class AbpBackgroundJobWorkerOptions { /// /// Interval between polling jobs from . @@ -33,7 +33,7 @@ /// public double DefaultWaitFactor { get; set; } - public BackgroundJobWorkerOptions() + public AbpBackgroundJobWorkerOptions() { MaxJobFetchCount = 1000; JobPollPeriod = 5000; diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs index f0324a9932..cea8a1eee6 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.BackgroundJobs { public override void OnApplicationInitialization(ApplicationInitializationContext context) { - var options = context.ServiceProvider.GetRequiredService>().Value; + var options = context.ServiceProvider.GetRequiredService>().Value; if (options.IsJobExecutionEnabled) { context.ServiceProvider diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs index 4c9efbe6d8..03b5cb73e4 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs @@ -11,16 +11,16 @@ namespace Volo.Abp.BackgroundJobs { public class BackgroundJobWorker : PeriodicBackgroundWorkerBase, IBackgroundJobWorker { - protected BackgroundJobOptions JobOptions { get; } + protected AbpBackgroundJobOptions JobOptions { get; } - protected BackgroundJobWorkerOptions WorkerOptions { get; } + protected AbpBackgroundJobWorkerOptions WorkerOptions { get; } protected IServiceScopeFactory ServiceScopeFactory { get; } public BackgroundJobWorker( AbpTimer timer, - IOptions jobOptions, - IOptions workerOptions, + IOptions jobOptions, + IOptions workerOptions, IServiceScopeFactory serviceScopeFactory) : base(timer) { diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerOptions.cs b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkerOptions.cs similarity index 80% rename from framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerOptions.cs rename to framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkerOptions.cs index 6b368f657a..2179880bb1 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerOptions.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkerOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.BackgroundWorkers { - public class BackgroundWorkerOptions + public class AbpBackgroundWorkerOptions { /// /// Default: true. diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkersModule.cs b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkersModule.cs index 425ffaece0..a11e8a9af9 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkersModule.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkersModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.BackgroundWorkers { public override void OnApplicationInitialization(ApplicationInitializationContext context) { - var options = context.ServiceProvider.GetRequiredService>().Value; + var options = context.ServiceProvider.GetRequiredService>().Value; if (options.IsEnabled) { AsyncHelper.RunSync( @@ -25,7 +25,7 @@ namespace Volo.Abp.BackgroundWorkers public override void OnApplicationShutdown(ApplicationShutdownContext context) { - var options = context.ServiceProvider.GetRequiredService>().Value; + var options = context.ServiceProvider.GetRequiredService>().Value; if (options.IsEnabled) { AsyncHelper.RunSync( diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs index 48d55cc0d5..ba59bf039e 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs @@ -21,8 +21,9 @@ namespace Volo.Abp.Caching context.Services.AddDistributedMemoryCache(); context.Services.AddSingleton(typeof(IDistributedCache<>), typeof(DistributedCache<>)); + context.Services.AddSingleton(typeof(IDistributedCache<,>), typeof(DistributedCache<,>)); - context.Services.Configure(cacheOptions => + context.Services.Configure(cacheOptions => { cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20); }); diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/CacheOptions.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpDistributedCacheOptions.cs similarity index 66% rename from framework/src/Volo.Abp.Caching/Volo/Abp/Caching/CacheOptions.cs rename to framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpDistributedCacheOptions.cs index 0400da8c72..1ba432c959 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/CacheOptions.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpDistributedCacheOptions.cs @@ -1,11 +1,16 @@ -using Microsoft.Extensions.Caching.Distributed; -using System; +using System; using System.Collections.Generic; +using Microsoft.Extensions.Caching.Distributed; namespace Volo.Abp.Caching { - public class CacheOptions + public class AbpDistributedCacheOptions { + /// + /// Throw or hide exceptions for the distributed cache. + /// + public bool HideErrors { get; set; } = true; + /// /// Cache key prefix. /// @@ -20,13 +25,13 @@ namespace Volo.Abp.Caching /// List of all cache configurators. /// (func argument:Name of cache) /// - public List> CacheConfigurators { get; set; } //TODO list item use a configurator interface instead? + public List> CacheConfigurators { get; set; } //TODO: use a configurator interface instead? - public CacheOptions() + public AbpDistributedCacheOptions() { CacheConfigurators = new List>(); GlobalCacheEntryOptions = new DistributedCacheEntryOptions(); KeyPrefix = ""; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs index caa51aeac1..2a1f109f5c 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs @@ -15,10 +15,36 @@ namespace Volo.Abp.Caching /// Represents a distributed cache of type. /// /// The type of cache item being cached. - public class DistributedCache : IDistributedCache + public class DistributedCache : DistributedCache, IDistributedCache where TCacheItem : class { - public ILogger> Logger { get; set; } + public DistributedCache( + IOptions cacheOption, + IOptions distributedCacheOption, + IDistributedCache cache, + ICancellationTokenProvider cancellationTokenProvider, + IDistributedCacheSerializer serializer, + ICurrentTenant currentTenant) : base( + cacheOption: cacheOption, + distributedCacheOption: distributedCacheOption, + cache: cache, + cancellationTokenProvider: cancellationTokenProvider, + serializer: serializer, + currentTenant: currentTenant) + { + } + + } + /// + /// Represents a distributed cache of type. + /// Uses a generic cache key type of type. + /// + /// The type of cache item being cached. + /// The type of cache key being used. + public class DistributedCache : IDistributedCache + where TCacheItem : class + { + public ILogger> Logger { get; set; } protected string CacheName { get; set; } @@ -36,13 +62,13 @@ namespace Volo.Abp.Caching protected DistributedCacheEntryOptions DefaultCacheOptions; - private readonly CacheOptions _cacheOption; + private readonly AbpDistributedCacheOptions _cacheOption; - private readonly DistributedCacheOptions _distributedCacheOption; + private readonly AbpDistributedCacheOptions _distributedCacheOption; public DistributedCache( - IOptions cacheOption, - IOptions distributedCacheOption, + IOptions cacheOption, + IOptions distributedCacheOption, IDistributedCache cache, ICancellationTokenProvider cancellationTokenProvider, IDistributedCacheSerializer serializer, @@ -52,7 +78,7 @@ namespace Volo.Abp.Caching _cacheOption = cacheOption.Value; Cache = cache; CancellationTokenProvider = cancellationTokenProvider; - Logger = NullLogger>.Instance; + Logger = NullLogger>.Instance; Serializer = serializer; CurrentTenant = currentTenant; @@ -60,7 +86,41 @@ namespace Volo.Abp.Caching SetDefaultOptions(); } + protected virtual string NormalizeKey(TCacheKey key) + { + var normalizedKey = "c:" + CacheName + ",k:" + _cacheOption.KeyPrefix + key.ToString(); + + if (!IgnoreMultiTenancy && CurrentTenant.Id.HasValue) + { + normalizedKey = "t:" + CurrentTenant.Id.Value + "," + normalizedKey; + } + + return normalizedKey; + } + + protected virtual DistributedCacheEntryOptions GetDefaultCacheEntryOptions() + { + foreach (var configure in _cacheOption.CacheConfigurators) + { + var options = configure.Invoke(CacheName); + if (options != null) + { + return options; + } + } + return _cacheOption.GlobalCacheEntryOptions; + } + + protected virtual void SetDefaultOptions() + { + CacheName = CacheNameAttribute.GetCacheName(typeof(TCacheItem)); + + //IgnoreMultiTenancy + IgnoreMultiTenancy = typeof(TCacheItem).IsDefined(typeof(IgnoreMultiTenancyAttribute), true); + //Configure default cache entry options + DefaultCacheOptions = GetDefaultCacheEntryOptions(); + } /// /// Gets a cache item with the given key. If no cache item is found for the given key then returns null. /// @@ -68,7 +128,7 @@ namespace Volo.Abp.Caching /// Indicates to throw or hide the exceptions for the distributed cache. /// The cache item, or null. public virtual TCacheItem Get( - string key, + TCacheKey key, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -106,8 +166,8 @@ namespace Volo.Abp.Caching /// The for the task. /// The cache item, or null. public virtual async Task GetAsync( - string key, - bool? hideErrors = null, + TCacheKey key, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -131,7 +191,7 @@ namespace Volo.Abp.Caching throw; } - + if (cachedBytes == null) { return null; @@ -139,7 +199,6 @@ namespace Volo.Abp.Caching return Serializer.Deserialize(cachedBytes); } - /// /// Gets or Adds a cache item with the given key. If no cache item is found for the given key then adds a cache item /// provided by delegate and returns the provided cache item. @@ -149,10 +208,10 @@ namespace Volo.Abp.Caching /// The cache options for the factory delegate. /// Indicates to throw or hide the exceptions for the distributed cache. /// The cache item. - public TCacheItem GetOrAdd( - string key, - Func factory, - Func optionsFactory = null, + public virtual TCacheItem GetOrAdd( + TCacheKey key, + Func factory, + Func optionsFactory = null, bool? hideErrors = null) { var value = Get(key, hideErrors); @@ -175,7 +234,6 @@ namespace Volo.Abp.Caching return value; } - /// /// Gets or Adds a cache item with the given key. If no cache item is found for the given key then adds a cache item /// provided by delegate and returns the provided cache item. @@ -186,11 +244,11 @@ namespace Volo.Abp.Caching /// Indicates to throw or hide the exceptions for the distributed cache. /// The for the task. /// The cache item. - public async Task GetOrAddAsync( - string key, - Func> factory, - Func optionsFactory = null, - bool? hideErrors = null, + public virtual async Task GetOrAddAsync( + TCacheKey key, + Func> factory, + Func optionsFactory = null, + bool? hideErrors = null, CancellationToken token = default) { token = CancellationTokenProvider.FallbackToProvider(token); @@ -214,7 +272,6 @@ namespace Volo.Abp.Caching return value; } - /// /// Sets the cache item value for the provided key. /// @@ -223,9 +280,9 @@ namespace Volo.Abp.Caching /// The cache options for the value. /// Indicates to throw or hide the exceptions for the distributed cache. public virtual void Set( - string key, - TCacheItem value, - DistributedCacheEntryOptions options = null, + TCacheKey key, + TCacheItem value, + DistributedCacheEntryOptions options = null, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -249,7 +306,6 @@ namespace Volo.Abp.Caching throw; } } - /// /// Sets the cache item value for the provided key. /// @@ -260,10 +316,10 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. public virtual async Task SetAsync( - string key, - TCacheItem value, - DistributedCacheEntryOptions options = null, - bool? hideErrors = null, + TCacheKey key, + TCacheItem value, + DistributedCacheEntryOptions options = null, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -288,15 +344,14 @@ namespace Volo.Abp.Caching throw; } } - /// /// Refreshes the cache value of the given key, and resets its sliding expiration timeout. /// /// The key of cached item to be retrieved from the cache. /// Indicates to throw or hide the exceptions for the distributed cache. public virtual void Refresh( - string key, - bool? hideErrors = null) + TCacheKey key, bool? + hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -315,7 +370,6 @@ namespace Volo.Abp.Caching throw; } } - /// /// Refreshes the cache value of the given key, and resets its sliding expiration timeout. /// @@ -324,8 +378,8 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. public virtual async Task RefreshAsync( - string key, - bool? hideErrors = null, + TCacheKey key, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -345,15 +399,13 @@ namespace Volo.Abp.Caching throw; } } - - /// /// Removes the cache item for given key from cache. /// /// The key of cached item to be retrieved from the cache. /// Indicates to throw or hide the exceptions for the distributed cache. public virtual void Remove( - string key, + TCacheKey key, bool? hideErrors = null) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -372,7 +424,6 @@ namespace Volo.Abp.Caching throw; } } - /// /// Removes the cache item for given key from cache. /// @@ -381,8 +432,8 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. public virtual async Task RemoveAsync( - string key, - bool? hideErrors = null, + TCacheKey key, + bool? hideErrors = null, CancellationToken token = default) { hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; @@ -401,42 +452,8 @@ namespace Volo.Abp.Caching throw; } - } - - protected virtual string NormalizeKey(string key) - { - var normalizedKey = "c:" + CacheName + ",k:" + _cacheOption.KeyPrefix + key; - - if (!IgnoreMultiTenancy && CurrentTenant.Id.HasValue) - { - normalizedKey = "t:" + CurrentTenant.Id.Value + "," + normalizedKey; - } - - return normalizedKey; - } - - protected virtual DistributedCacheEntryOptions GetDefaultCacheEntryOptions() - { - foreach (var configure in _cacheOption.CacheConfigurators) - { - var options = configure.Invoke(CacheName); - if (options != null) - { - return options; - } - } - return _cacheOption.GlobalCacheEntryOptions; - } - - protected virtual void SetDefaultOptions() - { - CacheName = CacheNameAttribute.GetCacheName(typeof(TCacheItem)); - - //IgnoreMultiTenancy - IgnoreMultiTenancy = typeof(TCacheItem).IsDefined(typeof(IgnoreMultiTenancyAttribute), true); - - //Configure default cache entry options - DefaultCacheOptions = GetDefaultCacheEntryOptions(); - } - } + } + + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCacheOptions.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCacheOptions.cs deleted file mode 100644 index 36a465ebaa..0000000000 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCacheOptions.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Volo.Abp.Caching -{ - public class DistributedCacheOptions - { - /// - /// Throw or hide exceptions for the distributed cache. - /// - public bool HideErrors { get; set; } = true; - } -} diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/IDistributedCache.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/IDistributedCache.cs index 23bd6f4cf2..163da05632 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/IDistributedCache.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/IDistributedCache.cs @@ -10,7 +10,18 @@ namespace Volo.Abp.Caching /// Represents a distributed cache of type. /// /// The type of cache item being cached. - public interface IDistributedCache + public interface IDistributedCache : IDistributedCache + where TCacheItem : class + { + + } + /// + /// Represents a distributed cache of type. + /// Uses a generic cache key type of type. + /// + /// The type of cache item being cached. + /// The type of cache key being used. + public interface IDistributedCache where TCacheItem : class { /// @@ -20,7 +31,7 @@ namespace Volo.Abp.Caching /// Indicates to throw or hide the exceptions for the distributed cache. /// The cache item, or null. TCacheItem Get( - string key, + TCacheKey key, bool? hideErrors = null ); @@ -32,7 +43,7 @@ namespace Volo.Abp.Caching /// The for the task. /// The cache item, or null. Task GetAsync( - [NotNull] string key, + [NotNull] TCacheKey key, bool? hideErrors = null, CancellationToken token = default ); @@ -47,7 +58,7 @@ namespace Volo.Abp.Caching /// Indicates to throw or hide the exceptions for the distributed cache. /// The cache item. TCacheItem GetOrAdd( - string key, + TCacheKey key, Func factory, Func optionsFactory = null, bool? hideErrors = null @@ -64,7 +75,7 @@ namespace Volo.Abp.Caching /// The for the task. /// The cache item. Task GetOrAddAsync( - [NotNull] string key, + [NotNull] TCacheKey key, Func> factory, Func optionsFactory = null, bool? hideErrors = null, @@ -79,7 +90,7 @@ namespace Volo.Abp.Caching /// The cache options for the value. /// Indicates to throw or hide the exceptions for the distributed cache. void Set( - string key, + TCacheKey key, TCacheItem value, DistributedCacheEntryOptions options = null, bool? hideErrors = null @@ -95,7 +106,7 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. Task SetAsync( - [NotNull] string key, + [NotNull] TCacheKey key, [NotNull] TCacheItem value, [CanBeNull] DistributedCacheEntryOptions options = null, bool? hideErrors = null, @@ -108,7 +119,7 @@ namespace Volo.Abp.Caching /// The key of cached item to be retrieved from the cache. /// Indicates to throw or hide the exceptions for the distributed cache. void Refresh( - string key, + TCacheKey key, bool? hideErrors = null ); @@ -120,7 +131,7 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. Task RefreshAsync( - string key, + TCacheKey key, bool? hideErrors = null, CancellationToken token = default ); @@ -131,7 +142,7 @@ namespace Volo.Abp.Caching /// The key of cached item to be retrieved from the cache. /// Indicates to throw or hide the exceptions for the distributed cache. void Remove( - string key, + TCacheKey key, bool? hideErrors = null ); @@ -143,7 +154,7 @@ namespace Volo.Abp.Caching /// The for the task. /// The indicating that the operation is asynchronous. Task RemoveAsync( - string key, + TCacheKey key, bool? hideErrors = null, CancellationToken token = default ); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index df991857dc..eacd952e35 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -15,10 +15,10 @@ - - - - + + + + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index b51ef5fb2d..a616d29409 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.Cli // a permanent fix will probably be published with the release of .net core 3.0: https://github.com/dotnet/corefx/issues/36553 AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false); - Configure(options => + Configure(options => { options.Commands["help"] = typeof(HelpCommand); options.Commands["new"] = typeof(NewCommand); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliOptions.cs similarity index 89% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliOptions.cs index ca9e61bf82..8cca4a160e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliOptions.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; namespace Volo.Abp.Cli { - public class CliOptions + public class AbpCliOptions { public Dictionary Commands { get; } @@ -17,7 +17,7 @@ namespace Volo.Abp.Cli /// public string ToolName { get; set; } = "CLI"; - public CliOptions() + public AbpCliOptions() { Commands = new Dictionary(StringComparer.OrdinalIgnoreCase); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AbpCommandLineOptions.cs similarity index 92% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AbpCommandLineOptions.cs index 3e72d6e434..650e48b15e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AbpCommandLineOptions.cs @@ -4,7 +4,7 @@ using JetBrains.Annotations; namespace Volo.Abp.Cli.Args { - public class CommandLineOptions : Dictionary + public class AbpCommandLineOptions : Dictionary { [CanBeNull] public string GetOrNull([NotNull] string name, params string[] alternativeNames) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs index 5e1191c385..097c661877 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs @@ -14,13 +14,13 @@ namespace Volo.Abp.Cli.Args public string Target { get; } [NotNull] - public CommandLineOptions Options { get; } + public AbpCommandLineOptions Options { get; } public CommandLineArgs([CanBeNull] string command = null, [CanBeNull] string target = null) { Command = command; Target = target; - Options = new CommandLineOptions(); + Options = new AbpCommandLineOptions(); } public static CommandLineArgs Empty() diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs index 595917e845..f77a002370 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs @@ -8,9 +8,9 @@ namespace Volo.Abp.Cli.Commands { public class CommandSelector : ICommandSelector, ITransientDependency { - protected CliOptions Options { get; } + protected AbpCliOptions Options { get; } - public CommandSelector(IOptions options) + public CommandSelector(IOptions options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs index 38e8d075d0..dd9145e8db 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs @@ -13,15 +13,15 @@ namespace Volo.Abp.Cli.Commands public class HelpCommand : IConsoleCommand, ITransientDependency { public ILogger Logger { get; set; } - protected CliOptions CliOptions { get; } + protected AbpCliOptions AbpCliOptions { get; } protected IHybridServiceScopeFactory ServiceScopeFactory { get; } - public HelpCommand(IOptions cliOptions, + public HelpCommand(IOptions cliOptions, IHybridServiceScopeFactory serviceScopeFactory) { ServiceScopeFactory = serviceScopeFactory; Logger = NullLogger.Instance; - CliOptions = cliOptions.Value; + AbpCliOptions = cliOptions.Value; } public async Task ExecuteAsync(CommandLineArgs commandLineArgs) @@ -32,7 +32,7 @@ namespace Volo.Abp.Cli.Commands return; } - var commandType = CliOptions.Commands[commandLineArgs.Target]; + var commandType = AbpCliOptions.Commands[commandLineArgs.Target]; using (var scope = ServiceScopeFactory.CreateScope()) { @@ -53,7 +53,7 @@ namespace Volo.Abp.Cli.Commands sb.AppendLine("Command List:"); sb.AppendLine(""); - foreach (var command in CliOptions.Commands.ToArray()) + foreach (var command in AbpCliOptions.Commands.ToArray()) { string shortDescription; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs index 97c11f1f29..0f31af2eb0 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs @@ -21,14 +21,14 @@ namespace Volo.Abp.Cli.Commands private readonly VoloNugetPackagesVersionUpdater _nugetPackagesVersionUpdater; private readonly NpmPackagesUpdater _npmPackagesUpdater; private readonly ICliAnalyticsCollect _cliAnalyticsCollect; - private readonly CliOptions _options; + private readonly AbpCliOptions _options; private readonly IJsonSerializer _jsonSerializer; public UpdateCommand(VoloNugetPackagesVersionUpdater nugetPackagesVersionUpdater, NpmPackagesUpdater npmPackagesUpdater, ICliAnalyticsCollect cliAnalyticsCollect, IJsonSerializer jsonSerializer, - IOptions options) + IOptions options) { _nugetPackagesVersionUpdater = nugetPackagesVersionUpdater; _npmPackagesUpdater = npmPackagesUpdater; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs index ac51be6fac..fd0a0e5246 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.Cli.ProjectBuilding { public ILogger Logger { get; set; } - protected CliOptions Options { get; } + protected AbpCliOptions Options { get; } protected IJsonSerializer JsonSerializer { get; } @@ -30,7 +30,7 @@ namespace Volo.Abp.Cli.ProjectBuilding protected ICancellationTokenProvider CancellationTokenProvider { get; } public AbpIoSourceCodeStore( - IOptions options, + IOptions options, IJsonSerializer jsonSerializer, IRemoteServiceExceptionHandler remoteServiceExceptionHandler, ICancellationTokenProvider cancellationTokenProvider) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs index 57332bd5e2..48f109e1d3 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs @@ -20,14 +20,14 @@ namespace Volo.Abp.Cli.ProjectBuilding protected ISourceCodeStore SourceCodeStore { get; } protected IModuleInfoProvider ModuleInfoProvider { get; } protected ICliAnalyticsCollect CliAnalyticsCollect { get; } - protected CliOptions Options { get; } + protected AbpCliOptions Options { get; } protected IJsonSerializer JsonSerializer { get; } protected IApiKeyService ApiKeyService { get; } public ModuleProjectBuilder(ISourceCodeStore sourceCodeStore, IModuleInfoProvider moduleInfoProvider, ICliAnalyticsCollect cliAnalyticsCollect, - IOptions options, + IOptions options, IJsonSerializer jsonSerializer, IApiKeyService apiKeyService) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs index e1248b32f0..9d31e10200 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs @@ -20,14 +20,14 @@ namespace Volo.Abp.Cli.ProjectBuilding protected ISourceCodeStore SourceCodeStore { get; } protected ITemplateInfoProvider TemplateInfoProvider { get; } protected ICliAnalyticsCollect CliAnalyticsCollect { get; } - protected CliOptions Options { get; } + protected AbpCliOptions Options { get; } protected IJsonSerializer JsonSerializer { get; } protected IApiKeyService ApiKeyService { get; } public TemplateProjectBuilder(ISourceCodeStore sourceCodeStore, ITemplateInfoProvider templateInfoProvider, ICliAnalyticsCollect cliAnalyticsCollect, - IOptions options, + IOptions options, IJsonSerializer jsonSerializer, IApiKeyService apiKeyService) { diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index 01d1a210ef..5f16964cef 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/AbpConfigurationBuilderOptions.cs similarity index 87% rename from framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs rename to framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/AbpConfigurationBuilderOptions.cs index aa55c0e876..93c9fe26c1 100644 --- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/AbpConfigurationBuilderOptions.cs @@ -2,7 +2,7 @@ namespace Microsoft.Extensions.Configuration { - public class ConfigurationBuilderOptions + public class AbpConfigurationBuilderOptions { /// /// Used to set assembly which is used to get the user secret id for the application. @@ -35,5 +35,10 @@ namespace Microsoft.Extensions.Configuration /// Prefix for the environment variables. /// public string EnvironmentVariablesPrefix { get; set; } + + /// + /// Command line arguments. + /// + public string[] CommandLineArgs { get; set; } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs index 37e721f1af..44b75d1adb 100644 --- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs @@ -5,9 +5,10 @@ namespace Microsoft.Extensions.Configuration { public static class ConfigurationHelper { - public static IConfigurationRoot BuildConfiguration(ConfigurationBuilderOptions options = null) + public static IConfigurationRoot BuildConfiguration( + AbpConfigurationBuilderOptions options = null) { - options = options ?? new ConfigurationBuilderOptions(); + options = options ?? new AbpConfigurationBuilderOptions(); if (options.BasePath.IsNullOrEmpty()) { @@ -22,8 +23,6 @@ namespace Microsoft.Extensions.Configuration { builder = builder.AddJsonFile($"{options.FileName}.{options.EnvironmentName}.json", optional: true, reloadOnChange: true); } - - builder = builder.AddEnvironmentVariables(options.EnvironmentVariablesPrefix); if (options.EnvironmentName == "Development") { @@ -37,6 +36,13 @@ namespace Microsoft.Extensions.Configuration } } + builder = builder.AddEnvironmentVariables(options.EnvironmentVariablesPrefix); + + if (options.CommandLineArgs != null) + { + builder = builder.AddCommandLine(options.CommandLineArgs); + } + return builder.Build(); } } diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs index 97a6ed4189..bcd3892e87 100644 --- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs @@ -1,20 +1,17 @@ -using System; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Hosting; -using Volo.Abp.Configuration; namespace Microsoft.Extensions.DependencyInjection { public static class ServiceCollectionConfigurationExtensions { - [Obsolete] - public static IServiceCollection SetConfiguration(this IServiceCollection services, IConfigurationRoot configurationRoot) + public static IServiceCollection ReplaceConfiguration(this IServiceCollection services, IConfiguration configuration) { - return services.Replace(ServiceDescriptor.Singleton(new DefaultConfigurationAccessor(configurationRoot))); + return services.Replace(ServiceDescriptor.Singleton(configuration)); } - public static IConfigurationRoot GetConfiguration(this IServiceCollection services) + public static IConfiguration GetConfiguration(this IServiceCollection services) { var hostBuilderContext = services.GetSingletonInstanceOrNull(); if (hostBuilderContext?.Configuration != null) @@ -22,7 +19,7 @@ namespace Microsoft.Extensions.DependencyInjection return hostBuilderContext.Configuration as IConfigurationRoot; } - return services.GetSingletonInstance().Configuration; + return services.GetSingletonInstance(); } } } diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index 7d6562e478..475525c41d 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -17,6 +17,7 @@ + diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs index 005471d9b9..e4d7744ae8 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs @@ -14,13 +14,13 @@ namespace Volo.Abp public PlugInSourceList PlugInSources { get; } [NotNull] - public ConfigurationBuilderOptions Configuration {get; } + public AbpConfigurationBuilderOptions Configuration {get; } public AbpApplicationCreationOptions([NotNull] IServiceCollection services) { Services = Check.NotNull(services, nameof(services)); PlugInSources = new PlugInSourceList(); - Configuration = new ConfigurationBuilderOptions(); + Configuration = new AbpConfigurationBuilderOptions(); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Aspects/AbpCrossCuttingConcerns.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Aspects/AbpCrossCuttingConcerns.cs index 4c8033a0cf..8c861884e8 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Aspects/AbpCrossCuttingConcerns.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Aspects/AbpCrossCuttingConcerns.cs @@ -9,9 +9,7 @@ namespace Volo.Abp.Aspects //TODO: Move these constants to their own assemblies! public const string Auditing = "AbpAuditing"; - public const string Validation = "AbpValidation"; public const string UnitOfWork = "AbpUnitOfWork"; - public const string Authorization = "AbpAuthorization"; public const string FeatureChecking = "AbpFeatureChecking"; public static void AddApplied(object obj, params string[] concerns) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Configuration/DefaultConfigurationAccessor.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Configuration/DefaultConfigurationAccessor.cs deleted file mode 100644 index 318972f549..0000000000 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Configuration/DefaultConfigurationAccessor.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.Configuration; - -namespace Volo.Abp.Configuration -{ - public class DefaultConfigurationAccessor : IConfigurationAccessor - { - public static DefaultConfigurationAccessor Empty { get; } - - public virtual IConfigurationRoot Configuration { get; } - - static DefaultConfigurationAccessor() - { - Empty = new DefaultConfigurationAccessor( - new ConfigurationBuilder().Build() - ); - } - - public DefaultConfigurationAccessor(IConfigurationRoot configuration) - { - Configuration = configuration; - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Configuration/IConfigurationAccessor.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Configuration/IConfigurationAccessor.cs deleted file mode 100644 index 34e5d96692..0000000000 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Configuration/IConfigurationAccessor.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using Microsoft.Extensions.Configuration; - -namespace Volo.Abp.Configuration -{ - [Obsolete("IConfigurationAccessor will be removed in v1.0. Use IConfiguration instead (be use that you are using generic host just like the startup templates).")] - public interface IConfigurationAccessor - { - IConfigurationRoot Configuration { get; } - } -} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs index 609328216e..83a7ec163e 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs @@ -1,7 +1,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Volo.Abp.Configuration; using Volo.Abp.Modularity; using Volo.Abp.Reflection; @@ -24,17 +23,13 @@ namespace Volo.Abp.Internal var assemblyFinder = new AssemblyFinder(abpApplication); var typeFinder = new TypeFinder(assemblyFinder); - var configurationAccessor = new DefaultConfigurationAccessor( - ConfigurationHelper.BuildConfiguration( - applicationCreationOptions.Configuration - ) - ); - - services.TryAddSingleton(configurationAccessor); - if (!services.IsAdded()) { - services.AddSingleton(configurationAccessor.Configuration); + services.ReplaceConfiguration( + ConfigurationHelper.BuildConfiguration( + applicationCreationOptions.Configuration + ) + ); } services.TryAddSingleton(moduleLoader); @@ -43,7 +38,7 @@ namespace Volo.Abp.Internal services.AddAssemblyOf(); - services.Configure(options => + services.Configure(options => { options.Contributors.Add(); options.Contributors.Add(); diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleOptions.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleLifecycleOptions.cs similarity index 74% rename from framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleOptions.cs rename to framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleLifecycleOptions.cs index 8136a32677..3ea260c633 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleOptions.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleLifecycleOptions.cs @@ -2,11 +2,11 @@ namespace Volo.Abp.Modularity { - public class ModuleLifecycleOptions + public class AbpModuleLifecycleOptions { public ITypeList Contributors { get; } - public ModuleLifecycleOptions() + public AbpModuleLifecycleOptions() { Contributors = new TypeList(); } diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs index 934948dc03..8f25389b63 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.Modularity public ModuleManager( IModuleContainer moduleContainer, ILogger logger, - IOptions options, + IOptions options, IServiceProvider serviceProvider) { _moduleContainer = moduleContainer; diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Tracing/CorrelationIdOptions.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Tracing/AbpCorrelationIdOptions.cs similarity index 81% rename from framework/src/Volo.Abp.Core/Volo/Abp/Tracing/CorrelationIdOptions.cs rename to framework/src/Volo.Abp.Core/Volo/Abp/Tracing/AbpCorrelationIdOptions.cs index 0b794674ad..38cd6ca87f 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Tracing/CorrelationIdOptions.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Tracing/AbpCorrelationIdOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.Tracing { - public class CorrelationIdOptions + public class AbpCorrelationIdOptions { public string HttpHeaderName { get; set; } = "X-Correlation-Id"; diff --git a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj index 0b9ba3f9a9..f7b9d76169 100644 --- a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj +++ b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj @@ -18,7 +18,7 @@ - + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilterOptions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataFilterOptions.cs similarity index 76% rename from framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilterOptions.cs rename to framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataFilterOptions.cs index dbf5187c73..5d3a16d034 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilterOptions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataFilterOptions.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; namespace Volo.Abp.Data { - public class DataFilterOptions + public class AbpDataFilterOptions { public Dictionary DefaultStates { get; } - public DataFilterOptions() + public AbpDataFilterOptions() { DefaultStates = new Dictionary(); } diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataModule.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataModule.cs index 584298f2d4..2414803970 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataModule.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataModule.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Data { var configuration = context.Services.GetConfiguration(); - Configure(configuration); + Configure(configuration); context.Services.AddSingleton(typeof(IDataFilter<>), typeof(DataFilter<>)); } @@ -37,7 +37,7 @@ namespace Volo.Abp.Data } }); - services.Configure(options => + services.Configure(options => { options.Contributors.AddIfNotContains(contributors); }); diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedOptions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataSeedOptions.cs similarity index 71% rename from framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedOptions.cs rename to framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataSeedOptions.cs index 940f68175d..a641fe8016 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedOptions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataSeedOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.Data { - public class DataSeedOptions + public class AbpDataSeedOptions { public DataSeedContributorList Contributors { get; } - public DataSeedOptions() + public AbpDataSeedOptions() { Contributors = new DataSeedContributorList(); } diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DbConnectionOptions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDbConnectionOptions.cs similarity index 69% rename from framework/src/Volo.Abp.Data/Volo/Abp/Data/DbConnectionOptions.cs rename to framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDbConnectionOptions.cs index 9c3e8e856a..863bffb743 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DbConnectionOptions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDbConnectionOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.Data { - public class DbConnectionOptions + public class AbpDbConnectionOptions { public ConnectionStrings ConnectionStrings { get; set; } - public DbConnectionOptions() + public AbpDbConnectionOptions() { ConnectionStrings = new ConnectionStrings(); } diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilter.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilter.cs index 73741dcfcb..b6770adff4 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilter.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilter.cs @@ -61,11 +61,11 @@ namespace Volo.Abp.Data } } - private readonly DataFilterOptions _options; + private readonly AbpDataFilterOptions _options; private readonly AsyncLocal _filter; - public DataFilter(IOptions options) + public DataFilter(IOptions options) { _options = options.Value; _filter = new AsyncLocal(); diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs index a4d6c0886b..c20badbeb7 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs @@ -10,10 +10,10 @@ namespace Volo.Abp.Data public class DataSeeder : IDataSeeder, ITransientDependency { protected IHybridServiceScopeFactory ServiceScopeFactory { get; } - protected DataSeedOptions Options { get; } + protected AbpDataSeedOptions Options { get; } public DataSeeder( - IOptions options, + IOptions options, IHybridServiceScopeFactory serviceScopeFactory) { ServiceScopeFactory = serviceScopeFactory; diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs index b0f1fdf38a..84221fb271 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs @@ -7,9 +7,9 @@ namespace Volo.Abp.Data { public class DefaultConnectionStringResolver : IConnectionStringResolver, ITransientDependency { - protected DbConnectionOptions Options { get; } + protected AbpDbConnectionOptions Options { get; } - public DefaultConnectionStringResolver(IOptionsSnapshot options) + public DefaultConnectionStringResolver(IOptionsSnapshot options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs index 14d7bc686f..c5a16ea6bb 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/AbpDddApplicationModule.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.Application { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { //TODO: Should we move related items to their own projects? options.IgnoredInterfaces.AddIfNotContains(typeof(IRemoteService)); diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/AbpCommonDbContextRegistrationOptions.cs similarity index 81% rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs rename to framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/AbpCommonDbContextRegistrationOptions.cs index b4ce91d615..c7f7230710 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/AbpCommonDbContextRegistrationOptions.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.DependencyInjection /// /// This is a base class for dbcoUse derived /// - public abstract class CommonDbContextRegistrationOptions : ICommonDbContextRegistrationOptionsBuilder + public abstract class AbpCommonDbContextRegistrationOptions : IAbpCommonDbContextRegistrationOptionsBuilder { public Type OriginalDbContextType { get; } @@ -31,7 +31,7 @@ namespace Volo.Abp.DependencyInjection public bool SpecifiedDefaultRepositoryTypes => DefaultRepositoryImplementationType != null && DefaultRepositoryImplementationTypeWithoutKey != null; - protected CommonDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) + protected AbpCommonDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) { OriginalDbContextType = originalDbContextType; Services = services; @@ -40,12 +40,12 @@ namespace Volo.Abp.DependencyInjection ReplacedDbContextTypes = new List(); } - public ICommonDbContextRegistrationOptionsBuilder ReplaceDbContext() + public IAbpCommonDbContextRegistrationOptionsBuilder ReplaceDbContext() { return ReplaceDbContext(typeof(TOtherDbContext)); } - public ICommonDbContextRegistrationOptionsBuilder ReplaceDbContext(Type otherDbContextType) + public IAbpCommonDbContextRegistrationOptionsBuilder ReplaceDbContext(Type otherDbContextType) { if (!otherDbContextType.IsAssignableFrom(OriginalDbContextType)) { @@ -57,7 +57,7 @@ namespace Volo.Abp.DependencyInjection return this; } - public ICommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false) + public IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false) { RegisterDefaultRepositories = true; IncludeAllEntitiesForDefaultRepositories = includeAllEntities; @@ -65,7 +65,7 @@ namespace Volo.Abp.DependencyInjection return this; } - public ICommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(Type defaultRepositoryDbContextType, bool includeAllEntities = false) + public IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(Type defaultRepositoryDbContextType, bool includeAllEntities = false) { if (!defaultRepositoryDbContextType.IsAssignableFrom(OriginalDbContextType)) { @@ -77,19 +77,19 @@ namespace Volo.Abp.DependencyInjection return AddDefaultRepositories(includeAllEntities); } - public ICommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false) + public IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false) { return AddDefaultRepositories(typeof(TDefaultRepositoryDbContext), includeAllEntities); } - public ICommonDbContextRegistrationOptionsBuilder AddRepository() + public IAbpCommonDbContextRegistrationOptionsBuilder AddRepository() { AddCustomRepository(typeof(TEntity), typeof(TRepository)); return this; } - public ICommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses( + public IAbpCommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses( Type repositoryImplementationType, Type repositoryImplementationTypeWithoutKey ) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs similarity index 74% rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs rename to framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs index 32403707c2..368fa2dc96 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.DependencyInjection { - public interface ICommonDbContextRegistrationOptionsBuilder + public interface IAbpCommonDbContextRegistrationOptionsBuilder { IServiceCollection Services { get; } @@ -15,7 +15,7 @@ namespace Volo.Abp.DependencyInjection /// Registers repositories only for aggregate root entities by default. /// set to true to include all entities. /// - ICommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false); + IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false); /// /// Registers default repositories for this DbContext. @@ -26,7 +26,7 @@ namespace Volo.Abp.DependencyInjection /// Registers repositories only for aggregate root entities by default. /// set to true to include all entities. /// - ICommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false); + IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false); /// /// Registers default repositories for this DbContext. @@ -37,7 +37,7 @@ namespace Volo.Abp.DependencyInjection /// Registers repositories only for aggregate root entities by default. /// set to true to include all entities. /// - ICommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(Type defaultRepositoryDbContextType, bool includeAllEntities = false); + IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(Type defaultRepositoryDbContextType, bool includeAllEntities = false); /// /// Registers custom repository for a specific entity. @@ -45,7 +45,7 @@ namespace Volo.Abp.DependencyInjection /// /// Entity type /// Repository type - ICommonDbContextRegistrationOptionsBuilder AddRepository(); + IAbpCommonDbContextRegistrationOptionsBuilder AddRepository(); /// /// Uses given class(es) for default repositories. @@ -53,18 +53,18 @@ namespace Volo.Abp.DependencyInjection /// Repository implementation type /// Repository implementation type (without primary key) /// - ICommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses([NotNull] Type repositoryImplementationType, [NotNull] Type repositoryImplementationTypeWithoutKey); + IAbpCommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses([NotNull] Type repositoryImplementationType, [NotNull] Type repositoryImplementationTypeWithoutKey); /// /// Replaces given DbContext type with this DbContext type. /// /// The DbContext type to be replaced - ICommonDbContextRegistrationOptionsBuilder ReplaceDbContext(); + IAbpCommonDbContextRegistrationOptionsBuilder ReplaceDbContext(); /// /// Replaces given DbContext type with this DbContext type. /// /// The DbContext type to be replaced - ICommonDbContextRegistrationOptionsBuilder ReplaceDbContext(Type otherDbContextType); + IAbpCommonDbContextRegistrationOptionsBuilder ReplaceDbContext(Type otherDbContextType); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs index b15ea3d6a4..24a757fb08 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs @@ -11,10 +11,10 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed public class EntityToEtoMapper : IEntityToEtoMapper, ITransientDependency { protected IHybridServiceScopeFactory HybridServiceScopeFactory { get; } - protected DistributedEventBusOptions Options { get; } + protected AbpDistributedEventBusOptions Options { get; } public EntityToEtoMapper( - IOptions options, + IOptions options, IHybridServiceScopeFactory hybridServiceScopeFactory) { HybridServiceScopeFactory = hybridServiceScopeFactory; diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs index 3ffe507d29..f3b2fc388f 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs @@ -7,7 +7,7 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories { public abstract class RepositoryRegistrarBase - where TOptions: CommonDbContextRegistrationOptions + where TOptions: AbpCommonDbContextRegistrationOptions { public TOptions Options { get; } diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs index d3a9598da1..55ec63b9ac 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs @@ -25,12 +25,12 @@ namespace Volo.Abp.Emailing public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); - Configure(options => + Configure(options => { options.AddJob(); }); @@ -49,7 +49,7 @@ namespace Volo.Abp.Emailing } }); - services.Configure(options => + services.Configure(options => { options.DefinitionProviders.AddIfNotContains(definitionProviders); }); diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateOptions.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/AbpEmailTemplateOptions.cs similarity index 82% rename from framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateOptions.cs rename to framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/AbpEmailTemplateOptions.cs index 57533b1aff..cb5a9d370b 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateOptions.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/AbpEmailTemplateOptions.cs @@ -2,13 +2,13 @@ namespace Volo.Abp.Emailing.Templates { - public class EmailTemplateOptions + public class AbpEmailTemplateOptions { public string DefaultLayout { get; set; } public ITypeList DefinitionProviders { get; } - public EmailTemplateOptions() + public AbpEmailTemplateOptions() { DefaultLayout = StandardEmailTemplates.DefaultLayout; diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateDefinitionManager.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateDefinitionManager.cs index a6a58aef27..0491dc867e 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateDefinitionManager.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateDefinitionManager.cs @@ -12,12 +12,12 @@ namespace Volo.Abp.Emailing.Templates { protected Lazy> EmailTemplateDefinitions { get; } - protected EmailTemplateOptions Options { get; } + protected AbpEmailTemplateOptions Options { get; } protected IServiceProvider ServiceProvider { get; } public EmailTemplateDefinitionManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs index e8a2a9bac8..c67af27757 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs @@ -12,12 +12,12 @@ namespace Volo.Abp.Emailing.Templates { protected IEmailTemplateDefinitionManager EmailTemplateDefinitionManager; protected ITemplateLocalizer TemplateLocalizer { get; } - protected EmailTemplateOptions Options { get; } + protected AbpEmailTemplateOptions Options { get; } protected IStringLocalizerFactory StringLocalizerFactory; public EmailTemplateProvider(IEmailTemplateDefinitionManager emailTemplateDefinitionManager, ITemplateLocalizer templateLocalizer, IStringLocalizerFactory stringLocalizerFactory, - IOptions options) + IOptions options) { EmailTemplateDefinitionManager = emailTemplateDefinitionManager; TemplateLocalizer = templateLocalizer; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index e26624747c..bfedcf2d66 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -23,20 +23,20 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore protected virtual TDbContext DbContext => _dbContextProvider.GetDbContext(); - protected virtual EntityOptions EntityOptions => _entityOptionsLazy.Value; + protected virtual AbpEntityOptions AbpEntityOptions => _entityOptionsLazy.Value; private readonly IDbContextProvider _dbContextProvider; - private readonly Lazy> _entityOptionsLazy; + private readonly Lazy> _entityOptionsLazy; public EfCoreRepository(IDbContextProvider dbContextProvider) { _dbContextProvider = dbContextProvider; - _entityOptionsLazy = new Lazy>( + _entityOptionsLazy = new Lazy>( () => ServiceProvider - .GetRequiredService>() + .GetRequiredService>() .Value - .GetOrNull() ?? EntityOptions.Empty + .GetOrNull() ?? AbpEntityOptions.Empty ); } @@ -194,12 +194,12 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override IQueryable WithDetails() { - if (EntityOptions.DefaultWithDetailsFunc == null) + if (AbpEntityOptions.DefaultWithDetailsFunc == null) { return base.WithDetails(); } - return EntityOptions.DefaultWithDetailsFunc(GetQueryable()); + return AbpEntityOptions.DefaultWithDetailsFunc(GetQueryable()); } public override IQueryable WithDetails(params Expression>[] propertySelectors) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpDbContextRegistrationOptions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpDbContextRegistrationOptions.cs index be5f504ffd..52b654aa88 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpDbContextRegistrationOptions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpDbContextRegistrationOptions.cs @@ -6,19 +6,19 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.EntityFrameworkCore.DependencyInjection { - public class AbpDbContextRegistrationOptions : CommonDbContextRegistrationOptions, IAbpDbContextRegistrationOptionsBuilder + public class AbpDbContextRegistrationOptions : AbpCommonDbContextRegistrationOptions, IAbpDbContextRegistrationOptionsBuilder { - public Dictionary EntityOptions { get; } + public Dictionary AbpEntityOptions { get; } public AbpDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) : base(originalDbContextType, services) { - EntityOptions = new Dictionary(); + AbpEntityOptions = new Dictionary(); } - public void Entity(Action> optionsAction) where TEntity : IEntity + public void Entity(Action> optionsAction) where TEntity : IEntity { - Services.Configure(options => + Services.Configure(options => { options.Entity(optionsAction); }); diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EntityOptions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpEntityOptions.cs similarity index 58% rename from framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EntityOptions.cs rename to framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpEntityOptions.cs index b465dcc667..239ceb04a8 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EntityOptions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/AbpEntityOptions.cs @@ -6,30 +6,30 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.EntityFrameworkCore.DependencyInjection { - public class EntityOptions + public class AbpEntityOptions where TEntity : IEntity { - public static EntityOptions Empty { get; } = new EntityOptions(); + public static AbpEntityOptions Empty { get; } = new AbpEntityOptions(); public Func, IQueryable> DefaultWithDetailsFunc { get; set; } } - public class EntityOptions + public class AbpEntityOptions { private readonly IDictionary _options; - public EntityOptions() + public AbpEntityOptions() { _options = new Dictionary(); } - public EntityOptions GetOrNull() + public AbpEntityOptions GetOrNull() where TEntity : IEntity { - return _options.GetOrDefault(typeof(TEntity)) as EntityOptions; + return _options.GetOrDefault(typeof(TEntity)) as AbpEntityOptions; } - public void Entity([NotNull] Action> optionsAction) + public void Entity([NotNull] Action> optionsAction) where TEntity : IEntity { Check.NotNull(optionsAction, nameof(optionsAction)); @@ -37,8 +37,8 @@ namespace Volo.Abp.EntityFrameworkCore.DependencyInjection optionsAction( _options.GetOrAdd( typeof(TEntity), - () => new EntityOptions() - ) as EntityOptions + () => new AbpEntityOptions() + ) as AbpEntityOptions ); } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/IAbpDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/IAbpDbContextRegistrationOptionsBuilder.cs index d72bbe414f..daf1447f2e 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/IAbpDbContextRegistrationOptionsBuilder.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/IAbpDbContextRegistrationOptionsBuilder.cs @@ -5,9 +5,9 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.EntityFrameworkCore.DependencyInjection { - public interface IAbpDbContextRegistrationOptionsBuilder : ICommonDbContextRegistrationOptionsBuilder + public interface IAbpDbContextRegistrationOptionsBuilder : IAbpCommonDbContextRegistrationOptionsBuilder { - void Entity([NotNull] Action> optionsAction) + void Entity([NotNull] Action> optionsAction) where TEntity : IEntity; } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProvider.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProvider.cs new file mode 100644 index 0000000000..0ec8e4e469 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProvider.cs @@ -0,0 +1,14 @@ +namespace Volo.Abp.EntityFrameworkCore +{ + public enum EfCoreDatabaseProvider + { + SqlServer, + MySql, + Oracle, + PostgreSql, + Sqlite, + InMemory, + Cosmos, + Firebird + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/ModelBuilderConfigurationOptions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/AbpModelBuilderConfigurationOptions.cs similarity index 88% rename from framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/ModelBuilderConfigurationOptions.cs rename to framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/AbpModelBuilderConfigurationOptions.cs index 808ef80bb6..7f3c24b6fb 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/ModelBuilderConfigurationOptions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/AbpModelBuilderConfigurationOptions.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.EntityFrameworkCore.Modeling { - public class ModelBuilderConfigurationOptions + public class AbpModelBuilderConfigurationOptions { [NotNull] public string TablePrefix @@ -19,7 +19,7 @@ namespace Volo.Abp.EntityFrameworkCore.Modeling [CanBeNull] public string Schema { get; set; } - public ModelBuilderConfigurationOptions( + public AbpModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "", [CanBeNull] string schema = null) { diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs index f13f1ae2fe..f2dbde18b2 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.EventBus.RabbitMq { var configuration = context.Services.GetConfiguration(); - Configure(configuration.GetSection("RabbitMQ:EventBus")); + Configure(configuration.GetSection("RabbitMQ:EventBus")); } public override void OnApplicationInitialization(ApplicationInitializationContext context) diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs similarity index 82% rename from framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs rename to framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs index 5a92a07869..f91ca91c89 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.EventBus.RabbitMq { - public class RabbitMqEventBusOptions + public class AbpRabbitMqEventBusOptions { public string ConnectionName { get; set; } diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index ad8643ebae..c530437e6f 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -22,8 +22,8 @@ namespace Volo.Abp.EventBus.RabbitMq [ExposeServices(typeof(IDistributedEventBus), typeof(RabbitMqDistributedEventBus))] public class RabbitMqDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency { - protected RabbitMqEventBusOptions RabbitMqEventBusOptions { get; } - protected DistributedEventBusOptions DistributedEventBusOptions { get; } + protected AbpRabbitMqEventBusOptions AbpRabbitMqEventBusOptions { get; } + protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } protected IConnectionPool ConnectionPool { get; } protected IRabbitMqSerializer Serializer { get; } @@ -34,19 +34,19 @@ namespace Volo.Abp.EventBus.RabbitMq protected IRabbitMqMessageConsumer Consumer { get; private set; } public RabbitMqDistributedEventBus( - IOptions options, + IOptions options, IConnectionPool connectionPool, IRabbitMqSerializer serializer, IServiceScopeFactory serviceScopeFactory, - IOptions distributedEventBusOptions, + IOptions distributedEventBusOptions, IRabbitMqMessageConsumerFactory messageConsumerFactory) : base(serviceScopeFactory) { ConnectionPool = connectionPool; Serializer = serializer; MessageConsumerFactory = messageConsumerFactory; - DistributedEventBusOptions = distributedEventBusOptions.Value; - RabbitMqEventBusOptions = options.Value; + AbpDistributedEventBusOptions = distributedEventBusOptions.Value; + AbpRabbitMqEventBusOptions = options.Value; HandlerFactories = new ConcurrentDictionary>(); EventTypes = new ConcurrentDictionary(); @@ -56,22 +56,22 @@ namespace Volo.Abp.EventBus.RabbitMq { Consumer = MessageConsumerFactory.Create( new ExchangeDeclareConfiguration( - RabbitMqEventBusOptions.ExchangeName, + AbpRabbitMqEventBusOptions.ExchangeName, type: "direct", durable: true ), new QueueDeclareConfiguration( - RabbitMqEventBusOptions.ClientName, + AbpRabbitMqEventBusOptions.ClientName, durable: true, exclusive: false, autoDelete: false ), - RabbitMqEventBusOptions.ConnectionName + AbpRabbitMqEventBusOptions.ConnectionName ); Consumer.OnMessageReceived(ProcessEventAsync); - SubscribeHandlers(DistributedEventBusOptions.Handlers); + SubscribeHandlers(AbpDistributedEventBusOptions.Handlers); } private async Task ProcessEventAsync(IModel channel, BasicDeliverEventArgs ea) @@ -171,10 +171,10 @@ namespace Volo.Abp.EventBus.RabbitMq var eventName = EventNameAttribute.GetNameOrDefault(eventType); var body = Serializer.Serialize(eventData); - using (var channel = ConnectionPool.Get(RabbitMqEventBusOptions.ConnectionName).CreateModel()) + using (var channel = ConnectionPool.Get(AbpRabbitMqEventBusOptions.ConnectionName).CreateModel()) { channel.ExchangeDeclare( - RabbitMqEventBusOptions.ExchangeName, + AbpRabbitMqEventBusOptions.ExchangeName, "direct", durable: true ); @@ -183,7 +183,7 @@ namespace Volo.Abp.EventBus.RabbitMq properties.DeliveryMode = RabbitMqConsts.DeliveryModes.Persistent; channel.BasicPublish( - exchange: RabbitMqEventBusOptions.ExchangeName, + exchange: AbpRabbitMqEventBusOptions.ExchangeName, routingKey: eventName, mandatory: true, basicProperties: properties, diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs index 3729b48b61..c5a5022f77 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs @@ -32,12 +32,12 @@ namespace Volo.Abp.EventBus } }); - services.Configure(options => + services.Configure(options => { options.Handlers.AddIfNotContains(localHandlers); }); - services.Configure(options => + services.Configure(options => { options.Handlers.AddIfNotContains(distributedHandlers); }); diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusOptions.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/AbpDistributedEventBusOptions.cs similarity index 77% rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusOptions.cs rename to framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/AbpDistributedEventBusOptions.cs index 045efe9d02..1d1d7768f2 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/AbpDistributedEventBusOptions.cs @@ -2,12 +2,12 @@ using Volo.Abp.Collections; namespace Volo.Abp.EventBus.Distributed { - public class DistributedEventBusOptions + public class AbpDistributedEventBusOptions { public ITypeList Handlers { get; } public EtoMappingDictionary EtoMappings { get; set; } - public DistributedEventBusOptions() + public AbpDistributedEventBusOptions() { Handlers = new TypeList(); EtoMappings = new EtoMappingDictionary(); diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus.cs index a50cdc2d70..0d0ea6b107 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus.cs @@ -17,16 +17,16 @@ namespace Volo.Abp.EventBus.Distributed protected IServiceScopeFactory ServiceScopeFactory { get; } - protected DistributedEventBusOptions DistributedEventBusOptions { get; } + protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } public LocalDistributedEventBus( ILocalEventBus localEventBus, IServiceScopeFactory serviceScopeFactory, - IOptions distributedEventBusOptions) + IOptions distributedEventBusOptions) { _localEventBus = localEventBus; ServiceScopeFactory = serviceScopeFactory; - DistributedEventBusOptions = distributedEventBusOptions.Value; + AbpDistributedEventBusOptions = distributedEventBusOptions.Value; Subscribe(distributedEventBusOptions.Value.Handlers); } diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBusOptions.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/AbpLocalEventBusOptions.cs similarity index 71% rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBusOptions.cs rename to framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/AbpLocalEventBusOptions.cs index 24606a119a..2d47a2bcce 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/AbpLocalEventBusOptions.cs @@ -2,11 +2,11 @@ using Volo.Abp.Collections; namespace Volo.Abp.EventBus.Local { - public class LocalEventBusOptions + public class AbpLocalEventBusOptions { public ITypeList Handlers { get; } - public LocalEventBusOptions() + public AbpLocalEventBusOptions() { Handlers = new TypeList(); } diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs index 775e89a6fa..7db5c18f01 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs @@ -23,12 +23,12 @@ namespace Volo.Abp.EventBus.Local /// public ILogger Logger { get; set; } - protected LocalEventBusOptions Options { get; } + protected AbpLocalEventBusOptions Options { get; } protected ConcurrentDictionary> HandlerFactories { get; } public LocalEventBus( - IOptions options, + IOptions options, IServiceScopeFactory serviceScopeFactory) : base(serviceScopeFactory) { diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureOptions.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeatureOptions.cs similarity index 85% rename from framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureOptions.cs rename to framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeatureOptions.cs index f988acf34c..e0526832fb 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureOptions.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeatureOptions.cs @@ -2,13 +2,13 @@ namespace Volo.Abp.Features { - public class FeatureOptions + public class AbpFeatureOptions { public ITypeList DefinitionProviders { get; } public ITypeList ValueProviders { get; } - public FeatureOptions() + public AbpFeatureOptions() { DefinitionProviders = new TypeList(); ValueProviders = new TypeList(); diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeaturesModule.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeaturesModule.cs index e66dd03010..f30017feed 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeaturesModule.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeaturesModule.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.Features public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.Configure(options => + context.Services.Configure(options => { options.ValueProviders.Add(); options.ValueProviders.Add(); @@ -43,7 +43,7 @@ namespace Volo.Abp.Features } }); - services.Configure(options => + services.Configure(options => { options.DefinitionProviders.AddIfNotContains(definitionProviders); }); diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueSettingValueProvider.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueSettingValueProvider.cs index 275be89af2..48b01f0299 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueSettingValueProvider.cs @@ -4,7 +4,7 @@ namespace Volo.Abp.Features { public class DefaultValueFeatureValueProvider : FeatureValueProvider //TODO: Directly implement IFeatureValueProvider { - public const string ProviderName = "Default"; + public const string ProviderName = "D"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs index ef22197f8a..ee6150d403 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/EditionFeatureValueProvider.cs @@ -6,7 +6,7 @@ namespace Volo.Abp.Features { public class EditionFeatureValueProvider : FeatureValueProvider { - public const string ProviderName = "Edition"; + public const string ProviderName = "E"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs index bc9f8565ed..0c653c3448 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureChecker.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.Features { public class FeatureChecker : FeatureCheckerBase { - protected FeatureOptions Options { get; } + protected AbpFeatureOptions Options { get; } protected IServiceProvider ServiceProvider { get; } protected IFeatureDefinitionManager FeatureDefinitionManager { get; } protected List Providers => _providers.Value; @@ -17,7 +17,7 @@ namespace Volo.Abp.Features private readonly Lazy> _providers; public FeatureChecker( - IOptions options, + IOptions options, IServiceProvider serviceProvider, IFeatureDefinitionManager featureDefinitionManager) { diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinitionManager.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinitionManager.cs index 84b9088a3d..f8e8d9e9fe 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinitionManager.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinitionManager.cs @@ -16,12 +16,12 @@ namespace Volo.Abp.Features protected IDictionary FeatureDefinitions => _lazyFeatureDefinitions.Value; private readonly Lazy> _lazyFeatureDefinitions; - protected FeatureOptions Options { get; } + protected AbpFeatureOptions Options { get; } private readonly IServiceScopeFactory _serviceScopeFactory; public FeatureDefinitionManager( - IOptions options, + IOptions options, IServiceScopeFactory serviceScopeFactory) { _serviceScopeFactory = serviceScopeFactory; diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs index 211174516c..d403acb993 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/TenantFeatureValueProvider.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.Features { public class TenantFeatureValueProvider : FeatureValueProvider { - public const string ProviderName = "Tenant"; + public const string ProviderName = "T"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj index f92af19e56..ffd81d0789 100644 --- a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj +++ b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGeneratorOptions.cs b/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/AbpSequentialGuidGeneratorOptions.cs similarity index 76% rename from framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGeneratorOptions.cs rename to framework/src/Volo.Abp.Guids/Volo/Abp/Guids/AbpSequentialGuidGeneratorOptions.cs index 913a7a059b..c712f8084b 100644 --- a/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGeneratorOptions.cs +++ b/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/AbpSequentialGuidGeneratorOptions.cs @@ -1,13 +1,13 @@ namespace Volo.Abp.Guids { - public class SequentialGuidGeneratorOptions + public class AbpSequentialGuidGeneratorOptions { /// /// Default value: . /// public SequentialGuidType DefaultSequentialGuidType { get; set; } - public SequentialGuidGeneratorOptions() + public AbpSequentialGuidGeneratorOptions() { DefaultSequentialGuidType = SequentialGuidType.SequentialAtEnd; } diff --git a/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs b/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs index 32fde2ce9c..331ed066a4 100644 --- a/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs +++ b/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs @@ -9,15 +9,15 @@ namespace Volo.Abp.Guids /// /// Implements by creating sequential Guids. - /// Use to configure. + /// Use to configure. /// public class SequentialGuidGenerator : IGuidGenerator, ITransientDependency { - public SequentialGuidGeneratorOptions Options { get; } + public AbpSequentialGuidGeneratorOptions Options { get; } private static readonly RandomNumberGenerator RandomNumberGenerator = RandomNumberGenerator.Create(); - public SequentialGuidGenerator(IOptions options) + public SequentialGuidGenerator(IOptions options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/Modeling/ApiDescriptionModelOptions.cs b/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/Modeling/AbpApiDescriptionModelOptions.cs similarity index 84% rename from framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/Modeling/ApiDescriptionModelOptions.cs rename to framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/Modeling/AbpApiDescriptionModelOptions.cs index 7170995c42..2ed733a008 100644 --- a/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/Modeling/ApiDescriptionModelOptions.cs +++ b/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/Modeling/AbpApiDescriptionModelOptions.cs @@ -5,11 +5,11 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Http.Modeling { - public class ApiDescriptionModelOptions + public class AbpApiDescriptionModelOptions { public HashSet IgnoredInterfaces { get; } - public ApiDescriptionModelOptions() + public AbpApiDescriptionModelOptions() { IgnoredInterfaces = new HashSet { diff --git a/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs b/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs index 21212ee16a..b716a9cd9e 100644 --- a/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs +++ b/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs @@ -24,7 +24,7 @@ namespace Microsoft.Extensions.DependencyInjection /// The assembly containing the service interfaces /// /// The name of the remote service configuration to be used by the HTTP Client proxies. - /// See . + /// See . /// /// /// True, to register the HTTP client proxy as the default implementation for the services. @@ -63,7 +63,7 @@ namespace Microsoft.Extensions.DependencyInjection /// Service collection /// /// The name of the remote service configuration to be used by the HTTP Client proxy. - /// See . + /// See . /// /// /// True, to register the HTTP client proxy as the default implementation for the service . @@ -87,7 +87,7 @@ namespace Microsoft.Extensions.DependencyInjection /// Type of the service /// /// The name of the remote service configuration to be used by the HTTP Client proxy. - /// See . + /// See . /// /// /// True, to register the HTTP client proxy as the default implementation for the service . diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs index 234a560e83..f2a7540956 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.Http.Client public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - Configure(configuration); + Configure(configuration); } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceOptions.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs similarity index 73% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceOptions.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs index a873973329..ef431543ef 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/RemoteServiceOptions.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteServiceOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.Http.Client { - public class RemoteServiceOptions + public class AbpRemoteServiceOptions { public RemoteServiceConfigurationDictionary RemoteServices { get; set; } - public RemoteServiceOptions() + public AbpRemoteServiceOptions() { RemoteServices = new RemoteServiceConfigurationDictionary(); } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs index 8e8e2a6492..d2b57d32ef 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs @@ -31,10 +31,10 @@ namespace Volo.Abp.Http.Client.DynamicProxying protected ICancellationTokenProvider CancellationTokenProvider { get; } protected ICorrelationIdProvider CorrelationIdProvider { get; } protected ICurrentTenant CurrentTenant { get; } - protected CorrelationIdOptions CorrelationIdOptions { get; } + protected AbpCorrelationIdOptions AbpCorrelationIdOptions { get; } protected IDynamicProxyHttpClientFactory HttpClientFactory { get; } protected IApiDescriptionFinder ApiDescriptionFinder { get; } - protected RemoteServiceOptions RemoteServiceOptions { get; } + protected AbpRemoteServiceOptions AbpRemoteServiceOptions { get; } protected AbpHttpClientOptions ClientOptions { get; } protected IJsonSerializer JsonSerializer { get; } protected IRemoteServiceHttpClientAuthenticator ClientAuthenticator { get; } @@ -51,25 +51,25 @@ namespace Volo.Abp.Http.Client.DynamicProxying public DynamicHttpProxyInterceptor( IDynamicProxyHttpClientFactory httpClientFactory, IOptions clientOptions, - IOptionsSnapshot remoteServiceOptions, + IOptionsSnapshot remoteServiceOptions, IApiDescriptionFinder apiDescriptionFinder, IJsonSerializer jsonSerializer, IRemoteServiceHttpClientAuthenticator clientAuthenticator, ICancellationTokenProvider cancellationTokenProvider, ICorrelationIdProvider correlationIdProvider, - IOptions correlationIdOptions, + IOptions correlationIdOptions, ICurrentTenant currentTenant) { CancellationTokenProvider = cancellationTokenProvider; CorrelationIdProvider = correlationIdProvider; CurrentTenant = currentTenant; - CorrelationIdOptions = correlationIdOptions.Value; + AbpCorrelationIdOptions = correlationIdOptions.Value; HttpClientFactory = httpClientFactory; ApiDescriptionFinder = apiDescriptionFinder; JsonSerializer = jsonSerializer; ClientAuthenticator = clientAuthenticator; ClientOptions = clientOptions.Value; - RemoteServiceOptions = remoteServiceOptions.Value; + AbpRemoteServiceOptions = remoteServiceOptions.Value; Logger = NullLogger>.Instance; } @@ -129,7 +129,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying private async Task MakeRequestAsync(IAbpMethodInvocation invocation) { var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); - var remoteServiceConfig = RemoteServiceOptions.RemoteServices.GetConfigurationOrDefault(clientConfig.RemoteServiceName); + var remoteServiceConfig = AbpRemoteServiceOptions.RemoteServices.GetConfigurationOrDefault(clientConfig.RemoteServiceName); var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); @@ -215,12 +215,12 @@ namespace Volo.Abp.Http.Client.DynamicProxying } //CorrelationId - requestMessage.Headers.Add(CorrelationIdOptions.HttpHeaderName, CorrelationIdProvider.Get()); + requestMessage.Headers.Add(AbpCorrelationIdOptions.HttpHeaderName, CorrelationIdProvider.Get()); //TenantId if (CurrentTenant.Id.HasValue) { - //TODO: Use AspNetCoreMultiTenancyOptions to get the key + //TODO: Use AbpAspNetCoreMultiTenancyOptions to get the key requestMessage.Headers.Add(TenantResolverConsts.DefaultTenantKey, CurrentTenant.Id.Value.ToString()); } @@ -241,8 +241,8 @@ namespace Volo.Abp.Http.Client.DynamicProxying var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); - return RemoteServiceOptions.RemoteServices.GetOrDefault(clientConfig.RemoteServiceName)?.Version - ?? RemoteServiceOptions.RemoteServices.Default?.Version; + return AbpRemoteServiceOptions.RemoteServices.GetOrDefault(clientConfig.RemoteServiceName)?.Version + ?? AbpRemoteServiceOptions.RemoteServices.Default?.Version; } private async Task ThrowExceptionForResponseAsync(HttpResponseMessage response) diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientOptions.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs similarity index 72% rename from framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientOptions.cs rename to framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs index f05d5c8511..0e877ee441 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientOptions.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.IdentityModel { - public class IdentityClientOptions + public class AbpIdentityClientOptions { public IdentityClientConfigurationDictionary IdentityClients { get; set; } - public IdentityClientOptions() + public AbpIdentityClientOptions() { IdentityClients = new IdentityClientConfigurationDictionary(); } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs index b8578ca95d..b26b545fec 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityModelModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.IdentityModel { var configuration = context.Services.GetConfiguration(); - Configure(configuration); + Configure(configuration); } } } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs index 681b65bcd9..ca6e41d60d 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs @@ -19,11 +19,11 @@ namespace Volo.Abp.IdentityModel public class IdentityModelAuthenticationService : IIdentityModelAuthenticationService, ITransientDependency { public ILogger Logger { get; set; } - protected IdentityClientOptions ClientOptions { get; } + protected AbpIdentityClientOptions ClientOptions { get; } protected ICancellationTokenProvider CancellationTokenProvider { get; } public IdentityModelAuthenticationService( - IOptions options, + IOptions options, ICancellationTokenProvider cancellationTokenProvider) { CancellationTokenProvider = cancellationTokenProvider; diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapModule.cs b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapModule.cs index 22b9ca7a76..b35e1b1d59 100644 --- a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapModule.cs +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Ldap public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - Configure(configuration.GetSection("LDAP")); + Configure(configuration.GetSection("LDAP")); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapOptions.cs b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapOptions.cs similarity index 87% rename from framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapOptions.cs rename to framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapOptions.cs index 7e4aacfa0e..671d623ff7 100644 --- a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapOptions.cs +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.Ldap { - public class LdapOptions + public class AbpLdapOptions { public string ServerHost { get; set; } @@ -16,7 +16,7 @@ public LdapCredentials Credentials { get; set; } - public LdapOptions() + public AbpLdapOptions() { Credentials = new LdapCredentials(); } diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs index 615b22d70e..d54e7d82d0 100644 --- a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Ldap public class LdapManager : ILdapManager, ITransientDependency { private readonly string _searchBase; - private readonly LdapOptions _ldapOptions; + private readonly AbpLdapOptions _ldapOptions; private readonly string[] _attributes = { @@ -21,7 +21,7 @@ namespace Volo.Abp.Ldap "sAMAccountName", "userPrincipalName", "telephoneNumber", "mail" }; - public LdapManager(IOptions ldapSettingsOptions) + public LdapManager(IOptions ldapSettingsOptions) { _ldapOptions = ldapSettingsOptions.Value; _searchBase = _ldapOptions.SearchBase; diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs index 23de1929d6..60df66feec 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationModule.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.Localization { AbpStringLocalizerFactory.Replace(context.Services); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp", "Volo/Abp"); }); diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ExceptionHandling/ExceptionLocalizationOptions.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ExceptionHandling/AbpExceptionLocalizationOptions.cs similarity index 82% rename from framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ExceptionHandling/ExceptionLocalizationOptions.cs rename to framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ExceptionHandling/AbpExceptionLocalizationOptions.cs index 1105b7146c..9fd7f5dd62 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ExceptionHandling/ExceptionLocalizationOptions.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ExceptionHandling/AbpExceptionLocalizationOptions.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; namespace Volo.Abp.Localization.ExceptionHandling { - public class ExceptionLocalizationOptions + public class AbpExceptionLocalizationOptions { public Dictionary ErrorCodeNamespaceMappings { get; } - public ExceptionLocalizationOptions() + public AbpExceptionLocalizationOptions() { ErrorCodeNamespaceMappings = new Dictionary(); } diff --git a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj index 90a5fdafcc..118e60d31c 100644 --- a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj +++ b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.MemoryDb/Microsoft/Extensions/DependencyInjection/AbpMemoryDbServiceCollectionExtensions.cs b/framework/src/Volo.Abp.MemoryDb/Microsoft/Extensions/DependencyInjection/AbpMemoryDbServiceCollectionExtensions.cs index 621f20ed25..3cab95cb03 100644 --- a/framework/src/Volo.Abp.MemoryDb/Microsoft/Extensions/DependencyInjection/AbpMemoryDbServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.MemoryDb/Microsoft/Extensions/DependencyInjection/AbpMemoryDbServiceCollectionExtensions.cs @@ -7,10 +7,10 @@ namespace Microsoft.Extensions.DependencyInjection { public static class AbpMemoryDbServiceCollectionExtensions { - public static IServiceCollection AddMemoryDbContext(this IServiceCollection services, Action optionsBuilder = null) + public static IServiceCollection AddMemoryDbContext(this IServiceCollection services, Action optionsBuilder = null) where TMemoryDbContext : MemoryDbContext { - var options = new MemoryDbContextRegistrationOptions(typeof(TMemoryDbContext), services); + var options = new AbpMemoryDbContextRegistrationOptions(typeof(TMemoryDbContext), services); optionsBuilder?.Invoke(options); if (options.DefaultRepositoryDbContextType != typeof(TMemoryDbContext)) diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/AbpMemoryDbContextRegistrationOptions.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/AbpMemoryDbContextRegistrationOptions.cs new file mode 100644 index 0000000000..6e22d1d845 --- /dev/null +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/AbpMemoryDbContextRegistrationOptions.cs @@ -0,0 +1,14 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.MemoryDb.DependencyInjection +{ + public class AbpMemoryDbContextRegistrationOptions : AbpCommonDbContextRegistrationOptions, IAbpMemoryDbContextRegistrationOptionsBuilder + { + public AbpMemoryDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) + : base(originalDbContextType, services) + { + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/IAbpMemoryDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/IAbpMemoryDbContextRegistrationOptionsBuilder.cs new file mode 100644 index 0000000000..1c74c24dba --- /dev/null +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/IAbpMemoryDbContextRegistrationOptionsBuilder.cs @@ -0,0 +1,9 @@ +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.MemoryDb.DependencyInjection +{ + public interface IAbpMemoryDbContextRegistrationOptionsBuilder : IAbpCommonDbContextRegistrationOptionsBuilder + { + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/IMemoryDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/IMemoryDbContextRegistrationOptionsBuilder.cs deleted file mode 100644 index 27081fe83c..0000000000 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/IMemoryDbContextRegistrationOptionsBuilder.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.MemoryDb.DependencyInjection -{ - public interface IMemoryDbContextRegistrationOptionsBuilder : ICommonDbContextRegistrationOptionsBuilder - { - - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbContextRegistrationOptions.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbContextRegistrationOptions.cs deleted file mode 100644 index d3380ffc41..0000000000 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbContextRegistrationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.MemoryDb.DependencyInjection -{ - public class MemoryDbContextRegistrationOptions : CommonDbContextRegistrationOptions, IMemoryDbContextRegistrationOptionsBuilder - { - public MemoryDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) - : base(originalDbContextType, services) - { - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs index fa238a780d..824415017f 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs @@ -5,9 +5,9 @@ using Volo.Abp.Domain.Repositories.MemoryDb; namespace Volo.Abp.MemoryDb.DependencyInjection { - public class MemoryDbRepositoryRegistrar : RepositoryRegistrarBase + public class MemoryDbRepositoryRegistrar : RepositoryRegistrarBase { - public MemoryDbRepositoryRegistrar(MemoryDbContextRegistrationOptions options) + public MemoryDbRepositoryRegistrar(AbpMemoryDbContextRegistrationOptions options) : base(options) { } diff --git a/framework/src/Volo.Abp.MongoDB/Microsoft/Extensions/DependencyInjection/AbpMongoDbServiceCollectionExtensions.cs b/framework/src/Volo.Abp.MongoDB/Microsoft/Extensions/DependencyInjection/AbpMongoDbServiceCollectionExtensions.cs index f498fd5e1d..1ad31d2de9 100644 --- a/framework/src/Volo.Abp.MongoDB/Microsoft/Extensions/DependencyInjection/AbpMongoDbServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.MongoDB/Microsoft/Extensions/DependencyInjection/AbpMongoDbServiceCollectionExtensions.cs @@ -7,10 +7,10 @@ namespace Microsoft.Extensions.DependencyInjection { public static class AbpMongoDbServiceCollectionExtensions { - public static IServiceCollection AddMongoDbContext(this IServiceCollection services, Action optionsBuilder = null) //Created overload instead of default parameter + public static IServiceCollection AddMongoDbContext(this IServiceCollection services, Action optionsBuilder = null) //Created overload instead of default parameter where TMongoDbContext : AbpMongoDbContext { - var options = new MongoDbContextRegistrationOptions(typeof(TMongoDbContext), services); + var options = new AbpMongoDbContextRegistrationOptions(typeof(TMongoDbContext), services); optionsBuilder?.Invoke(options); foreach (var dbContextType in options.ReplacedDbContextTypes) diff --git a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj index b15ea6378c..9f07fb9346 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj +++ b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoModelBuilderConfigurationOptions.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoModelBuilderConfigurationOptions.cs similarity index 79% rename from framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoModelBuilderConfigurationOptions.cs rename to framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoModelBuilderConfigurationOptions.cs index 85fd1c8802..b959e0c239 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoModelBuilderConfigurationOptions.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoModelBuilderConfigurationOptions.cs @@ -2,7 +2,7 @@ using JetBrains.Annotations; namespace Volo.Abp.MongoDB { - public class MongoModelBuilderConfigurationOptions + public class AbpMongoModelBuilderConfigurationOptions { [NotNull] public string CollectionPrefix @@ -16,7 +16,7 @@ namespace Volo.Abp.MongoDB } private string _collectionPrefix; - public MongoModelBuilderConfigurationOptions([NotNull] string collectionPrefix = "") + public AbpMongoModelBuilderConfigurationOptions([NotNull] string collectionPrefix = "") { Check.NotNull(collectionPrefix, nameof(collectionPrefix)); diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/AbpMongoDbContextRegistrationOptions.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/AbpMongoDbContextRegistrationOptions.cs new file mode 100644 index 0000000000..42f2f74e4e --- /dev/null +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/AbpMongoDbContextRegistrationOptions.cs @@ -0,0 +1,14 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.MongoDB.DependencyInjection +{ + public class AbpMongoDbContextRegistrationOptions : AbpCommonDbContextRegistrationOptions, IAbpMongoDbContextRegistrationOptionsBuilder + { + public AbpMongoDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) + : base(originalDbContextType, services) + { + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/IAbpMongoDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/IAbpMongoDbContextRegistrationOptionsBuilder.cs new file mode 100644 index 0000000000..5600d47b7f --- /dev/null +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/IAbpMongoDbContextRegistrationOptionsBuilder.cs @@ -0,0 +1,9 @@ +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.MongoDB.DependencyInjection +{ + public interface IAbpMongoDbContextRegistrationOptionsBuilder : IAbpCommonDbContextRegistrationOptionsBuilder + { + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/IMongoDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/IMongoDbContextRegistrationOptionsBuilder.cs deleted file mode 100644 index 6504639862..0000000000 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/IMongoDbContextRegistrationOptionsBuilder.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.MongoDB.DependencyInjection -{ - public interface IMongoDbContextRegistrationOptionsBuilder : ICommonDbContextRegistrationOptionsBuilder - { - - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbContextRegistrationOptions.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbContextRegistrationOptions.cs deleted file mode 100644 index bc748e12e9..0000000000 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbContextRegistrationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.MongoDB.DependencyInjection -{ - public class MongoDbContextRegistrationOptions : CommonDbContextRegistrationOptions, IMongoDbContextRegistrationOptionsBuilder - { - public MongoDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) - : base(originalDbContextType, services) - { - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs index 096be11ce7..8fdddf4cf2 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs @@ -5,9 +5,9 @@ using Volo.Abp.Domain.Repositories.MongoDB; namespace Volo.Abp.MongoDB.DependencyInjection { - public class MongoDbRepositoryRegistrar : RepositoryRegistrarBase + public class MongoDbRepositoryRegistrar : RepositoryRegistrarBase { - public MongoDbRepositoryRegistrar(MongoDbContextRegistrationOptions options) + public MongoDbRepositoryRegistrar(AbpMongoDbContextRegistrationOptions options) : base(options) { diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs index 75d5631658..9dc64ef7f8 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.MultiTenancy public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - Configure(configuration); + Configure(configuration); } } } diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptions.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyOptions.cs similarity index 92% rename from framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptions.cs rename to framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyOptions.cs index 2ac3e6a2fa..5db8513da3 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptions.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyOptions.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.MultiTenancy { - public class MultiTenancyOptions + public class AbpMultiTenancyOptions { /// /// A central point to enable/disable multi-tenancy. diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolveOptions.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpTenantResolveOptions.cs similarity index 81% rename from framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolveOptions.cs rename to framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpTenantResolveOptions.cs index b431aaa6d3..66ca66a0b0 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolveOptions.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpTenantResolveOptions.cs @@ -3,12 +3,12 @@ using JetBrains.Annotations; namespace Volo.Abp.MultiTenancy { - public class TenantResolveOptions + public class AbpTenantResolveOptions { [NotNull] public List TenantResolvers { get; } - public TenantResolveOptions() + public AbpTenantResolveOptions() { TenantResolvers = new List { diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStoreOptions.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/AbpDefaultTenantStoreOptions.cs similarity index 68% rename from framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStoreOptions.cs rename to framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/AbpDefaultTenantStoreOptions.cs index ee775cce98..72027efa62 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStoreOptions.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/AbpDefaultTenantStoreOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.MultiTenancy.ConfigurationStore { - public class DefaultTenantStoreOptions + public class AbpDefaultTenantStoreOptions { public TenantConfiguration[] Tenants { get; set; } - public DefaultTenantStoreOptions() + public AbpDefaultTenantStoreOptions() { Tenants = new TenantConfiguration[0]; } diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStore.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStore.cs index edecf22b65..ebdbe2a280 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStore.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ConfigurationStore/DefaultTenantStore.cs @@ -9,9 +9,9 @@ namespace Volo.Abp.MultiTenancy.ConfigurationStore [Dependency(TryRegister = true)] public class DefaultTenantStore : ITenantStore, ITransientDependency { - private readonly DefaultTenantStoreOptions _options; + private readonly AbpDefaultTenantStoreOptions _options; - public DefaultTenantStore(IOptionsSnapshot options) + public DefaultTenantStore(IOptionsSnapshot options) { _options = options.Value; } diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs index fe061d0b8d..d92409fe0d 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.MultiTenancy private readonly IServiceProvider _serviceProvider; public MultiTenantConnectionStringResolver( - IOptionsSnapshot options, + IOptionsSnapshot options, ICurrentTenant currentTenant, IServiceProvider serviceProvider) : base(options) diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolver.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolver.cs index cefaf41329..202ab4c293 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolver.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantResolver.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.MultiTenancy public class TenantResolver : ITenantResolver, ITransientDependency { private readonly IServiceProvider _serviceProvider; - private readonly TenantResolveOptions _options; + private readonly AbpTenantResolveOptions _options; - public TenantResolver(IOptions options, IServiceProvider serviceProvider) + public TenantResolver(IOptions options, IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; _options = options.Value; diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj index 7194a29ee3..2f268c964b 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/AbpStringEncryptionOptions.cs similarity index 94% rename from framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs rename to framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/AbpStringEncryptionOptions.cs index 67eae167c3..ee3599074d 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/AbpStringEncryptionOptions.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.Security.Encryption /// /// Options used by . /// - public class StringEncryptionOptions + public class AbpStringEncryptionOptions { /// /// This constant is used to determine the keysize of the encryption algorithm. @@ -33,7 +33,7 @@ namespace Volo.Abp.Security.Encryption /// public byte[] DefaultSalt { get; set; } - public StringEncryptionOptions() + public AbpStringEncryptionOptions() { Keysize = 256; DefaultPassPhrase = "gsKnGZ041HLL4IM8"; diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/IStringEncryptionService.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/IStringEncryptionService.cs index bad4e33251..f94edf736a 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/IStringEncryptionService.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/IStringEncryptionService.cs @@ -4,7 +4,7 @@ namespace Volo.Abp.Security.Encryption { /// /// Can be used to simply encrypt/decrypt texts. - /// Use to configure default values. + /// Use to configure default values. /// public interface IStringEncryptionService { diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionService.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionService.cs index 1d235d1d84..57543a8b75 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionService.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionService.cs @@ -12,9 +12,9 @@ namespace Volo.Abp.Security.Encryption /// public class StringEncryptionService : IStringEncryptionService, ITransientDependency { - protected StringEncryptionOptions Options { get; } + protected AbpStringEncryptionOptions Options { get; } - public StringEncryptionService(IOptions options) + public StringEncryptionService(IOptions options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingOptions.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingOptions.cs similarity index 85% rename from framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingOptions.cs rename to framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingOptions.cs index d916f1a95d..194a608c3f 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingOptions.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingOptions.cs @@ -2,13 +2,13 @@ namespace Volo.Abp.Settings { - public class SettingOptions + public class AbpSettingOptions { public ITypeList DefinitionProviders { get; } public ITypeList ValueProviders { get; } - public SettingOptions() + public AbpSettingOptions() { DefinitionProviders = new TypeList(); ValueProviders = new TypeList(); diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingsModule.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingsModule.cs index 5f7f6ce7f5..48a85dd7d9 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingsModule.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingsModule.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Settings public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.ValueProviders.Add(); options.ValueProviders.Add(); @@ -43,7 +43,7 @@ namespace Volo.Abp.Settings } }); - services.Configure(options => + services.Configure(options => { options.DefinitionProviders.AddIfNotContains(definitionProviders); }); diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/DefaultValueSettingValueProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/DefaultValueSettingValueProvider.cs index f6e1229cee..201e4f26c4 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/DefaultValueSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/DefaultValueSettingValueProvider.cs @@ -4,7 +4,7 @@ namespace Volo.Abp.Settings { public class DefaultValueSettingValueProvider : SettingValueProvider { - public const string ProviderName = "Default"; + public const string ProviderName = "D"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/GlobalSettingValueProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/GlobalSettingValueProvider.cs index c8d2e38542..1a69a4ba90 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/GlobalSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/GlobalSettingValueProvider.cs @@ -4,7 +4,7 @@ namespace Volo.Abp.Settings { public class GlobalSettingValueProvider : SettingValueProvider { - public const string ProviderName = "Global"; + public const string ProviderName = "G"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinitionManager.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinitionManager.cs index 387ea77d05..649d07f641 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinitionManager.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinitionManager.cs @@ -12,12 +12,12 @@ namespace Volo.Abp.Settings { protected Lazy> SettingDefinitions { get; } - protected SettingOptions Options { get; } + protected AbpSettingOptions Options { get; } protected IServiceProvider ServiceProvider { get; } public SettingDefinitionManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingValueProviderManager.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingValueProviderManager.cs index ce10a20a31..4b8c0ddca3 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingValueProviderManager.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingValueProviderManager.cs @@ -10,12 +10,12 @@ namespace Volo.Abp.Settings public class SettingValueProviderManager : ISettingValueProviderManager, ISingletonDependency { public List Providers => _lazyProviders.Value; - protected SettingOptions Options { get; } + protected AbpSettingOptions Options { get; } private readonly Lazy> _lazyProviders; public SettingValueProviderManager( IServiceProvider serviceProvider, - IOptions options) + IOptions options) { Options = options.Value; diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs index 7d8177a8e9..eab23b7258 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/TenantSettingValueProvider.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.Settings { public class TenantSettingValueProvider : SettingValueProvider { - public const string ProviderName = "Tenant"; + public const string ProviderName = "T"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs index 4a98dcee62..01125f3201 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/UserSettingValueProvider.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.Settings { public class UserSettingValueProvider : SettingValueProvider { - public const string ProviderName = "User"; + public const string ProviderName = "U"; public override string Name => ProviderName; diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/ClockOptions.cs b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/AbpClockOptions.cs similarity index 80% rename from framework/src/Volo.Abp.Timing/Volo/Abp/Timing/ClockOptions.cs rename to framework/src/Volo.Abp.Timing/Volo/Abp/Timing/AbpClockOptions.cs index 529f048857..ba7f35df9f 100644 --- a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/ClockOptions.cs +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/AbpClockOptions.cs @@ -2,14 +2,14 @@ using System; namespace Volo.Abp.Timing { - public class ClockOptions + public class AbpClockOptions { /// /// Default: /// public DateTimeKind Kind { get; set; } - public ClockOptions() + public AbpClockOptions() { Kind = DateTimeKind.Unspecified; } diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Clock.cs b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Clock.cs index 55bfbdc284..8e535a52c7 100644 --- a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Clock.cs +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Clock.cs @@ -6,9 +6,9 @@ namespace Volo.Abp.Timing { public class Clock : IClock, ITransientDependency { - protected ClockOptions Options { get; } + protected AbpClockOptions Options { get; } - public Clock(IOptions options) + public Clock(IOptions options) { Options = options.Value; } diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/NavigationOptions.cs b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpNavigationOptions.cs similarity index 78% rename from framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/NavigationOptions.cs rename to framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpNavigationOptions.cs index 2237add732..75c2d426d9 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/NavigationOptions.cs +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpNavigationOptions.cs @@ -3,12 +3,12 @@ using JetBrains.Annotations; namespace Volo.Abp.UI.Navigation { - public class NavigationOptions + public class AbpNavigationOptions { [NotNull] public List MenuContributors { get; } - public NavigationOptions() + public AbpNavigationOptions() { MenuContributors = new List(); } diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpUiNavigationModule.cs b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpUiNavigationModule.cs index 261bd7fe8c..47889336a8 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpUiNavigationModule.cs +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpUiNavigationModule.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.UI.Navigation { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -23,7 +23,7 @@ namespace Volo.Abp.UI.Navigation .AddVirtualJson("/Volo/Abp/Ui/Navigation/Localization/Resource"); }); - Configure(options => + Configure(options => { options.MenuContributors.Add(new DefaultMenuContributor()); }); diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs index 9c96006b02..5c33866aa2 100644 --- a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs @@ -9,11 +9,11 @@ namespace Volo.Abp.UI.Navigation { public class MenuManager : IMenuManager, ITransientDependency { - protected NavigationOptions Options { get; } + protected AbpNavigationOptions Options { get; } protected IHybridServiceScopeFactory ServiceScopeFactory { get; } public MenuManager( - IOptions options, + IOptions options, IHybridServiceScopeFactory serviceScopeFactory) { ServiceScopeFactory = serviceScopeFactory; diff --git a/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs b/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs index 0a9206c309..90a9aa45f6 100644 --- a/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs +++ b/framework/src/Volo.Abp.UI/Volo/Abp/Ui/AbpUiModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.UI { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkDefaultOptions.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/AbpUnitOfWorkDefaultOptions.cs similarity index 91% rename from framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkDefaultOptions.cs rename to framework/src/Volo.Abp.Uow/Volo/Abp/Uow/AbpUnitOfWorkDefaultOptions.cs index 49ff633a5e..789e4f8e58 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkDefaultOptions.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/AbpUnitOfWorkDefaultOptions.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.Uow /// /// Global (default) unit of work options /// - public class UnitOfWorkDefaultOptions + public class AbpUnitOfWorkDefaultOptions { public UnitOfWorkTransactionBehavior TransactionBehavior { get; set; } @@ -16,7 +16,7 @@ namespace Volo.Abp.Uow public TimeSpan? Timeout { get; set; } - internal UnitOfWorkOptions Normalize(UnitOfWorkOptions options) + internal AbpUnitOfWorkOptions Normalize(AbpUnitOfWorkOptions options) { if (options.IsolationLevel == null) { diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkOptions.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/AbpUnitOfWorkOptions.cs similarity index 76% rename from framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkOptions.cs rename to framework/src/Volo.Abp.Uow/Volo/Abp/Uow/AbpUnitOfWorkOptions.cs index 3d433f3738..dd39612921 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkOptions.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/AbpUnitOfWorkOptions.cs @@ -3,7 +3,7 @@ using System.Data; namespace Volo.Abp.Uow { - public class UnitOfWorkOptions : IUnitOfWorkOptions + public class AbpUnitOfWorkOptions : IAbpUnitOfWorkOptions { /// /// Default: false. @@ -14,9 +14,9 @@ namespace Volo.Abp.Uow public TimeSpan? Timeout { get; set; } - public UnitOfWorkOptions Clone() + public AbpUnitOfWorkOptions Clone() { - return new UnitOfWorkOptions + return new AbpUnitOfWorkOptions { IsTransactional = IsTransactional, IsolationLevel = IsolationLevel, diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/ChildUnitOfWork.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/ChildUnitOfWork.cs index 508fb1db4f..0d2686cdfe 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/ChildUnitOfWork.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/ChildUnitOfWork.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.Uow { public Guid Id => _parent.Id; - public IUnitOfWorkOptions Options => _parent.Options; + public IAbpUnitOfWorkOptions Options => _parent.Options; public IUnitOfWork Outer => _parent.Outer; @@ -43,7 +43,7 @@ namespace Volo.Abp.Uow _parent.SetOuter(outer); } - public void Initialize(UnitOfWorkOptions options) + public void Initialize(AbpUnitOfWorkOptions options) { _parent.Initialize(options); } diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkOptions.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IAbpUnitOfWorkOptions.cs similarity index 81% rename from framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkOptions.cs rename to framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IAbpUnitOfWorkOptions.cs index b79b7112b8..1f63a12b6d 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkOptions.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IAbpUnitOfWorkOptions.cs @@ -3,7 +3,7 @@ using System.Data; namespace Volo.Abp.Uow { - public interface IUnitOfWorkOptions + public interface IAbpUnitOfWorkOptions { bool IsTransactional { get; } diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWork.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWork.cs index cdf1a505b8..cf65ca69e7 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWork.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWork.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.Uow event EventHandler Disposed; - IUnitOfWorkOptions Options { get; } + IAbpUnitOfWorkOptions Options { get; } IUnitOfWork Outer { get; } @@ -28,7 +28,7 @@ namespace Volo.Abp.Uow void SetOuter([CanBeNull] IUnitOfWork outer); - void Initialize([NotNull] UnitOfWorkOptions options); + void Initialize([NotNull] AbpUnitOfWorkOptions options); void Reserve([NotNull] string reservationName); diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkManager.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkManager.cs index 264390fbbe..b997cb6970 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkManager.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkManager.cs @@ -8,13 +8,13 @@ namespace Volo.Abp.Uow IUnitOfWork Current { get; } [NotNull] - IUnitOfWork Begin([NotNull] UnitOfWorkOptions options, bool requiresNew = false); + IUnitOfWork Begin([NotNull] AbpUnitOfWorkOptions options, bool requiresNew = false); [NotNull] IUnitOfWork Reserve([NotNull] string reservationName, bool requiresNew = false); - void BeginReserved([NotNull] string reservationName, [NotNull] UnitOfWorkOptions options); + void BeginReserved([NotNull] string reservationName, [NotNull] AbpUnitOfWorkOptions options); - bool TryBeginReserved([NotNull] string reservationName, [NotNull] UnitOfWorkOptions options); + bool TryBeginReserved([NotNull] string reservationName, [NotNull] AbpUnitOfWorkOptions options); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs index 0270e04d50..5b857e8828 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.Uow { public Guid Id { get; } = Guid.NewGuid(); - public IUnitOfWorkOptions Options { get; private set; } + public IAbpUnitOfWorkOptions Options { get; private set; } public IUnitOfWork Outer { get; private set; } @@ -34,13 +34,13 @@ namespace Volo.Abp.Uow private readonly Dictionary _databaseApis; private readonly Dictionary _transactionApis; - private readonly UnitOfWorkDefaultOptions _defaultOptions; + private readonly AbpUnitOfWorkDefaultOptions _defaultOptions; private Exception _exception; private bool _isCompleting; private bool _isRolledback; - public UnitOfWork(IServiceProvider serviceProvider, IOptions options) + public UnitOfWork(IServiceProvider serviceProvider, IOptions options) { ServiceProvider = serviceProvider; _defaultOptions = options.Value; @@ -49,7 +49,7 @@ namespace Volo.Abp.Uow _transactionApis = new Dictionary(); } - public virtual void Initialize(UnitOfWorkOptions options) + public virtual void Initialize(AbpUnitOfWorkOptions options) { Check.NotNull(options, nameof(options)); diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkAttribute.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkAttribute.cs index 26a7ca51f4..2dee2cd390 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkAttribute.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkAttribute.cs @@ -62,7 +62,7 @@ namespace Volo.Abp.Uow //TODO: More constructors! - public virtual void SetOptions(UnitOfWorkOptions options) + public virtual void SetOptions(AbpUnitOfWorkOptions options) { if (IsTransactional.HasValue) { diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs index 12a6f0e101..1ca6681189 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.Uow public class UnitOfWorkInterceptor : AbpInterceptor, ITransientDependency { private readonly IUnitOfWorkManager _unitOfWorkManager; - private readonly UnitOfWorkDefaultOptions _defaultOptions; + private readonly AbpUnitOfWorkDefaultOptions _defaultOptions; - public UnitOfWorkInterceptor(IUnitOfWorkManager unitOfWorkManager, IOptions options) + public UnitOfWorkInterceptor(IUnitOfWorkManager unitOfWorkManager, IOptions options) { _unitOfWorkManager = unitOfWorkManager; _defaultOptions = options.Value; @@ -48,9 +48,9 @@ namespace Volo.Abp.Uow } } - private UnitOfWorkOptions CreateOptions(IAbpMethodInvocation invocation, [CanBeNull] UnitOfWorkAttribute unitOfWorkAttribute) + private AbpUnitOfWorkOptions CreateOptions(IAbpMethodInvocation invocation, [CanBeNull] UnitOfWorkAttribute unitOfWorkAttribute) { - var options = new UnitOfWorkOptions(); + var options = new AbpUnitOfWorkOptions(); unitOfWorkAttribute?.SetOptions(options); diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs index 73f9956876..479cf45117 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManager.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Uow _serviceScopeFactory = serviceScopeFactory; } - public IUnitOfWork Begin(UnitOfWorkOptions options, bool requiresNew = false) + public IUnitOfWork Begin(AbpUnitOfWorkOptions options, bool requiresNew = false) { Check.NotNull(options, nameof(options)); @@ -52,7 +52,7 @@ namespace Volo.Abp.Uow return unitOfWork; } - public void BeginReserved(string reservationName, UnitOfWorkOptions options) + public void BeginReserved(string reservationName, AbpUnitOfWorkOptions options) { if (!TryBeginReserved(reservationName, options)) { @@ -60,7 +60,7 @@ namespace Volo.Abp.Uow } } - public bool TryBeginReserved(string reservationName, UnitOfWorkOptions options) + public bool TryBeginReserved(string reservationName, AbpUnitOfWorkOptions options) { Check.NotNull(reservationName, nameof(reservationName)); diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManagerExtensions.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManagerExtensions.cs index c9f888f275..bf8859d6ac 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManagerExtensions.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkManagerExtensions.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.Uow { Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager)); - return unitOfWorkManager.Begin(new UnitOfWorkOptions(), requiresNew); + return unitOfWorkManager.Begin(new AbpUnitOfWorkOptions(), requiresNew); } public static void BeginReserved([NotNull] this IUnitOfWorkManager unitOfWorkManager, [NotNull] string reservationName) @@ -17,7 +17,7 @@ namespace Volo.Abp.Uow Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager)); Check.NotNull(reservationName, nameof(reservationName)); - unitOfWorkManager.BeginReserved(reservationName, new UnitOfWorkOptions()); + unitOfWorkManager.BeginReserved(reservationName, new AbpUnitOfWorkOptions()); } public static void TryBeginReserved([NotNull] this IUnitOfWorkManager unitOfWorkManager, [NotNull] string reservationName) @@ -25,7 +25,7 @@ namespace Volo.Abp.Uow Check.NotNull(unitOfWorkManager, nameof(unitOfWorkManager)); Check.NotNull(reservationName, nameof(reservationName)); - unitOfWorkManager.TryBeginReserved(reservationName, new UnitOfWorkOptions()); + unitOfWorkManager.TryBeginReserved(reservationName, new AbpUnitOfWorkOptions()); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs index b7ef822669..584f787a6e 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs @@ -96,7 +96,13 @@ namespace Volo.Abp.Validation parameterInfo.IsOut || TypeHelper.IsPrimitiveExtended(parameterInfo.ParameterType, includeEnums: true); - context.Errors.AddRange(_objectValidator.GetErrors(parameterValue, parameterInfo.Name, allowNulls)); + context.Errors.AddRange( + _objectValidator.GetErrors( + parameterValue, + parameterInfo.Name, + allowNulls + ) + ); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ObjectValidator.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ObjectValidator.cs index 8ff3998f7e..784c211061 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ObjectValidator.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ObjectValidator.cs @@ -56,7 +56,8 @@ namespace Volo.Abp.Validation { foreach (var contributorType in Options.ObjectValidationContributors) { - var contributor = (IObjectValidationContributor) scope.ServiceProvider.GetRequiredService(contributorType); + var contributor = (IObjectValidationContributor) + scope.ServiceProvider.GetRequiredService(contributorType); contributor.AddErrors(context); } } diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs index 594a19535e..ed8c107005 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/ValidationInterceptor.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using Volo.Abp.Aspects; using Volo.Abp.DependencyInjection; using Volo.Abp.DynamicProxy; @@ -16,27 +15,13 @@ namespace Volo.Abp.Validation public override void Intercept(IAbpMethodInvocation invocation) { - if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.Validation)) - { - invocation.Proceed(); - return; - } - Validate(invocation); - invocation.Proceed(); } public override async Task InterceptAsync(IAbpMethodInvocation invocation) { - if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.Validation)) - { - await invocation.ProceedAsync(); - return; - } - Validate(invocation); - await invocation.ProceedAsync(); } diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileSystemOptions.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemOptions.cs similarity index 65% rename from framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileSystemOptions.cs rename to framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemOptions.cs index 205d1a57c8..c4a4d203d2 100644 --- a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileSystemOptions.cs +++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/AbpVirtualFileSystemOptions.cs @@ -1,10 +1,10 @@ namespace Volo.Abp.VirtualFileSystem { - public class VirtualFileSystemOptions + public class AbpVirtualFileSystemOptions { public VirtualFileSetList FileSets { get; } - public VirtualFileSystemOptions() + public AbpVirtualFileSystemOptions() { FileSets = new VirtualFileSetList(); } diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs index be08fc2024..5f90ef7925 100644 --- a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs +++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs @@ -11,10 +11,10 @@ namespace Volo.Abp.VirtualFileSystem public class VirtualFileProvider : IVirtualFileProvider, ISingletonDependency { private readonly IFileProvider _hybridFileProvider; - private readonly VirtualFileSystemOptions _options; + private readonly AbpVirtualFileSystemOptions _options; public VirtualFileProvider( - IOptions options, + IOptions options, IDynamicFileProvider dynamicFileProvider) { _options = options.Value; @@ -60,10 +60,10 @@ namespace Volo.Abp.VirtualFileSystem { protected override IDictionary Files => _files.Value; - private readonly VirtualFileSystemOptions _options; + private readonly AbpVirtualFileSystemOptions _options; private readonly Lazy> _files; - public InternalVirtualFileProvider(VirtualFileSystemOptions options) + public InternalVirtualFileProvider(AbpVirtualFileSystemOptions options) { _options = options; _files = new Lazy>( diff --git a/framework/test/AbpTestBase/AbpTestBase.csproj b/framework/test/AbpTestBase/AbpTestBase.csproj index c6d5b71672..6547230b39 100644 --- a/framework/test/AbpTestBase/AbpTestBase.csproj +++ b/framework/test/AbpTestBase/AbpTestBase.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/SimpleConsoleDemo/Program.cs b/framework/test/SimpleConsoleDemo/Program.cs index 08c6371bfb..82e6d0a660 100644 --- a/framework/test/SimpleConsoleDemo/Program.cs +++ b/framework/test/SimpleConsoleDemo/Program.cs @@ -1,4 +1,6 @@ using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Volo.Abp; using Volo.Abp.DependencyInjection; @@ -8,16 +10,31 @@ namespace SimpleConsoleDemo { class Program { - static void Main(string[] args) + static async Task Main(string[] args) { using (var application = AbpApplicationFactory.Create(options => { - + options.Configuration.CommandLineArgs = args; + options.UseAutofac(); })) { + Console.WriteLine("Initializing the application..."); application.Initialize(); + Console.WriteLine("Initializing the application... OK"); - Console.WriteLine("ABP initialized... Press ENTER to exit!"); + Console.WriteLine("Checking configuration..."); + + var configuration = application.ServiceProvider.GetRequiredService(); + if (configuration["AppSettingKey1"] != "AppSettingValue1") + { + Console.WriteLine("ERROR: Could not read the configuration!"); + Console.WriteLine("Press ENTER to exit!"); + Console.ReadLine(); + return; + } + + Console.WriteLine(); + Console.WriteLine("Checking configuration... OK"); var writers = application.ServiceProvider.GetServices(); foreach (var writer in writers) @@ -25,6 +42,9 @@ namespace SimpleConsoleDemo writer.Write(); } + + Console.WriteLine(); + Console.WriteLine("Press ENTER to exit!"); Console.ReadLine(); } } diff --git a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj index 371e2374f9..6138532877 100644 --- a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj +++ b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj @@ -1,4 +1,4 @@ - + Exe @@ -6,7 +6,23 @@ - + + + + + + PreserveNewest + true + PreserveNewest + + + + + + + + + diff --git a/framework/test/SimpleConsoleDemo/appsettings.json b/framework/test/SimpleConsoleDemo/appsettings.json new file mode 100644 index 0000000000..8a16cf34c3 --- /dev/null +++ b/framework/test/SimpleConsoleDemo/appsettings.json @@ -0,0 +1,3 @@ +{ + "AppSettingKey1": "AppSettingValue1" +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj index d1eadf276d..e7f6b3b985 100644 --- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj index 61d430d984..c997e76b13 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs index 93543c3025..44e2e38380 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/AppModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.App { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsEnabled = true; }); diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs index c107444ba1..e2ac111f5d 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Shouldly; using Volo.Abp.MultiTenancy; @@ -16,18 +17,18 @@ namespace Volo.Abp.AspNetCore.MultiTenancy private readonly Guid _testTenantId = Guid.NewGuid(); private readonly string _testTenantName = "acme"; - private readonly AspNetCoreMultiTenancyOptions _options; + private readonly AbpAspNetCoreMultiTenancyOptions _options; public AspNetCoreMultiTenancy_WithDomainResolver_Tests() { - _options = ServiceProvider.GetRequiredService>().Value; + _options = ServiceProvider.GetRequiredService>().Value; } - protected override IWebHostBuilder CreateWebHostBuilder() + protected override IHostBuilder CreateHostBuilder() { - return base.CreateWebHostBuilder().ConfigureServices(services => + return base.CreateHostBuilder().ConfigureServices(services => { - services.Configure(options => + services.Configure(options => { options.Tenants = new[] { @@ -35,7 +36,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy }; }); - services.Configure(options => + services.Configure(options => { options.AddDomainTenantResolver("{0}.abp.io"); }); diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs index 98a7e92ef1..37365089af 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Microsoft.Net.Http.Headers; using Shouldly; @@ -17,18 +18,18 @@ namespace Volo.Abp.AspNetCore.MultiTenancy private readonly Guid _testTenantId = Guid.NewGuid(); private readonly string _testTenantName = "acme"; - private readonly AspNetCoreMultiTenancyOptions _options; + private readonly AbpAspNetCoreMultiTenancyOptions _options; public AspNetCoreMultiTenancy_Without_DomainResolver_Tests() { - _options = ServiceProvider.GetRequiredService>().Value; + _options = ServiceProvider.GetRequiredService>().Value; } - protected override IWebHostBuilder CreateWebHostBuilder() + protected override IHostBuilder CreateHostBuilder() { - return base.CreateWebHostBuilder().ConfigureServices(services => + return base.CreateHostBuilder().ConfigureServices(services => { - services.Configure(options => + services.Configure(options => { options.Tenants = new[] { diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj index 93143bfbe0..56499edf0a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj @@ -20,7 +20,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs index 28b5ee8b1f..97055d1e9a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs @@ -56,7 +56,7 @@ namespace Volo.Abp.AspNetCore.Mvc }); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AspNetCoreMvcTestBase.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AspNetCoreMvcTestBase.cs index cde2871e1b..e3bfa36ae6 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AspNetCoreMvcTestBase.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AspNetCoreMvcTestBase.cs @@ -1,12 +1,13 @@ using System.IO; using System.Linq; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; namespace Volo.Abp.AspNetCore.Mvc { public abstract class AspNetCoreMvcTestBase : AbpAspNetCoreTestBase { - protected override IWebHostBuilder CreateWebHostBuilder() + protected override IHostBuilder CreateHostBuilder() { var contentRootPath = CalculateContentRootPath( "Volo.Abp.AspNetCore.Mvc.Tests.csproj", @@ -16,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc ) ); - return base.CreateWebHostBuilder() + return base.CreateHostBuilder() .UseContentRoot(contentRootPath); } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs index 508ac04ce2..3e365cde3e 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Shouldly; using Volo.Abp.Json; using Xunit; @@ -9,7 +10,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json { public class JsonResultController_Tests : AspNetCoreMvcTestBase { - protected override void ConfigureServices(WebHostBuilderContext context, IServiceCollection services) + protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services) { services.Configure(options => { diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonSerializer_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonSerializer_Tests.cs index f621a8733a..d911850919 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonSerializer_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonSerializer_Tests.cs @@ -1,6 +1,7 @@ using System; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Shouldly; using Volo.Abp.Json; using Xunit; @@ -16,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json _jsonSerializer = ServiceProvider.GetRequiredService(); } - protected override void ConfigureServices(WebHostBuilderContext context, IServiceCollection services) + protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services) { services.Configure(options => { diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs index 9ae46be82f..b7079c7686 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs @@ -8,14 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/TestUnitOfWork.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/TestUnitOfWork.cs index a00cf2fcf8..079120e8d3 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/TestUnitOfWork.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/TestUnitOfWork.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow { private readonly TestUnitOfWorkConfig _config; - public TestUnitOfWork(IServiceProvider serviceProvider, IOptions options, TestUnitOfWorkConfig config) + public TestUnitOfWork(IServiceProvider serviceProvider, IOptions options, TestUnitOfWorkConfig config) : base(serviceProvider, options) { _config = config; diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj index 7b58c9c738..e0f67c68eb 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs index 9ced6317ec..15473df986 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs @@ -2,14 +2,15 @@ using System.IO; using System.Linq; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo { public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreTestBase { - protected override IWebHostBuilder CreateWebHostBuilder() + protected override IHostBuilder CreateHostBuilder() { - return base.CreateWebHostBuilder() + return base.CreateHostBuilder() .UseContentRoot(CalculateContentRootPath()); } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs index 3a140e35d4..3e39ba0f36 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs @@ -8,14 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo { public class TestStartup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs index 0941475418..fd9b64308f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo try { Log.Information("Starting web host."); - BuildWebHostInternal(args).Build().Run(); + CreateHostBuilder(args).Build().Run(); return 0; } catch (Exception ex) @@ -35,20 +35,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo } } - //internal static IWebHost BuildWebHostInternal(string[] args) => - // new WebHostBuilder() - // .UseKestrel() - // .UseContentRoot(Directory.GetCurrentDirectory()) - // .UseIISIntegration() - // .UseStartup() - // .UseSerilog() - // .Build(); - internal static IHostBuilder BuildWebHostInternal(string[] args) => + internal static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs index 0497fe5216..086c20c365 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs @@ -9,12 +9,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo { public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - //return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj index 455708a1d2..0675a67f58 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj index b63efadfda..2936cfb847 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs index 124a103da2..8cc84075a4 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs @@ -8,15 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - //TODO: This is needed because ASP.NET Core does not use IServiceProviderFactory! - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj index 8d954b0b2a..27b0913457 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs index 99a155f3b7..b06a90bcfa 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs @@ -57,7 +57,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning context.Services.AddHttpClientProxies(typeof(AbpAspNetCoreMvcVersioningTestModule).Assembly); - Configure(options => + Configure(options => { options.RemoteServices.Default = new RemoteServiceConfiguration("/"); }); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs index 79985de769..5092f91a81 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs @@ -8,15 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - //TODO: This is needed because ASP.NET Core does not use IServiceProviderFactory! - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj index 061e1640ce..f00a809174 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj @@ -25,7 +25,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs index fafd5794a6..d54d392cde 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.AspNetCore { var hostingEnvironment = context.Services.GetHostingEnvironment(); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); //options.FileSets.ReplaceEmbeddedByPhysical(FindProjectPath(hostingEnvironment)); diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs index 7f95713274..de4f55dc47 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs @@ -8,14 +8,9 @@ namespace Volo.Abp.AspNetCore { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj index ee1e2441a6..1dbc542b85 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj index 817533079b..9e3aaa958b 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj index d8e2e5ec2b..5a70b9c23a 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj index 96088ec3e4..ff48454a8b 100644 --- a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj +++ b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj index f8a27d020b..758a6187ea 100644 --- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj +++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj index 1c4818159b..b4ebdbc8bb 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/AbpCachingTestModule.cs b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/AbpCachingTestModule.cs index 0f790a03a3..be003431f2 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/AbpCachingTestModule.cs +++ b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/AbpCachingTestModule.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.Caching { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(option => + Configure(option => { option.CacheConfigurators.Add(cacheName => { diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs index 711e1e0bce..adb0b01bfc 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs +++ b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_ConfigureOptions_Test.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.Caching public class DistributedCache_ConfigureOptions_Test : AbpIntegratedTest { [Fact] - public void Configure_CacheOptions() + public void Configure_AbpCacheOptions() { var personCache = GetRequiredService>(); GetDefaultCachingOptions(personCache).SlidingExpiration.ShouldBeNull(); @@ -18,7 +18,7 @@ namespace Volo.Abp.Caching } [Fact] - public async Task Default_CacheOptions_Should_Be_20_Mins() + public async Task Default_AbpCacheOptions_Should_Be_20_Mins() { var personCache = GetRequiredService>(); diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs index fc6b443893..927448463a 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs +++ b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/DistributedCache_Tests.cs @@ -122,5 +122,192 @@ namespace Volo.Abp.Caching cacheItem1.ShouldNotBeNull(); } + + [Fact] + public async Task Should_Set_Get_And_Remove_Cache_Items_With_Integer_Type_CacheKey() + { + var personCache = GetRequiredService>(); + + var cacheKey = 42; + const string personName = "john nash"; + + //Get (not exists yet) + var cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldBeNull(); + + //Set + cacheItem = new PersonCacheItem(personName); + await personCache.SetAsync(cacheKey, cacheItem); + + //Get (it should be available now + cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldNotBeNull(); + cacheItem.Name.ShouldBe(personName); + + //Remove + await personCache.RemoveAsync(cacheKey); + + //Get (not exists since removed) + cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldBeNull(); + } + + [Fact] + public async Task GetOrAddAsync_With_Integer_Type_CacheKey() + { + var personCache = GetRequiredService>(); + + var cacheKey = 42; + const string personName = "john nash"; + + //Will execute the factory method to create the cache item + + bool factoryExecuted = false; + + var cacheItem = await personCache.GetOrAddAsync(cacheKey, + async () => + { + factoryExecuted = true; + return new PersonCacheItem(personName); + }); + + factoryExecuted.ShouldBeTrue(); + cacheItem.Name.ShouldBe(personName); + + //This time, it will not execute the factory + + factoryExecuted = false; + + cacheItem = await personCache.GetOrAddAsync(cacheKey, + async () => + { + factoryExecuted = true; + return new PersonCacheItem(personName); + }); + + factoryExecuted.ShouldBeFalse(); + cacheItem.Name.ShouldBe(personName); + } + + [Fact] + public async Task SameClassName_But_DiffNamespace_Should_Not_Use_Same_Cache_With_Integer_CacheKey() + { + var personCache = GetRequiredService>(); + var otherPersonCache = GetRequiredService>(); + + + var cacheKey = 42; + const string personName = "john nash"; + + //Get (not exists yet) + var cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldBeNull(); + + var cacheItem1 = await otherPersonCache.GetAsync(cacheKey); + cacheItem1.ShouldBeNull(); + + //Set + cacheItem = new PersonCacheItem(personName); + await personCache.SetAsync(cacheKey, cacheItem); + + //Get (it should be available now, but otherPersonCache not exists now. + cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldNotBeNull(); + cacheItem.Name.ShouldBe(personName); + + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); + cacheItem1.ShouldBeNull(); + + //set other person cache + cacheItem1 = new Sail.Testing.Caching.PersonCacheItem(personName); + await otherPersonCache.SetAsync(cacheKey, cacheItem1); + + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); + cacheItem1.ShouldNotBeNull(); + cacheItem1.Name.ShouldBe(personName); + + //Remove + await personCache.RemoveAsync(cacheKey); + + + //Get (not exists since removed) + cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldBeNull(); + + cacheItem1 = await otherPersonCache.GetAsync(cacheKey); + cacheItem1.ShouldNotBeNull(); + + } + + [Fact] + public async Task Should_Set_Get_And_Remove_Cache_Items_With_Object_Type_CacheKey() + { + var personCache = GetRequiredService>(); + + var cacheKey = new ComplexObjectAsCacheKey { Name = "DummyData", Age = 42 }; + const string personName = "john nash"; + + //Get (not exists yet) + var cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldBeNull(); + + //Set + cacheItem = new PersonCacheItem(personName); + await personCache.SetAsync(cacheKey, cacheItem); + + //Get (it should be available now + cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldNotBeNull(); + cacheItem.Name.ShouldBe(personName); + + //Remove + await personCache.RemoveAsync(cacheKey); + + //Get (not exists since removed) + cacheItem = await personCache.GetAsync(cacheKey); + cacheItem.ShouldBeNull(); + } + + [Fact] + public async Task Should_Set_Get_And_Remove_Cache_Items_For_Same_Object_Type_With_Different_CacheKeys() + { + var personCache = GetRequiredService>(); + + var cache1Key = new ComplexObjectAsCacheKey { Name = "John", Age = 42 }; + var cache2Key = new ComplexObjectAsCacheKey { Name = "Jenny", Age = 24 }; + const string personName = "john nash"; + + //Get (not exists yet) + var cacheItem1 = await personCache.GetAsync(cache1Key); + var cacheItem2 = await personCache.GetAsync(cache2Key); + cacheItem1.ShouldBeNull(); + cacheItem2.ShouldBeNull(); + + //Set + cacheItem1 = new PersonCacheItem(personName); + cacheItem2 = new PersonCacheItem(personName); + await personCache.SetAsync(cache1Key, cacheItem1); + await personCache.SetAsync(cache2Key, cacheItem2); + + //Get (it should be available now + cacheItem1 = await personCache.GetAsync(cache1Key); + cacheItem1.ShouldNotBeNull(); + cacheItem1.Name.ShouldBe(personName); + + cacheItem2 = await personCache.GetAsync(cache2Key); + cacheItem2.ShouldNotBeNull(); + cacheItem2.Name.ShouldBe(personName); + + //Remove + await personCache.RemoveAsync(cache1Key); + await personCache.RemoveAsync(cache2Key); + + //Get (not exists since removed) + cacheItem1 = await personCache.GetAsync(cache1Key); + cacheItem1.ShouldBeNull(); + cacheItem2 = await personCache.GetAsync(cache2Key); + cacheItem2.ShouldBeNull(); + } + } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/PersonCacheItem.cs b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/PersonCacheItem.cs index b6c6f1dd0a..7ea37ffd26 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/PersonCacheItem.cs +++ b/framework/test/Volo.Abp.Caching.Tests/Volo/Abp/Caching/PersonCacheItem.cs @@ -1,5 +1,6 @@ using System; - +using System.Linq; + namespace Volo.Abp.Caching { [Serializable] @@ -17,7 +18,33 @@ namespace Volo.Abp.Caching Name = name; } } + + public class ComplexObjectAsCacheKey + { + public string Name { get; set; } + public int Age { get; set; } + + public override string ToString() + { + // Return selective fields + //return $"{Name}_{Age}"; + // Return all the fields concatenated + var sb = new System.Text.StringBuilder(); + var properties = this.GetType().GetProperties() + .Where(prop => prop.CanRead && prop.CanWrite); + foreach (var prop in properties) + { + var value = prop.GetValue(this, null); + if (value != null) + { + sb.Append(value.ToString()); + } + } + return sb.ToString(); + } + } } + namespace Sail.Testing.Caching { [Serializable] diff --git a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj index 97988f8b3f..7be716ebcc 100644 --- a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj index ba75eb73ca..257818f611 100644 --- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj index 0812895ae0..d0e9f58e54 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Configuration/ConfigurationAccessor_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Configuration/ConfigurationAccessor_Tests.cs index a69af199ff..3cb08d3924 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Configuration/ConfigurationAccessor_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Configuration/ConfigurationAccessor_Tests.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.Configuration using (var application = AbpApplicationFactory.Create()) { var myConfiguration = new ConfigurationBuilder().Build(); - application.Services.SetConfiguration(myConfiguration); + application.Services.ReplaceConfiguration(myConfiguration); application.Services.GetConfiguration().ShouldBe(myConfiguration); application.Initialize(); @@ -41,12 +41,11 @@ namespace Volo.Abp.Configuration } } - private static IConfigurationRoot ResolveConfiguration(IAbpApplication application) + private static IConfiguration ResolveConfiguration(IAbpApplication application) { return application .ServiceProvider - .GetRequiredService() - .Configuration; + .GetRequiredService(); } } } diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj index 31f56a6144..b4fd6fcae5 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs index 3b5a7a4dd3..28734c1fd0 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.Dapper.Repositories var unitOfWorkManager = GetRequiredService(); var personDapperRepository = GetRequiredService(); - using (var uow = unitOfWorkManager.Begin(new UnitOfWorkOptions + using (var uow = unitOfWorkManager.Begin(new AbpUnitOfWorkOptions { IsTransactional = true })) diff --git a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj index 65b50126bd..36a3199bf6 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj +++ b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs b/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs index 82a00d8edc..4f4dabf36a 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs +++ b/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs @@ -42,7 +42,7 @@ namespace Volo.Abp.Data { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.ConnectionStrings.Default = DefaultConnString; options.ConnectionStrings[Database1Name] = Database1ConnString; diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj index 1ed24ead80..af8fbd8e37 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs index 24f14ddf6e..820a62892e 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs @@ -187,9 +187,9 @@ namespace Volo.Abp.Domain.Repositories services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); } - public class MyTestRepositoryRegistrar : RepositoryRegistrarBase + public class MyTestRepositoryRegistrar : RepositoryRegistrarBase { - public MyTestRepositoryRegistrar(CommonDbContextRegistrationOptions options) + public MyTestRepositoryRegistrar(AbpCommonDbContextRegistrationOptions options) : base(options) { } @@ -331,7 +331,7 @@ namespace Volo.Abp.Domain.Repositories } - public class TestDbContextRegistrationOptions : CommonDbContextRegistrationOptions + public class TestDbContextRegistrationOptions : AbpCommonDbContextRegistrationOptions { public TestDbContextRegistrationOptions(Type originalDbContextType, IServiceCollection services) : base(originalDbContextType, services) diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj index bc1296cbc8..38198cf1bd 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs index 2746da3847..e4cdfe0556 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.Emailing { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj index b79bfa3b4e..38b82aca84 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs index 613c42894c..7d89da1a08 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions try { - await WithUnitOfWorkAsync(new UnitOfWorkOptions { IsTransactional = true }, async () => + await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () => { await _personRepository.InsertAsync(new Person(personId, "Adam", 42)); throw new Exception(exceptionMessage); @@ -52,7 +52,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions { var personId = Guid.NewGuid(); - await WithUnitOfWorkAsync(new UnitOfWorkOptions { IsTransactional = true }, async () => + await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () => { _unitOfWorkManager.Current.ShouldNotBeNull(); @@ -75,7 +75,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions { var uowManager = scope.ServiceProvider.GetRequiredService(); - using (uowManager.Begin(new UnitOfWorkOptions { IsTransactional = true })) + using (uowManager.Begin(new AbpUnitOfWorkOptions { IsTransactional = true })) { _unitOfWorkManager.Current.ShouldNotBeNull(); diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj index a58e10af2d..21c743d4e9 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj index d7b28568f3..f9c04ed5c4 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj +++ b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj index e3e95e182b..cdcb8b0b25 100644 --- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj +++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj index a4bcae448b..7e84f08807 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs index 2835c086b8..9b2a28ad3e 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.Http context.Services.AddHttpClientProxies(typeof(TestAppModule).Assembly); context.Services.AddHttpClientProxy(); - Configure(options => + Configure(options => { options.RemoteServices.Default = new RemoteServiceConfiguration("/"); }); diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs index 4704128d9d..c9ac8ba611 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs @@ -6,15 +6,9 @@ namespace Volo.Abp.Http { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - //TODO: This is needed because ASP.NET Core does not use IServiceProviderFactory! - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app) diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj index 6f16b2499e..086aba2bc6 100644 --- a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/Authenticate_Tests.cs b/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/Authenticate_Tests.cs index 35f631b8d2..c59dc0d9e1 100644 --- a/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/Authenticate_Tests.cs +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/Authenticate_Tests.cs @@ -57,7 +57,7 @@ namespace Volo.Abp.Ldap // "ServerPort": 636, // "UseSSL": true // } - Configure(settings => + Configure(settings => { settings.ServerHost = "192.168.101.54"; settings.ServerPort = 636; diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapManager_Tests.cs b/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapManager_Tests.cs index 00d9287c4f..01906c8f18 100644 --- a/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapManager_Tests.cs +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapManager_Tests.cs @@ -227,7 +227,7 @@ namespace Volo.Abp.Ldap // "DomainName": "yourdomain.com.cn", // "DomainDistinguishedName": "DC=yourdomain,DC=com,DC=cn" // } - Configure(settings => + Configure(settings => { settings.ServerHost = "192.168.101.54"; settings.ServerPort = 636; diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj index 68cc2bdb83..c380bfaafe 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj +++ b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs index 309e317997..eab7a580c5 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs @@ -225,7 +225,7 @@ namespace Volo.Abp.Localization { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs index 9b2366119b..3ba7a2937b 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TemplateLocalizer_Tests.cs @@ -45,7 +45,7 @@ namespace Volo.Abp.Localization { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj index 11a2ac7673..df995f0bd1 100644 --- a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj +++ b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj index e7d0eec2fc..2301d45fcf 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj @@ -12,7 +12,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs index c7f5d38bbe..7e5d9fcb6b 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/AbpMemoryDbTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.MemoryDb { var connStr = Guid.NewGuid().ToString(); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connStr; }); diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj index bbad58f4fa..65dace823e 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj @@ -15,8 +15,8 @@ - - + + \ No newline at end of file diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs index 383fea8a91..86620366b3 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj index 17ce3073c5..2d870fdc1d 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs index 20f926f212..a6e5fab1c8 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs @@ -25,13 +25,13 @@ namespace Volo.Abp.Data.MultiTenancy protected override void BeforeAddApplication(IServiceCollection services) { - services.Configure(options => + services.Configure(options => { options.ConnectionStrings.Default = "default-value"; options.ConnectionStrings["db1"] = "db1-default-value"; }); - services.Configure(options => + services.Configure(options => { options.Tenants = new[] { diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/MultiTenancy/CurrentTenant_Tests.cs b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/MultiTenancy/CurrentTenant_Tests.cs index 4bd1c6bad3..0790a54c65 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/MultiTenancy/CurrentTenant_Tests.cs +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/MultiTenancy/CurrentTenant_Tests.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.MultiTenancy protected override void BeforeAddApplication(IServiceCollection services) { - services.Configure(options => + services.Configure(options => { options.Tenants = new[] { diff --git a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj index 7af0ec54b6..b4153300f6 100644 --- a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj +++ b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj index 1534cb28f4..6af4ddbac9 100644 --- a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj +++ b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj index 65bb49d57a..3831500779 100644 --- a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj +++ b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj index ef91443b2a..8c460d0b74 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj +++ b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/AbpSettingsTestModule.cs b/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/AbpSettingsTestModule.cs index 09a50daa5d..0ada68f0e4 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/AbpSettingsTestModule.cs +++ b/framework/test/Volo.Abp.Settings.Tests/Volo/Abp/Settings/AbpSettingsTestModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Settings { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.ValueProviders.Add(); }); diff --git a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj index 0594067fa5..9dc2245b22 100644 --- a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj +++ b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj index 90dbb56a8e..19d8be4d2e 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj index d72d42e48a..f1c2b2107f 100644 --- a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj +++ b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestAppModule.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestAppModule.cs index aea5013fef..b9aef1ca2e 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestAppModule.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestAppModule.cs @@ -44,7 +44,7 @@ namespace Volo.Abp.TestApp private void ConfigureDistributedEventBus() { - Configure(options => + Configure(options => { options.EtoMappings.Add(); }); diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs index 0f4af6666a..647e5eaa03 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/TestAppTestBase.cs @@ -18,10 +18,10 @@ namespace Volo.Abp.TestApp.Testing protected virtual void WithUnitOfWork(Action action) { - WithUnitOfWork(new UnitOfWorkOptions(), action); + WithUnitOfWork(new AbpUnitOfWorkOptions(), action); } - protected virtual void WithUnitOfWork(UnitOfWorkOptions options, Action action) + protected virtual void WithUnitOfWork(AbpUnitOfWorkOptions options, Action action) { using (var scope = ServiceProvider.CreateScope()) { @@ -38,10 +38,10 @@ namespace Volo.Abp.TestApp.Testing protected virtual Task WithUnitOfWorkAsync(Func func) { - return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); } - protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func action) + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) { using (var scope = ServiceProvider.CreateScope()) { @@ -58,10 +58,10 @@ namespace Volo.Abp.TestApp.Testing protected virtual TResult WithUnitOfWork(Func func) { - return WithUnitOfWork(new UnitOfWorkOptions(), func); + return WithUnitOfWork(new AbpUnitOfWorkOptions(), func); } - protected virtual TResult WithUnitOfWork(UnitOfWorkOptions options, Func func) + protected virtual TResult WithUnitOfWork(AbpUnitOfWorkOptions options, Func func) { using (var scope = ServiceProvider.CreateScope()) { @@ -78,10 +78,10 @@ namespace Volo.Abp.TestApp.Testing protected virtual Task WithUnitOfWorkAsync(Func> func) { - return WithUnitOfWorkAsync(new UnitOfWorkOptions(), func); + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); } - protected virtual async Task WithUnitOfWorkAsync(UnitOfWorkOptions options, Func> func) + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) { using (var scope = ServiceProvider.CreateScope()) { diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj index 7937d99580..4ef9291f5e 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs index 3361dc72ba..5fed48c828 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.UI.Navigation { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.MenuContributors.Add(new TestMenuContributor1()); options.MenuContributors.Add(new TestMenuContributor2()); diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj index 6ec5ddac26..827c34823d 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj +++ b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj index b1f30e3ea5..1c18850d00 100644 --- a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj +++ b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj index 440525bc9e..f54dff4005 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs index e376d24aa0..e6464f6bd4 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs @@ -51,7 +51,7 @@ namespace Volo.Abp.VirtualFileSystem { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.VirtualFileSystem.MyResources"); }); diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs index ad5cb15296..1d3ced4cdb 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/AbpAccountApplicationContractsModule.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Account { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -28,7 +28,7 @@ namespace Volo.Abp.Account .AddVirtualJson("/Volo/Abp/Account/Localization/Resources"); }); - Configure(options => + Configure(options => { options.MapCodeNamespace("Volo.Account", typeof(AccountResource)); }); diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs index 601ce9a3d3..1f2004ae7e 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Account { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/AbpAccountWebIdentityServerModule.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/AbpAccountWebIdentityServerModule.cs index 27e508fcb8..5260554ab5 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/AbpAccountWebIdentityServerModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/AbpAccountWebIdentityServerModule.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.Account.Web public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.Account.Web"); }); diff --git a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs index a3b494a264..6df4e43c07 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -35,17 +35,17 @@ namespace Volo.Abp.Account.Web public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.Account.Web"); }); - Configure(options => + Configure(options => { options.MenuContributors.Add(new AbpAccountUserMenuContributor()); }); - Configure(options => + Configure(options => { options.Contributors.Add(new AccountModuleToolbarContributor()); }); diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs index 1518afe236..404ce00d0b 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.Identity.EntityFrameworkCore { - public class AbpAuditLoggingModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class AbpAuditLoggingModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public AbpAuditLoggingModelBuilderConfigurationOptions( [NotNull] string tablePrefix, diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs index d3fadc3e28..553ba4d01c 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.AuditLogging.MongoDB { - public class AuditLoggingMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class AuditLoggingMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public AuditLoggingMongoModelBuilderConfigurationOptions( [NotNull] string collectionPrefix = "") diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs index f5cedd3cf5..7c70d720ec 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.AuditLogging.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs index 1afe3f594c..ed3639bce0 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs @@ -4,7 +4,6 @@ using Volo.Abp.Autofac; using Volo.Abp.BackgroundJobs.DemoApp.Shared; using Volo.Abp.Modularity; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; using Volo.Abp.BackgroundJobs.Hangfire; namespace Volo.Abp.BackgroundJobs.DemoApp.HangFire @@ -18,8 +17,7 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.HangFire { public override void PreConfigureServices(ServiceConfigurationContext context) { - var configuration = ConfigurationHelper.BuildConfiguration(); - context.Services.SetConfiguration(configuration); + var configuration = context.Services.GetConfiguration(); context.Services.PreConfigure(hangfireConfiguration => { diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs index cb9b532525..f64191ea3f 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.BackgroundJobs.DemoApp { [DependsOn( typeof(DemoAppSharedModule), - typeof(BackgroundJobsEntityFrameworkCoreModule), + typeof(AbpBackgroundJobsEntityFrameworkCoreModule), typeof(AbpAutofacModule), typeof(AbpEntityFrameworkCoreSqlServerModule) )] @@ -27,7 +27,7 @@ namespace Volo.Abp.BackgroundJobs.DemoApp }); }); - Configure(options => + Configure(options => { //Configure for fast running options.JobPollPeriod = 1000; diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo/Abp/BackgroundJobs/BackgroundJobsDomainSharedModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainSharedModule.cs similarity index 58% rename from modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo/Abp/BackgroundJobs/BackgroundJobsDomainSharedModule.cs rename to modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainSharedModule.cs index 2012620f3a..26565fde78 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo/Abp/BackgroundJobs/BackgroundJobsDomainSharedModule.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain.Shared/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainSharedModule.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.BackgroundJobs { - public class BackgroundJobsDomainSharedModule : AbpModule + public class AbpBackgroundJobsDomainSharedModule : AbpModule { } diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs similarity index 69% rename from modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs rename to modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs index 261051958c..a373fd883b 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainModule.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs @@ -5,15 +5,15 @@ using Volo.Abp.Modularity; namespace Volo.Abp.BackgroundJobs { [DependsOn( - typeof(BackgroundJobsDomainSharedModule), + typeof(AbpBackgroundJobsDomainSharedModule), typeof(AbpBackgroundJobsModule), typeof(AbpAutoMapperModule) )] - public class BackgroundJobsDomainModule : AbpModule //TODO: Rename to AbpBackgroundJobsDomainModule + public class AbpBackgroundJobsDomainModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); + context.Services.AddAutoMapperObjectMapper(); Configure(options => { options.AddProfile(validate: true); diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs index dce8a31600..2b796d9eaf 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobStore.cs @@ -10,11 +10,11 @@ namespace Volo.Abp.BackgroundJobs { protected IBackgroundJobRepository BackgroundJobRepository { get; } - protected IObjectMapper ObjectMapper { get; } + protected IObjectMapper ObjectMapper { get; } public BackgroundJobStore( IBackgroundJobRepository backgroundJobRepository, - IObjectMapper objectMapper) + IObjectMapper objectMapper) { ObjectMapper = objectMapper; BackgroundJobRepository = backgroundJobRepository; diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreModule.cs similarity index 82% rename from modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreModule.cs rename to modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreModule.cs index 9661dd7646..1c4e6278a5 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreModule.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreModule.cs @@ -5,10 +5,10 @@ using Volo.Abp.Modularity; namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore { [DependsOn( - typeof(BackgroundJobsDomainModule), + typeof(AbpBackgroundJobsDomainModule), typeof(AbpEntityFrameworkCoreModule) )] - public class BackgroundJobsEntityFrameworkCoreModule : AbpModule + public class AbpBackgroundJobsEntityFrameworkCoreModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs index 0f59572d6e..47734aa3a3 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore { - public class BackgroundJobsModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class BackgroundJobsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public BackgroundJobsModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "", diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbModule.cs similarity index 83% rename from modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbModule.cs rename to modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbModule.cs index 6ace195fa5..3e98ea6bc2 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbModule.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbModule.cs @@ -5,10 +5,10 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.BackgroundJobs.MongoDB { [DependsOn( - typeof(BackgroundJobsDomainModule), + typeof(AbpBackgroundJobsDomainModule), typeof(AbpMongoDbModule) )] - public class BackgroundJobsMongoDbModule : AbpModule + public class AbpBackgroundJobsMongoDbModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs index a16def3668..31291f2d9b 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs @@ -7,7 +7,7 @@ namespace Volo.Abp.BackgroundJobs.MongoDB { public static void ConfigureBackgroundJobs( this IMongoModelBuilder builder, - Action optionsAction = null) + Action optionsAction = null) { Check.NotNull(builder, nameof(builder)); diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs index 3833841b9f..7590fb0d12 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.BackgroundJobs.MongoDB { - public class BackgroundJobsMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class BackgroundJobsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public BackgroundJobsMongoModelBuilderConfigurationOptions( [NotNull] string collectionPrefix = "") diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainTestModule.cs similarity index 57% rename from modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestModule.cs rename to modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainTestModule.cs index d4c861b24c..a9a4bff069 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainTestModule.cs @@ -4,9 +4,9 @@ using Volo.Abp.Modularity; namespace Volo.Abp.BackgroundJobs { [DependsOn( - typeof(BackgroundJobsEntityFrameworkCoreTestModule) + typeof(AbpBackgroundJobsEntityFrameworkCoreTestModule) )] - public class BackgroundJobsDomainTestModule : AbpModule + public class AbpBackgroundJobsDomainTestModule : AbpModule { } diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestBase.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestBase.cs index 259fbf1929..ae1a2064d3 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestBase.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobsDomainTestBase.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.BackgroundJobs { - public abstract class BackgroundJobsDomainTestBase : BackgroundJobsTestBase + public abstract class BackgroundJobsDomainTestBase : BackgroundJobsTestBase { } diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreTestModule.cs similarity index 87% rename from modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs rename to modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreTestModule.cs index 70318c1e7a..65ed1194cf 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsEntityFrameworkCoreTestModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreTestModule.cs @@ -9,10 +9,10 @@ using Volo.Abp.Modularity; namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore { [DependsOn( - typeof(BackgroundJobsTestBaseModule), - typeof(BackgroundJobsEntityFrameworkCoreModule) + typeof(AbpBackgroundJobsTestBaseModule), + typeof(AbpBackgroundJobsEntityFrameworkCoreModule) )] - public class BackgroundJobsEntityFrameworkCoreTestModule : AbpModule + public class AbpBackgroundJobsEntityFrameworkCoreTestModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobRepositoryTests.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobRepositoryTests.cs index e2f4f22476..42c412037e 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobRepositoryTests.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobRepositoryTests.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore { - public class BackgroundJobRepositoryTests : BackgroundJobRepository_Tests + public class BackgroundJobRepositoryTests : BackgroundJobRepository_Tests { } diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbTestModule.cs similarity index 76% rename from modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs rename to modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbTestModule.cs index 4df77e4e5a..4147917829 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbTestModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbTestModule.cs @@ -7,10 +7,10 @@ using Volo.Abp.Modularity; namespace Volo.Abp.BackgroundJobs.MongoDB { [DependsOn( - typeof(BackgroundJobsTestBaseModule), - typeof(BackgroundJobsMongoDbModule) + typeof(AbpBackgroundJobsTestBaseModule), + typeof(AbpBackgroundJobsMongoDbModule) )] - public class BackgroundJobsMongoDbTestModule : AbpModule + public class AbpBackgroundJobsMongoDbTestModule : AbpModule { private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); @@ -20,7 +20,7 @@ namespace Volo.Abp.BackgroundJobs.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobRepositoryTests.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobRepositoryTests.cs index c6106e777a..429cf4821f 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobRepositoryTests.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobRepositoryTests.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.BackgroundJobs.MongoDB { - public class BackgroundJobRepositoryTests : BackgroundJobRepository_Tests + public class BackgroundJobRepositoryTests : BackgroundJobRepository_Tests { } diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/AbpBackgroundJobsTestBaseModule.cs similarity index 85% rename from modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs rename to modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/AbpBackgroundJobsTestBaseModule.cs index d38b3ceac5..0c1a681eeb 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/AbpBackgroundJobsTestBaseModule.cs @@ -7,13 +7,13 @@ namespace Volo.Abp.BackgroundJobs [DependsOn( typeof(AbpAutofacModule), typeof(AbpTestBaseModule), - typeof(BackgroundJobsDomainModule) + typeof(AbpBackgroundJobsDomainModule) )] - public class BackgroundJobsTestBaseModule : AbpModule + public class AbpBackgroundJobsTestBaseModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs index 7a7ecc9046..dbaefdc1a5 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs @@ -11,6 +11,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; +using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.Swagger; using Volo.Abp; using Volo.Abp.Account.Web; @@ -59,14 +60,14 @@ namespace Volo.BloggingTestApp public override void ConfigureServices(ServiceConfigurationContext context) { var hostingEnvironment = context.Services.GetHostingEnvironment(); - var configuration = context.Services.BuildConfiguration(); + var configuration = context.Services.GetConfiguration(); Configure(options => { options.RoutePrefix = null; }); - Configure(options => + Configure(options => { #if MONGODB const string connStringName = "MongoDb"; @@ -84,7 +85,7 @@ namespace Volo.BloggingTestApp #endif if (hostingEnvironment.IsDevelopment()) { - Configure(options => + Configure(options => { options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar))); @@ -99,7 +100,7 @@ namespace Volo.BloggingTestApp context.Services.AddSwaggerGen( options => { - options.SwaggerDoc("v1", new Info { Title = "Blogging API", Version = "v1" }); + options.SwaggerDoc("v1", new OpenApiInfo { Title = "Blogging API", Version = "v1" }); options.DocInclusionPredicate((docName, description) => true); options.CustomSchemaIds(type => type.FullName); }); @@ -119,7 +120,7 @@ namespace Volo.BloggingTestApp options.SupportedUICultures = cultures; }); - Configure(options => + Configure(options => { options.DefaultThemeName = BasicTheme.Name; }); @@ -147,11 +148,11 @@ namespace Volo.BloggingTestApp app.UseRouting(); - //app.UseSwagger(); - //app.UseSwaggerUI(options => - //{ - // options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API"); - //}); + app.UseSwagger(); + app.UseSwaggerUI(options => + { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API"); + }); app.UseAuthentication(); diff --git a/modules/blogging/app/Volo.BloggingTestApp/Program.cs b/modules/blogging/app/Volo.BloggingTestApp/Program.cs index b184a68b4e..739850817f 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Program.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/Program.cs @@ -1,6 +1,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; @@ -20,7 +21,7 @@ namespace Volo.BloggingTestApp try { Log.Information("Starting web host."); - BuildWebHostInternal(args).Run(); + CreateHostBuilder(args).Build().Run(); return 0; } catch (Exception ex) @@ -34,14 +35,13 @@ namespace Volo.BloggingTestApp } } - public static IWebHost BuildWebHostInternal(string[] args) => - new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIIS() - .UseIISIntegration() - .UseStartup() - .UseSerilog() - .Build(); + internal static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); } } diff --git a/modules/blogging/app/Volo.BloggingTestApp/Startup.cs b/modules/blogging/app/Volo.BloggingTestApp/Startup.cs index e4ccc31b60..fc53298f38 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Startup.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/Startup.cs @@ -9,19 +9,13 @@ namespace Volo.BloggingTestApp { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { - app.InitializeApplication(); } } diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index a0712e66f1..b4f2932021 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -12,9 +12,9 @@ - + - + diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs index e9ecdbf581..010f872b51 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingApplicationContractsModule.cs @@ -12,7 +12,7 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs index e923251245..aaa4425ec7 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/BloggingDomainSharedModule.cs @@ -12,7 +12,7 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs index 278208ced6..af888ab402 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Blogging.EntityFrameworkCore { - public class BloggingModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class BloggingModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public BloggingModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "", diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs index ecb9b45a33..3defbc1287 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs @@ -12,7 +12,7 @@ namespace Volo.Blogging.MongoDB { public static void ConfigureBlogging( this IMongoModelBuilder builder, - Action optionsAction = null) + Action optionsAction = null) { Check.NotNull(builder, nameof(builder)); diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs index 2e73f1a00c..d2fb415166 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Blogging.MongoDB { - public class BloggingMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class BloggingMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public BloggingMongoModelBuilderConfigurationOptions( [NotNull] string collectionPrefix = "") diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index aaf3b65f81..063ecebf5b 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -35,12 +35,12 @@ namespace Volo.Blogging public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.MenuContributors.Add(new BloggingMenuContributor()); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Blogging"); }); diff --git a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/BloggingMongoDBTestModule.cs b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/BloggingMongoDBTestModule.cs index a782b23354..4c4b34ef54 100644 --- a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/BloggingMongoDBTestModule.cs +++ b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/BloggingMongoDBTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Blogging.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Program.cs b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Program.cs index 86dc8569c7..6478e0cced 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Program.cs +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Program.cs @@ -1,6 +1,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; @@ -20,7 +21,7 @@ namespace Volo.ClientSimulation.Demo try { Log.Information("Starting web host."); - BuildWebHostInternal(args).Run(); + CreateHostBuilder(args).Build().Run(); return 0; } catch (Exception ex) @@ -34,14 +35,13 @@ namespace Volo.ClientSimulation.Demo } } - public static IWebHost BuildWebHostInternal(string[] args) => - new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIIS() - .UseIISIntegration() - .UseStartup() - .UseSerilog() - .Build(); + internal static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); } } diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Startup.cs b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Startup.cs index 5b1f1debce..eb82e10e43 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Startup.cs +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Startup.cs @@ -7,14 +7,9 @@ namespace Volo.ClientSimulation.Demo { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } public void Configure(IApplicationBuilder app) diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj index 6cfdef4205..9b681aeaa3 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj @@ -8,7 +8,7 @@ - + diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs b/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs index f4f15c7302..c75ee14656 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/ClientSimulationWebModule.cs @@ -12,7 +12,7 @@ namespace Volo.ClientSimulation { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.ClientSimulation"); }); diff --git a/modules/docs/app/VoloDocs.Migrator/VoloDocsMigratorModule.cs b/modules/docs/app/VoloDocs.Migrator/VoloDocsMigratorModule.cs index 07aece7a5e..66c2130b35 100644 --- a/modules/docs/app/VoloDocs.Migrator/VoloDocsMigratorModule.cs +++ b/modules/docs/app/VoloDocs.Migrator/VoloDocsMigratorModule.cs @@ -15,7 +15,7 @@ namespace VoloDocs.Migrator context.Services.AddAbpDbContext(); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = configuration["ConnectionString"]; }); diff --git a/modules/docs/app/VoloDocs.Web/Branding/VoloDocsBrandingProvider.cs b/modules/docs/app/VoloDocs.Web/Branding/VoloDocsBrandingProvider.cs index c4fd5ecb66..9c906767aa 100644 --- a/modules/docs/app/VoloDocs.Web/Branding/VoloDocsBrandingProvider.cs +++ b/modules/docs/app/VoloDocs.Web/Branding/VoloDocsBrandingProvider.cs @@ -1,6 +1,6 @@ -using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components; -using Volo.Abp.Configuration; using Volo.Abp.DependencyInjection; using Volo.Docs.Localization; @@ -9,10 +9,8 @@ namespace VoloDocs.Web.Branding [Dependency(ReplaceServices = true)] public class VoloDocsBrandingProvider : DefaultBrandingProvider { - public VoloDocsBrandingProvider(IConfigurationAccessor configurationAccessor, IStringLocalizer localizer) + public VoloDocsBrandingProvider(IConfiguration configuration, IStringLocalizer localizer) { - var configuration = configurationAccessor.Configuration; - AppName = localizer["DocsTitle"]; if (configuration["LogoUrl"] != null) diff --git a/modules/docs/app/VoloDocs.Web/Program.cs b/modules/docs/app/VoloDocs.Web/Program.cs index 26959f112f..b40fa6b4f7 100644 --- a/modules/docs/app/VoloDocs.Web/Program.cs +++ b/modules/docs/app/VoloDocs.Web/Program.cs @@ -1,6 +1,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; @@ -20,7 +21,7 @@ namespace VoloDocs.Web try { Log.Information("Starting web host."); - BuildWebHostInternal(args).Run(); + CreateHostBuilder(args).Build().Run(); return 0; } catch (Exception ex) @@ -34,14 +35,13 @@ namespace VoloDocs.Web } } - public static IWebHost BuildWebHostInternal(string[] args) => - new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIIS() - .UseIISIntegration() - .UseStartup() - .UseSerilog() - .Build(); + internal static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); } } diff --git a/modules/docs/app/VoloDocs.Web/Startup.cs b/modules/docs/app/VoloDocs.Web/Startup.cs index a05cf9e2c0..22d7b980c5 100644 --- a/modules/docs/app/VoloDocs.Web/Startup.cs +++ b/modules/docs/app/VoloDocs.Web/Startup.cs @@ -9,17 +9,12 @@ namespace VoloDocs.Web { public class Startup { - public IServiceProvider ConfigureServices(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { - services.AddApplication(options => - { - options.UseAutofac(); - }); - - return services.BuildServiceProviderFromFactory(); + services.AddApplication(); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { app.InitializeApplication(); } diff --git a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj index f7b0567f4c..0de35915c5 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj +++ b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj @@ -14,9 +14,9 @@ - + - + diff --git a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs index 0766d977c9..3fc97ec859 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs +++ b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.Swagger; using Volo.Abp; using Volo.Abp.Account.Web; @@ -68,7 +69,7 @@ namespace VoloDocs.Web options.RoutePrefix = null; }); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = configuration["ConnectionString"]; }); @@ -80,7 +81,7 @@ namespace VoloDocs.Web if (hostingEnvironment.IsDevelopment()) { - Configure(options => + Configure(options => { options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.UI", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI", Path.DirectorySeparatorChar))); @@ -96,7 +97,7 @@ namespace VoloDocs.Web context.Services.AddSwaggerGen( options => { - options.SwaggerDoc("v1", new Info + options.SwaggerDoc("v1", new OpenApiInfo { Title = "Docs API", Version = "v1" @@ -105,7 +106,7 @@ namespace VoloDocs.Web options.CustomSchemaIds(type => type.FullName); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("VoloDocs.Web"); }); @@ -124,7 +125,7 @@ namespace VoloDocs.Web .AddVirtualJson("/Localization/Resources/VoloDocs/Web"); }); - Configure(options => + Configure(options => { options.DefaultThemeName = BasicTheme.Name; }); diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminApplicationContractsModule.cs b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminApplicationContractsModule.cs index e37a732a0d..8e2544d632 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminApplicationContractsModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminApplicationContractsModule.cs @@ -15,7 +15,7 @@ namespace Volo.Docs.Admin { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs index 34e0272e2f..de404a5884 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs @@ -36,12 +36,12 @@ namespace Volo.Docs.Admin public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.MenuContributors.Add(new DocsMenuContributor()); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Docs.Admin"); }); diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs index 8adf03faa9..91618b950a 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs @@ -19,7 +19,7 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets .AddEmbedded(); diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs index 217345eee2..0baf8b4afe 100644 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Docs.EntityFrameworkCore { - public class DocsModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class DocsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public DocsModelBuilderConfigurationOptions( [NotNull] string tablePrefix, diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs index 865da90981..456070a645 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs @@ -9,7 +9,7 @@ namespace Volo.Docs.MongoDB { public static void ConfigureDocs( this IMongoModelBuilder builder, - Action optionsAction = null) + Action optionsAction = null) { Check.NotNull(builder, nameof(builder)); diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs index 20a67382a1..4bb1c76372 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Docs.MongoDB { - public class DocsMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class DocsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public DocsMongoModelBuilderConfigurationOptions( [NotNull] string collectionPrefix) diff --git a/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs b/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs index 3f3e87ea14..13f29184a9 100644 --- a/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs +++ b/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs @@ -37,7 +37,7 @@ namespace Volo.Docs public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Docs"); }); @@ -68,7 +68,7 @@ namespace Volo.Docs options.Converters[MarkdownDocumentToHtmlConverter.Type] = typeof(MarkdownDocumentToHtmlConverter); }); - Configure(options => + Configure(options => { options .Extensions() diff --git a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/DocsMongoDBTestModule.cs b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/DocsMongoDBTestModule.cs index aa451f045e..c5fef83ddb 100644 --- a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/DocsMongoDBTestModule.cs +++ b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/DocsMongoDBTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Docs.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/AbpFeatureManagementApplicationContractsModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/AbpFeatureManagementApplicationContractsModule.cs index 732c200bb0..8b71e3f85b 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/AbpFeatureManagementApplicationContractsModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/AbpFeatureManagementApplicationContractsModule.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.FeatureManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs index 95bff48f2e..f91fe28e5f 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.FeatureManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs index 22b845eeaa..e8e961d3b4 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.FeatureManagement options.ProviderPolicies[TenantFeatureValueProvider.ProviderName] = "AbpTenantManagement.Tenants.ManageFeatures"; }); - Configure(options => + Configure(options => { options.MapCodeNamespace("AbpFeatureManagement", typeof(AbpFeatureManagementResource)); }); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs index 035b6ed341..ba8e38bd61 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.FeatureManagement.EntityFrameworkCore { - public class FeatureManagementModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class FeatureManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public FeatureManagementModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "", diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs index 48c3f88dd2..55ef3b616a 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs @@ -7,7 +7,7 @@ namespace Volo.Abp.FeatureManagement.MongoDB { public static void ConfigureFeatureManagement( this IMongoModelBuilder builder, - Action optionsAction = null) + Action optionsAction = null) { Check.NotNull(builder, nameof(builder)); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs index e4ba0bbc8a..edb486e906 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.FeatureManagement.MongoDB { - public class FeatureManagementMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class FeatureManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public FeatureManagementMongoModelBuilderConfigurationOptions( [NotNull] string collectionPrefix = "") diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs index 4908097f36..da39ec3b89 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.FeatureManagement public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.FeatureManagement"); }); diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/AbpFeatureManagementMongoDbTestModule.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/AbpFeatureManagementMongoDbTestModule.cs index df3b64a7de..00b5b22871 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/AbpFeatureManagementMongoDbTestModule.cs +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/AbpFeatureManagementMongoDbTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.FeatureManagement.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs index 92b99c597f..5133e0dc03 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/AbpIdentityDomainSharedModule.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -28,7 +28,7 @@ namespace Volo.Abp.Identity ).AddVirtualJson("/Volo/Abp/Identity/Localization"); }); - Configure(options => + Configure(options => { options.MapCodeNamespace("Volo.Abp.Identity", typeof(IdentityResource)); }); diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs index 938b4050d7..1bb065017e 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.Identity { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.EtoMappings.Add(); }); diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityModelBuilderConfigurationOptions.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityModelBuilderConfigurationOptions.cs index ce27e4c1e9..c78496e0f5 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityModelBuilderConfigurationOptions.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.Identity.EntityFrameworkCore { - public class IdentityModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class IdentityModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public IdentityModelBuilderConfigurationOptions( [NotNull] string tablePrefix, diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/IdentityMongoModelBuilderConfigurationOptions.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/IdentityMongoModelBuilderConfigurationOptions.cs index e1c6796d84..d36fc17877 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/IdentityMongoModelBuilderConfigurationOptions.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/IdentityMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.Identity.MongoDB { - public class IdentityMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class IdentityMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public IdentityMongoModelBuilderConfigurationOptions([NotNull] string collectionPrefix = "") : base(collectionPrefix) diff --git a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs index 91f7b9b3a8..8d2ba91695 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs @@ -35,12 +35,12 @@ namespace Volo.Abp.Identity.Web public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor()); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.Identity.Web"); }); diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js index cde584cf20..6127dfe9c1 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js @@ -37,7 +37,7 @@ visible: abp.auth.isGranted('AbpIdentity.Roles.ManagePermissions'), action: function (data) { _permissionsModal.open({ - providerName: 'Role', + providerName: 'R', providerKey: data.record.name }); } diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js index 63e79c4bb8..4d8486d256 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js @@ -36,7 +36,7 @@ visible: abp.auth.isGranted('AbpIdentity.Users.ManagePermissions'), action: function (data) { _permissionsModal.open({ - providerName: 'User', + providerName: 'U', providerKey: data.record.id }); } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs index bc6a8cd27b..95e8f925c4 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.Identity [Fact] public async Task Should_Register_Handler() { - var options = GetRequiredService>().Value; + var options = GetRequiredService>().Value; options.EtoMappings.ShouldContain(m => m.Key == typeof(IdentityUser) && m.Value.EtoType == typeof(UserEto)); options.Handlers.ShouldContain(h => h == typeof(DistributedUserUpdateHandler)); } diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs index 8025ef7661..6e9f3806a2 100644 --- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs +++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Identity.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs index 8d2bf66576..983ffcb071 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/AbpIdentityServerDomainSharedModule.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.IdentityServer { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); @@ -27,7 +27,7 @@ namespace Volo.Abp.IdentityServer ).AddVirtualJson("/Volo/Abp/IdentityServer/Localization/Resources"); }); - Configure(options => + Configure(options => { options.MapCodeNamespace("Volo.IdentityServer", typeof(AbpIdentityServerResource)); }); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs index 96a268a0e7..ab46d03ece 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs @@ -9,6 +9,6 @@ // 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K // apparently anything over 4K converts to nvarchar(max) on SqlServer - public const int DataMaxLength = 5000; + public const int DataMaxLength = 50000; } } \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index a9b1f1fe33..bd69f6948f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; +using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.Clients; @@ -71,7 +72,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore redirectUri.HasKey(x => new { x.ClientId, x.RedirectUri }); - redirectUri.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLength).IsRequired(); + if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql) + { + redirectUri.Property(x => x.RedirectUri).HasMaxLength(300).IsRequired(); + } + else + { + redirectUri.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLength).IsRequired(); + } }); builder.Entity(postLogoutRedirectUri => @@ -80,7 +88,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore postLogoutRedirectUri.HasKey(x => new { x.ClientId, x.PostLogoutRedirectUri }); - postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLength).IsRequired(); + if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql) + { + postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(300).IsRequired(); + } + else + { + postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLength).IsRequired(); + } }); builder.Entity(scope => @@ -99,7 +114,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore secret.HasKey(x => new { x.ClientId, x.Type, x.Value }); secret.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); - secret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); + + if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql) + { + secret.Property(x => x.Value).HasMaxLength(300).IsRequired(); + } + else + { + secret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); + } + secret.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); }); @@ -152,7 +176,15 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore grant.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength); grant.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired(); grant.Property(x => x.CreationTime).IsRequired(); - grant.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLength).IsRequired(); + + if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql) + { + grant.Property(x => x.Data).HasMaxLength(10000).IsRequired(); + } + else + { + grant.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLength).IsRequired(); + } grant.HasKey(x => x.Key); //TODO: What about Id!!! @@ -214,7 +246,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore apiSecret.HasKey(x => new { x.ApiResourceId, x.Type, x.Value }); apiSecret.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); - apiSecret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); + + if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql) + { + apiSecret.Property(x => x.Value).HasMaxLength(300).IsRequired(); + } + else + { + apiSecret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); + } + apiSecret.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); }); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs index 55dcc06837..53b2bf0d8f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs @@ -1,10 +1,13 @@ using JetBrains.Annotations; +using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.IdentityServer.EntityFrameworkCore { - public class IdentityServerModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class IdentityServerModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { + public EfCoreDatabaseProvider? DatabaseProvider { get; set; } + public IdentityServerModelBuilderConfigurationOptions( [NotNull] string tablePrefix, [CanBeNull] string schema) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs index f6afe62737..55556e105b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.IdentityServer.MongoDB { - public class IdentityServerMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class IdentityServerMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public IdentityServerMongoModelBuilderConfigurationOptions([NotNull] string collectionPrefix = "") : base(collectionPrefix) diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs index de8dc5690e..ebfa34404d 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo/Abp/IdentityServer/AbpIdentityServerMongoDbTestModule.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.IdentityServer "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainSharedModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainSharedModule.cs index adae510945..210ff6affc 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainSharedModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainSharedModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.PermissionManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs index 3cf4c1755a..1ddfcc9a8f 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.PermissionManagement.EntityFrameworkCore { - public class AbpPermissionManagementModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class AbpPermissionManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public AbpPermissionManagementModelBuilderConfigurationOptions( [NotNull] string tablePrefix, diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs index e3ec872065..cf81d69a19 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs @@ -7,7 +7,7 @@ namespace Volo.Abp.PermissionManagement.MongoDB { public static void ConfigurePermissionManagement( this IMongoModelBuilder builder, - Action optionsAction = null) + Action optionsAction = null) { Check.NotNull(builder, nameof(builder)); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs index 0af620956c..acc7d5cb84 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.PermissionManagement.MongoDB { - public class PermissionManagementMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class PermissionManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public PermissionManagementMongoModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "") diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs index 38fd9827a1..cf1c3f13b1 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.PermissionManagement.Web public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.PermissionManagement.Web"); }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs index 9f122fc17c..f4d2538696 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementEntityFrameworkCoreTestModule.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore }); }); - Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs index d36516b887..d3d4d5d6e9 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbTestModule.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.PermissionManagement.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs index 42894b5eb9..5c730ab0ab 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo/Abp/PermissionManagement/AbpPermissionManagementTestModule.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.PermissionManagement }); }); - Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/AbpSettingManagementDomainSharedModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/AbpSettingManagementDomainSharedModule.cs index 5f6f174f82..d6b6ba065e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/AbpSettingManagementDomainSharedModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/AbpSettingManagementDomainSharedModule.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.SettingManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs index e95cb9791a..d0de79aa7e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs @@ -5,7 +5,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.SettingManagement.EntityFrameworkCore { - public class SettingManagementModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class SettingManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public SettingManagementModelBuilderConfigurationOptions( [NotNull] string tablePrefix, diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs index a603e1e204..bdc423f8a1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.SettingManagement.MongoDB { - public class SettingManagementMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class SettingManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public SettingManagementMongoModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "") diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs index a99317daa4..3e0cd0a7f1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs @@ -23,12 +23,12 @@ namespace Volo.Abp.SettingManagement.Web public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.MenuContributors.Add(new SettingManagementMainMenuContributor()); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.SettingManagement.Web"); }); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs index d0d8b35415..1b9faefdbd 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo/Abp/SettingManagement/MongoDB/AbpSettingManagementMongoDbTestModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.SettingManagement.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs index ea52e4458c..5dad99a0ca 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingRepository_Tests.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.SettingManagement (await SettingRepository.FindAsync( "MySetting2", - "User", + UserSettingValueProvider.ProviderName, TestData.User1Id.ToString() )).Value.ShouldBe("user1-store-value"); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs index a66a4fe253..6843d6257e 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo/Abp/SettingManagement/SettingTestDataBuilder.cs @@ -45,7 +45,7 @@ namespace Volo.Abp.SettingManagement _guidGenerator.Create(), "MySetting2", "user1-store-value", - "User", + UserSettingValueProvider.ProviderName, _testData.User1Id.ToString() ) ); @@ -55,7 +55,7 @@ namespace Volo.Abp.SettingManagement _guidGenerator.Create(), "MySetting2", "user2-store-value", - "User", + UserSettingValueProvider.ProviderName, _testData.User2Id.ToString() ) ); @@ -74,7 +74,7 @@ namespace Volo.Abp.SettingManagement _guidGenerator.Create(), "MySettingWithoutInherit", "user1-store-value", - "User", + UserSettingValueProvider.ProviderName, _testData.User1Id.ToString() ) ); diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs index de956d0202..2a458a1739 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo/Abp/SettingManagement/SettingCacheItemInvalidator_Tests.cs @@ -29,9 +29,9 @@ namespace Volo.Abp.SettingManagement public async Task GetOrNullAsync_Should_Cached() { // Act - (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", "User", _testData.User1Id.ToString()))).ShouldBeNull(); - await _settingManagementStore.GetOrNullAsync("MySetting2", "User", _testData.User1Id.ToString()); - (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", "User", _testData.User1Id.ToString()))).ShouldNotBeNull(); + (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()))).ShouldBeNull(); + await _settingManagementStore.GetOrNullAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()); + (await _cache.GetAsync(SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()))).ShouldNotBeNull(); } [Fact] @@ -39,15 +39,15 @@ namespace Volo.Abp.SettingManagement { // Arrange // GetOrNullAsync will cache language. - await _settingManagementStore.GetOrNullAsync("MySetting2", "User", _testData.User1Id.ToString()); + await _settingManagementStore.GetOrNullAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()); // Act - var lang = await _settingRepository.FindAsync("MySetting2", "User", _testData.User1Id.ToString()); + var lang = await _settingRepository.FindAsync("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()); await _settingRepository.DeleteAsync(lang); // Assert (await _cache.GetAsync( - SettingCacheItem.CalculateCacheKey("MySetting2", "User", _testData.User1Id.ToString()))).ShouldBeNull(); + SettingCacheItem.CalculateCacheKey("MySetting2", UserSettingValueProvider.ProviderName, _testData.User1Id.ToString()))).ShouldBeNull(); } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs index 873593f9ca..2058ae5425 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.TenantManagement { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.FileSets.AddEmbedded(); }); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs index 2c7bba5afe..849ed68bae 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.TenantManagement.EntityFrameworkCore { - public class AbpTenantManagementModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + public class AbpTenantManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { public AbpTenantManagementModelBuilderConfigurationOptions( [NotNull] string tablePrefix, diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs index 590feb6a39..18b2049450 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs @@ -7,7 +7,7 @@ namespace Volo.Abp.TenantManagement.MongoDB { public static void ConfigureTenantManagement( this IMongoModelBuilder builder, - Action optionsAction = null) + Action optionsAction = null) { Check.NotNull(builder, nameof(builder)); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs index 3b964a8940..09f54572b2 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs @@ -3,7 +3,7 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.TenantManagement.MongoDB { - public class TenantManagementMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + public class TenantManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { public TenantManagementMongoModelBuilderConfigurationOptions( [NotNull] string tablePrefix = "") diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs index 626970a1a9..a3f066594e 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs @@ -37,12 +37,12 @@ namespace Volo.Abp.TenantManagement.Web public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor()); }); - Configure(options => + Configure(options => { options.FileSets.AddEmbedded("Volo.Abp.TenantManagement.Web"); }); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js index 18d0cceafc..4583cd616a 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js @@ -46,7 +46,7 @@ visible: abp.auth.isGranted('AbpTenantManagement.Tenants.ManageFeatures'), action: function (data) { _featuresModal.open({ - providerName: 'Tenant', + providerName: 'T', providerKey: data.record.id }); } diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs index dd5d9f8ae2..2328c4e302 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore }); }); - Configure(options => + Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs index c9e72adaa2..911839d510 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.TenantManagement.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo/Abp/Users/EntityFrameworkCore/AbpUsersEntityFrameworkCoreTestModule.cs b/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo/Abp/Users/EntityFrameworkCore/AbpUsersEntityFrameworkCoreTestModule.cs index cba8126af0..7a19077afe 100644 --- a/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo/Abp/Users/EntityFrameworkCore/AbpUsersEntityFrameworkCoreTestModule.cs +++ b/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo/Abp/Users/EntityFrameworkCore/AbpUsersEntityFrameworkCoreTestModule.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.Users.EntityFrameworkCore }); }); - services.Configure(options => + services.Configure(options => { options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions }); diff --git a/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo/Abp/Users/MongoDB/AbpUsersMongoDbTestModule.cs b/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo/Abp/Users/MongoDB/AbpUsersMongoDbTestModule.cs index c503db6112..a2235ee03e 100644 --- a/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo/Abp/Users/MongoDB/AbpUsersMongoDbTestModule.cs +++ b/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo/Abp/Users/MongoDB/AbpUsersMongoDbTestModule.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Users.MongoDB "Db_" + Guid.NewGuid().ToString("N"); - Configure(options => + Configure(options => { options.ConnectionStrings.Default = connectionString; }); diff --git a/npm/lerna.json b/npm/lerna.json index ea738053cb..b345f38c28 100644 --- a/npm/lerna.json +++ b/npm/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.1", + "version": "0.9.2", "packages": [ "ng-packs/dist/*", "packs/*" diff --git a/npm/ng-packs/.vscode/settings.json b/npm/ng-packs/.vscode/settings.json index ba819b4f57..0e7b4b1be1 100644 --- a/npm/ng-packs/.vscode/settings.json +++ b/npm/ng-packs/.vscode/settings.json @@ -5,18 +5,18 @@ "tslint.rulesDirectory": "../node_modules/codelyzer", "typescript.tsdk": "../node_modules/typescript/lib", "workbench.colorCustomizations": { - "activityBar.background": "#df7fa2", - "activityBar.foreground": "#15202b", - "activityBar.inactiveForeground": "#15202b99", - "activityBarBadge.background": "#c7ecb3", - "activityBarBadge.foreground": "#15202b", - "titleBar.activeBackground": "#d55685", - "titleBar.inactiveBackground": "#d5568599", - "titleBar.activeForeground": "#15202b", - "titleBar.inactiveForeground": "#15202b99", - "statusBar.background": "#d55685", - "statusBarItem.hoverBackground": "#c73169", - "statusBar.foreground": "#15202b" + "activityBar.background": "#90164b", + "activityBar.foreground": "#e7e7e7", + "activityBar.inactiveForeground": "#e7e7e799", + "activityBarBadge.background": "#0e1c04", + "activityBarBadge.foreground": "#e7e7e7", + "titleBar.activeBackground": "#640f34", + "titleBar.inactiveBackground": "#640f3499", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveForeground": "#e7e7e799", + "statusBar.background": "#640f34", + "statusBarItem.hoverBackground": "#90164b", + "statusBar.foreground": "#e7e7e7" }, - "peacock.color": "#d55685" + "peacock.color": "#640f34" } diff --git a/npm/ng-packs/angular.json b/npm/ng-packs/angular.json index f1c7d18a46..cfa01cf43f 100644 --- a/npm/ng-packs/angular.json +++ b/npm/ng-packs/angular.json @@ -435,9 +435,14 @@ "apps/dev-app/src/styles.scss", "node_modules/bootstrap/dist/css/bootstrap.min.css", { - "input": "node_modules/font-awesome/css/font-awesome.min.css", + "input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css", "lazy": true, - "bundleName": "font-awesome.min" + "bundleName": "fontawesome-all.min" + }, + { + "input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css", + "lazy": true, + "bundleName": "fontawesome-v4-shims.min" }, { "input": "node_modules/primeng/resources/themes/nova-light/theme.css", diff --git a/npm/ng-packs/apps/dev-app/src/app/app.component.ts b/npm/ng-packs/apps/dev-app/src/app/app.component.ts index e89c73184d..4780afbfd5 100644 --- a/npm/ng-packs/apps/dev-app/src/app/app.component.ts +++ b/npm/ng-packs/apps/dev-app/src/app/app.component.ts @@ -14,7 +14,13 @@ export class AppComponent implements OnInit { ngOnInit() { this.lazyLoadService .load( - ['primeng.min.css', 'primeicons.css', 'primeng-nova-light-theme.css', 'font-awesome.min.css'], + [ + 'primeng.min.css', + 'primeicons.css', + 'primeng-nova-light-theme.css', + 'fontawesome-all.min.css', + 'fontawesome-v4-shims.min.css', + ], 'style', null, 'head', diff --git a/npm/ng-packs/apps/dev-app/src/app/home/home.component.html b/npm/ng-packs/apps/dev-app/src/app/home/home.component.html index 4fafc67398..79220d16c4 100644 --- a/npm/ng-packs/apps/dev-app/src/app/home/home.component.html +++ b/npm/ng-packs/apps/dev-app/src/app/home/home.component.html @@ -6,7 +6,7 @@

{{ 'AbpIdentity::Login' | abpLocalization }}{{ 'AbpIdentity::Login' | abpLocalization }}


diff --git a/npm/ng-packs/dist/account-config/package.json b/npm/ng-packs/dist/account-config/package.json index e7e563727b..70c147ae62 100644 --- a/npm/ng-packs/dist/account-config/package.json +++ b/npm/ng-packs/dist/account-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.account.config", - "version": "0.9.1", + "version": "0.9.2", "publishConfig": { "access": "public" }, diff --git a/npm/ng-packs/dist/account/package.json b/npm/ng-packs/dist/account/package.json index aa36c77346..ed62d825fd 100644 --- a/npm/ng-packs/dist/account/package.json +++ b/npm/ng-packs/dist/account/package.json @@ -1,9 +1,9 @@ { "name": "@abp/ng.account", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.account.config": "^0.9.1", - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.account.config": "^0.9.2", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/core/package.json b/npm/ng-packs/dist/core/package.json index d742277289..7345aff622 100644 --- a/npm/ng-packs/dist/core/package.json +++ b/npm/ng-packs/dist/core/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.core", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { "@ngxs/router-plugin": "^3.5.0", "@ngxs/storage-plugin": "^3.5.0", diff --git a/npm/ng-packs/dist/feature-management/package.json b/npm/ng-packs/dist/feature-management/package.json index 92a1219493..dd31b04539 100644 --- a/npm/ng-packs/dist/feature-management/package.json +++ b/npm/ng-packs/dist/feature-management/package.json @@ -1,8 +1,8 @@ { "name": "@abp/ng.feature-management", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/identity-config/package.json b/npm/ng-packs/dist/identity-config/package.json index 21fd34470a..2d278efa91 100644 --- a/npm/ng-packs/dist/identity-config/package.json +++ b/npm/ng-packs/dist/identity-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.identity.config", - "version": "0.9.1", + "version": "0.9.2", "publishConfig": { "access": "public" }, diff --git a/npm/ng-packs/dist/identity/package.json b/npm/ng-packs/dist/identity/package.json index bd94335b6d..6a4378cff6 100644 --- a/npm/ng-packs/dist/identity/package.json +++ b/npm/ng-packs/dist/identity/package.json @@ -1,10 +1,10 @@ { "name": "@abp/ng.identity", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.identity.config": "^0.9.1", - "@abp/ng.permission-management": "^0.9.1", - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.identity.config": "^0.9.2", + "@abp/ng.permission-management": "^0.9.2", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/permission-management/package.json b/npm/ng-packs/dist/permission-management/package.json index 8ec740ae06..17f69d66db 100644 --- a/npm/ng-packs/dist/permission-management/package.json +++ b/npm/ng-packs/dist/permission-management/package.json @@ -1,8 +1,8 @@ { "name": "@abp/ng.permission-management", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/setting-management-config/package.json b/npm/ng-packs/dist/setting-management-config/package.json index ae90113fbe..92834f1edb 100644 --- a/npm/ng-packs/dist/setting-management-config/package.json +++ b/npm/ng-packs/dist/setting-management-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.setting-management.config", - "version": "0.9.1", + "version": "0.9.2", "publishConfig": { "access": "public" }, diff --git a/npm/ng-packs/dist/setting-management/package.json b/npm/ng-packs/dist/setting-management/package.json index c1fb945d7a..057f1060c9 100644 --- a/npm/ng-packs/dist/setting-management/package.json +++ b/npm/ng-packs/dist/setting-management/package.json @@ -1,9 +1,9 @@ { "name": "@abp/ng.setting-management", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.setting-management.config": "^0.9.1", - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.setting-management.config": "^0.9.2", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/tenant-management-config/package.json b/npm/ng-packs/dist/tenant-management-config/package.json index fabed5847c..561bbc30f5 100644 --- a/npm/ng-packs/dist/tenant-management-config/package.json +++ b/npm/ng-packs/dist/tenant-management-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.tenant-management.config", - "version": "0.9.1", + "version": "0.9.2", "publishConfig": { "access": "public" }, diff --git a/npm/ng-packs/dist/tenant-management/package.json b/npm/ng-packs/dist/tenant-management/package.json index 19619de243..330eb22a48 100644 --- a/npm/ng-packs/dist/tenant-management/package.json +++ b/npm/ng-packs/dist/tenant-management/package.json @@ -1,10 +1,10 @@ { "name": "@abp/ng.tenant-management", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.feature-management": "^0.9.1", - "@abp/ng.tenant-management.config": "^0.9.1", - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.feature-management": "^0.9.2", + "@abp/ng.tenant-management.config": "^0.9.2", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/theme-basic/package.json b/npm/ng-packs/dist/theme-basic/package.json index c105a37175..7478632423 100644 --- a/npm/ng-packs/dist/theme-basic/package.json +++ b/npm/ng-packs/dist/theme-basic/package.json @@ -1,8 +1,8 @@ { "name": "@abp/ng.theme.basic", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.theme.shared": "^0.9.1", + "@abp/ng.theme.shared": "^0.9.2", "tslib": "^1.9.0" }, "publishConfig": { diff --git a/npm/ng-packs/dist/theme-shared/package.json b/npm/ng-packs/dist/theme-shared/package.json index f13b239df9..d82f55414a 100644 --- a/npm/ng-packs/dist/theme-shared/package.json +++ b/npm/ng-packs/dist/theme-shared/package.json @@ -1,8 +1,8 @@ { "name": "@abp/ng.theme.shared", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.core": "^0.9.1", + "@abp/ng.core": "^0.9.2", "@angular/cdk": "^8.0.1", "@ng-bootstrap/ng-bootstrap": "^5.1.0", "@ngx-validate/core": "^0.0.7", diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 3774a5705d..abee172af0 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -7,13 +7,17 @@ "abpng": "abpng", "commit": "git-cz && node scripts/push.js", "lint": "ng lint --fix", - "build:scripts": "cd scripts && npm install && npm run build" + "scripts:build": "cd scripts && npm install && npm run build" }, "devDependencies": { - "@abp/ng.core": "^0.9.0", - "@abp/ng.feature-management": "^0.9.0", - "@abp/ng.permission-management": "^0.9.0", - "@abp/ng.theme.shared": "^0.9.0", + "@abp/ng.account.config": "0.9.2", + "@abp/ng.core": "0.9.2", + "@abp/ng.feature-management": "0.9.2", + "@abp/ng.identity.config": "0.9.2", + "@abp/ng.permission-management": "0.9.2", + "@abp/ng.setting-management.config": "0.9.2", + "@abp/ng.tenant-management.config": "0.9.2", + "@abp/ng.theme.shared": "0.9.2", "@angular-builders/jest": "^8.2.0", "@angular-devkit/build-angular": "~0.803.6", "@angular-devkit/build-ng-packagr": "~0.803.6", @@ -29,6 +33,7 @@ "@angular/platform-browser": "~8.2.8", "@angular/platform-browser-dynamic": "~8.2.8", "@angular/router": "~8.1.2", + "@fortawesome/fontawesome-free": "^5.11.2", "@ng-bootstrap/ng-bootstrap": "^5.1.0", "@ngneat/spectator": "^4.4.0", "@ngx-validate/core": "^0.0.7", @@ -64,11 +69,7 @@ "tsickle": "^0.37.0", "tslint": "~5.20.0", "typescript": "~3.5.3", - "zone.js": "~0.9.1", - "@abp/ng.account.config": "^0.9.0", - "@abp/ng.identity.config": "0.9.0", - "@abp/ng.tenant-management.config": "^0.9.0", - "@abp/ng.setting-management.config": "^0.9.0" + "zone.js": "~0.9.1" }, "dependencies": { "tslib": "^1.10.0" diff --git a/npm/ng-packs/packages/account-config/package.json b/npm/ng-packs/packages/account-config/package.json index 7840234df1..ed997c9bb5 100644 --- a/npm/ng-packs/packages/account-config/package.json +++ b/npm/ng-packs/packages/account-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.account.config", - "version": "0.9.1", + "version": "0.9.2", "publishConfig": { "access": "public" } diff --git a/npm/ng-packs/packages/account/package.json b/npm/ng-packs/packages/account/package.json index 62808920ed..2e4385dd75 100644 --- a/npm/ng-packs/packages/account/package.json +++ b/npm/ng-packs/packages/account/package.json @@ -1,9 +1,9 @@ { "name": "@abp/ng.account", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.theme.shared": "^0.9.1", - "@abp/ng.account.config": "^0.9.1" + "@abp/ng.theme.shared": "^0.9.2", + "@abp/ng.account.config": "^0.9.2" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/core/package.json b/npm/ng-packs/packages/core/package.json index 4ff687cdeb..f747d9cbec 100644 --- a/npm/ng-packs/packages/core/package.json +++ b/npm/ng-packs/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.core", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { "@ngxs/router-plugin": "^3.5.0", "@ngxs/storage-plugin": "^3.5.0", diff --git a/npm/ng-packs/packages/core/src/lib/services/config.service.ts b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts similarity index 94% rename from npm/ng-packs/packages/core/src/lib/services/config.service.ts rename to npm/ng-packs/packages/core/src/lib/services/config-state.service.ts index 21050f2b79..0efa55c179 100644 --- a/npm/ng-packs/packages/core/src/lib/services/config.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts @@ -5,7 +5,7 @@ import { ConfigState } from '../states'; @Injectable({ providedIn: 'root', }) -export class ConfigService { +export class ConfigStateService { constructor(private store: Store) {} getAll() { diff --git a/npm/ng-packs/packages/core/src/lib/services/index.ts b/npm/ng-packs/packages/core/src/lib/services/index.ts index 8ae05cabaa..6b90b997cc 100644 --- a/npm/ng-packs/packages/core/src/lib/services/index.ts +++ b/npm/ng-packs/packages/core/src/lib/services/index.ts @@ -1,6 +1,8 @@ export * from './application-configuration.service'; -export * from './config.service'; +export * from './config-state.service'; export * from './lazy-load.service'; export * from './localization.service'; export * from './profile.service'; export * from './rest.service'; +export * from './profile-state.service'; +export * from './session-state.service'; diff --git a/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts new file mode 100644 index 0000000000..7dea8de2ea --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { Store } from '@ngxs/store'; +import { ProfileState } from '../states'; + +@Injectable({ + providedIn: 'root', +}) +export class ProfileStateService { + constructor(private store: Store) {} + + getProfile() { + return this.store.selectSnapshot(ProfileState.getProfile); + } +} diff --git a/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts new file mode 100644 index 0000000000..03076e2eeb --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts @@ -0,0 +1,16 @@ +import { Injectable } from '@angular/core'; +import { Store } from '@ngxs/store'; +import { SessionState } from '../states'; + +@Injectable() +export class SessionStateService { + constructor(private store: Store) {} + + getLanguage() { + return this.store.selectSnapshot(SessionState.getLanguage); + } + + getTenant() { + return this.store.selectSnapshot(SessionState.getTenant); + } +} diff --git a/npm/ng-packs/packages/core/src/lib/states/profile.state.ts b/npm/ng-packs/packages/core/src/lib/states/profile.state.ts index cce9788f09..c19b120e1b 100644 --- a/npm/ng-packs/packages/core/src/lib/states/profile.state.ts +++ b/npm/ng-packs/packages/core/src/lib/states/profile.state.ts @@ -17,7 +17,7 @@ export class ProfileState { constructor(private profileService: ProfileService) {} @Action(GetProfile) - profileGet({ patchState }: StateContext) { + getProfile({ patchState }: StateContext) { return this.profileService.get().pipe( tap(profile => patchState({ @@ -28,7 +28,7 @@ export class ProfileState { } @Action(UpdateProfile) - profileUpdate({ patchState }: StateContext, { payload }: UpdateProfile) { + updateProfile({ patchState }: StateContext, { payload }: UpdateProfile) { return this.profileService.update(payload).pipe( tap(profile => patchState({ diff --git a/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts index c01064152e..a7bae167b1 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts @@ -2,7 +2,7 @@ import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spect import { Store } from '@ngxs/store'; import { ReplaySubject, timer, Subject, of } from 'rxjs'; import { Config } from '../models/config'; -import { ApplicationConfigurationService, ConfigService } from '../services'; +import { ApplicationConfigurationService, ConfigStateService } from '../services'; import { ConfigState } from '../states'; import { SetLanguage, PatchRouteByName } from '../actions'; @@ -110,14 +110,14 @@ export const CONFIG_STATE_DATA = { } as Config.State; describe('ConfigState', () => { - let spectator: SpectatorService; + let spectator: SpectatorService; let store: SpyObject; - let service: ConfigService; + let service: ConfigStateService; let state: ConfigState; let appConfigService: SpyObject; const createService = createServiceFactory({ - service: ConfigService, + service: ConfigStateService, mocks: [ApplicationConfigurationService, Store], }); diff --git a/npm/ng-packs/packages/core/src/lib/tests/profile.state.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/profile.state.spec.ts index 1ebdda217a..380ea53b1c 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/profile.state.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/profile.state.spec.ts @@ -42,7 +42,7 @@ describe('ProfileState', () => { const spy = jest.spyOn(profileService, 'get'); spy.mockReturnValue(of(mockData as any)); - state.profileGet({ patchState } as any).subscribe(); + state.getProfile({ patchState } as any).subscribe(); expect(patchedData).toEqual({ profile: mockData }); }); @@ -54,7 +54,7 @@ describe('ProfileState', () => { const spy = jest.spyOn(profileService, 'update'); spy.mockReturnValue(of(mockData as any)); - state.profileUpdate({ patchState } as any, { payload: mockData as any }).subscribe(); + state.updateProfile({ patchState } as any, { payload: mockData as any }).subscribe(); expect(patchedData).toEqual({ profile: mockData }); }); diff --git a/npm/ng-packs/packages/feature-management/package.json b/npm/ng-packs/packages/feature-management/package.json index ea73b52529..8d8252e1d9 100644 --- a/npm/ng-packs/packages/feature-management/package.json +++ b/npm/ng-packs/packages/feature-management/package.json @@ -1,8 +1,8 @@ { "name": "@abp/ng.feature-management", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.theme.shared": "^0.9.1" + "@abp/ng.theme.shared": "^0.9.2" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/feature-management/src/lib/services/feature-management-state.service.ts b/npm/ng-packs/packages/feature-management/src/lib/services/feature-management-state.service.ts new file mode 100644 index 0000000000..a40d0f6186 --- /dev/null +++ b/npm/ng-packs/packages/feature-management/src/lib/services/feature-management-state.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { Store } from '@ngxs/store'; +import { FeatureManagementState } from '../states'; + +@Injectable({ + providedIn: 'root', +}) +export class FeatureManagementStateService { + constructor(private store: Store) {} + + getFeatures() { + return this.store.selectSnapshot(FeatureManagementState.getFeatures); + } +} diff --git a/npm/ng-packs/packages/feature-management/src/lib/services/index.ts b/npm/ng-packs/packages/feature-management/src/lib/services/index.ts index 10fceceafe..1243410ea6 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/services/index.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/services/index.ts @@ -1 +1,2 @@ export * from './feature-management.service'; +export * from './feature-management-state.service'; diff --git a/npm/ng-packs/packages/identity-config/package.json b/npm/ng-packs/packages/identity-config/package.json index 0c1bfcc821..512aad55a4 100644 --- a/npm/ng-packs/packages/identity-config/package.json +++ b/npm/ng-packs/packages/identity-config/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.identity.config", - "version": "0.9.1", + "version": "0.9.2", "publishConfig": { "access": "public" } diff --git a/npm/ng-packs/packages/identity/package.json b/npm/ng-packs/packages/identity/package.json index 3bee487918..fbf8f8764f 100644 --- a/npm/ng-packs/packages/identity/package.json +++ b/npm/ng-packs/packages/identity/package.json @@ -1,10 +1,10 @@ { "name": "@abp/ng.identity", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { - "@abp/ng.theme.shared": "^0.9.1", - "@abp/ng.permission-management": "^0.9.1", - "@abp/ng.identity.config": "^0.9.1" + "@abp/ng.theme.shared": "^0.9.2", + "@abp/ng.permission-management": "^0.9.2", + "@abp/ng.identity.config": "^0.9.2" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html index 822c5a9576..887c16042c 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html +++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html @@ -23,7 +23,7 @@ /> - + @@ -65,7 +65,7 @@ - +
- + @@ -76,7 +76,7 @@
- +
- + @@ -68,7 +68,7 @@ - +