Browse Source

Merge remote-tracking branch 'abpframework/dev' into Translate

pull/1957/head
liangshiwei 7 years ago
parent
commit
c12f207b95
  1. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalizationModule.cs
  2. 2
      docs/en/Getting-Started-Angular-Template.md
  3. 2
      docs/en/Getting-Started-AspNetCore-Application.md
  4. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyModule.cs
  5. 4
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs
  6. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/CookieTenantResolveContributor.cs
  7. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HeaderTenantResolveContributor.cs
  8. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/QueryStringTenantResolveContributor.cs
  9. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/RouteTenantResolveContributor.cs
  10. 4
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/TenantResolveContextExtensions.cs
  11. 4
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs
  12. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs
  13. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs
  14. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs
  15. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlingOptions.cs
  16. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs
  17. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs
  18. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs
  19. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs
  20. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/AbpAspNetCoreMvcUiMultiTenancyModule.cs
  21. 43
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerScriptContributor.cs
  22. 13
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerStyleContributor.cs
  23. 3
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FontAwesome/FontAwesomeStyleContributor.cs
  24. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs
  25. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml
  26. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/AbpAspNetCoreMvcUiThemeSharedModule.cs
  27. 3
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs
  28. 3
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs
  29. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/AbpToolbarOptions.cs
  30. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs
  31. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpAspNetCoreMvcUiWidgetsModule.cs
  32. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs
  33. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpWidgetOptions.cs
  34. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetScripts/WidgetScriptsViewComponent.cs
  35. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/Components/WidgetStyles/WidgetStylesViewComponent.cs
  36. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs
  37. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs
  38. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/AbpLayoutHookOptions.cs
  39. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs
  40. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs
  41. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/DefaultThemeSelector.cs
  42. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs
  43. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcOptions.cs
  44. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs
  45. 6
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs
  46. 8
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs
  47. 7
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs
  48. 1
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
  49. 33
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs
  50. 4
      framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs
  51. 18
      framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs
  52. 5
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs
  53. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHttpStatusCodeOptions.cs
  54. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs
  55. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs
  56. 6
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs
  57. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AspNetCoreCorrelationIdProvider.cs
  58. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs
  59. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs
  60. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs
  61. 13
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs
  62. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AbpPermissionOptions.cs
  63. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs
  64. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinitionManager.cs
  65. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs
  66. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs
  67. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs
  68. 4
      framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs
  69. 2
      framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs
  70. 4
      framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs
  71. 4
      framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs
  72. 4
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs
  73. 22
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs
  74. 4
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs
  75. 4
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs
  76. 2
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs
  77. 8
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs
  78. 2
      framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkerOptions.cs
  79. 4
      framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkersModule.cs
  80. 3
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs
  81. 17
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpDistributedCacheOptions.cs
  82. 179
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs
  83. 10
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCacheOptions.cs
  84. 33
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/IDistributedCache.cs
  85. 8
      framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj
  86. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs
  87. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliOptions.cs
  88. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AbpCommandLineOptions.cs
  89. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs
  90. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs
  91. 10
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs
  92. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs
  93. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs
  94. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ModuleProjectBuilder.cs
  95. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs
  96. 4
      framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj
  97. 7
      framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/AbpConfigurationBuilderOptions.cs
  98. 14
      framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs
  99. 13
      framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs
  100. 1
      framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj

4
abp_io/AbpIoLocalization/AbpIoLocalization/AbpIoLocalizationModule.cs

@ -19,12 +19,12 @@ namespace AbpIoLocalization
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpIoLocalizationModule>("AbpIoLocalization"); options.FileSets.AddEmbedded<AbpIoLocalizationModule>("AbpIoLocalization");
}); });
Configure<ExceptionLocalizationOptions>(options => Configure<AbpExceptionLocalizationOptions>(options =>
{ {
options.MapCodeNamespace("Volo.AbpIo.Commercial", typeof(AbpIoCommercialResource)); options.MapCodeNamespace("Volo.AbpIo.Commercial", typeof(AbpIoCommercialResource));
options.MapCodeNamespace("Volo.AbpIo.Domain", typeof(AbpIoBaseResource)); options.MapCodeNamespace("Volo.AbpIo.Domain", typeof(AbpIoBaseResource));

2
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 #### 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) ![set-as-startup-project](images/set-as-startup-project.png)

2
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 ````csharp
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;

2
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) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<TenantResolveOptions>(options => Configure<AbpTenantResolveOptions>(options =>
{ {
options.TenantResolvers.Add(new QueryStringTenantResolveContributor()); options.TenantResolvers.Add(new QueryStringTenantResolveContributor());
options.TenantResolvers.Add(new RouteTenantResolveContributor()); options.TenantResolvers.Add(new RouteTenantResolveContributor());

4
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyOptions.cs → framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs

@ -2,14 +2,14 @@
namespace Volo.Abp.AspNetCore.MultiTenancy namespace Volo.Abp.AspNetCore.MultiTenancy
{ {
public class AspNetCoreMultiTenancyOptions public class AbpAspNetCoreMultiTenancyOptions
{ {
/// <summary> /// <summary>
/// Default: <see cref="TenantResolverConsts.DefaultTenantKey"/>. /// Default: <see cref="TenantResolverConsts.DefaultTenantKey"/>.
/// </summary> /// </summary>
public string TenantKey { get; set; } public string TenantKey { get; set; }
public AspNetCoreMultiTenancyOptions() public AbpAspNetCoreMultiTenancyOptions()
{ {
TenantKey = TenantResolverConsts.DefaultTenantKey; TenantKey = TenantResolverConsts.DefaultTenantKey;
} }

2
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) protected override string GetTenantIdOrNameFromHttpContextOrNull(ITenantResolveContext context, HttpContext httpContext)
{ {
return httpContext.Request?.Cookies[context.GetAspNetCoreMultiTenancyOptions().TenantKey]; return httpContext.Request?.Cookies[context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey];
} }
} }
} }

2
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HeaderTenantResolveContributor.cs

@ -20,7 +20,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
return null; return null;
} }
var tenantIdKey = context.GetAspNetCoreMultiTenancyOptions().TenantKey; var tenantIdKey = context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey;
var tenantIdHeader = httpContext.Request.Headers[tenantIdKey]; var tenantIdHeader = httpContext.Request.Headers[tenantIdKey];
if (tenantIdHeader == string.Empty || tenantIdHeader.Count < 1) if (tenantIdHeader == string.Empty || tenantIdHeader.Count < 1)

2
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/QueryStringTenantResolveContributor.cs

@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
return null; return null;
} }
return httpContext.Request.Query[context.GetAspNetCoreMultiTenancyOptions().TenantKey]; return httpContext.Request.Query[context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey];
} }
} }
} }

2
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) 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) if (tenantId == null)
{ {
return null; return null;

4
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 class TenantResolveContextExtensions
{ {
public static AspNetCoreMultiTenancyOptions GetAspNetCoreMultiTenancyOptions(this ITenantResolveContext context) public static AbpAspNetCoreMultiTenancyOptions GetAbpAspNetCoreMultiTenancyOptions(this ITenantResolveContext context)
{ {
return context.ServiceProvider.GetRequiredService<IOptionsSnapshot<AspNetCoreMultiTenancyOptions>>().Value; return context.ServiceProvider.GetRequiredService<IOptionsSnapshot<AbpAspNetCoreMultiTenancyOptions>>().Value;
} }
} }
} }

4
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs

@ -3,9 +3,9 @@ using Volo.Abp.AspNetCore.MultiTenancy;
namespace Volo.Abp.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( options.TenantResolvers.InsertAfter(
r => r is CurrentUserTenantResolveContributor, r => r is CurrentUserTenantResolveContributor,

2
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) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiBootstrapModule>("Volo.Abp.AspNetCore.Mvc.UI.Bootstrap"); options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiBootstrapModule>("Volo.Abp.AspNetCore.Mvc.UI.Bootstrap");
}); });

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleContributorOptions.cs → 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 namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
{ {
public class BundleContributorOptions public class AbpBundleContributorOptions
{ {
public ConcurrentDictionary<Type, BundleContributorCollection> AllExtensions { get; } public ConcurrentDictionary<Type, BundleContributorCollection> AllExtensions { get; }
public BundleContributorOptions() public AbpBundleContributorOptions()
{ {
AllExtensions = new ConcurrentDictionary<Type, BundleContributorCollection>(); AllExtensions = new ConcurrentDictionary<Type, BundleContributorCollection>();
} }

8
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<BundleManager> Logger { get; set; } public ILogger<BundleManager> Logger { get; set; }
protected readonly BundlingOptions Options; protected readonly AbpBundlingOptions Options;
protected readonly BundleContributorOptions ContributorOptions; protected readonly AbpBundleContributorOptions ContributorOptions;
protected readonly IWebContentFileProvider WebContentFileProvider; protected readonly IWebContentFileProvider WebContentFileProvider;
protected readonly IWebHostEnvironment HostingEnvironment; protected readonly IWebHostEnvironment HostingEnvironment;
protected readonly IScriptBundler ScriptBundler; protected readonly IScriptBundler ScriptBundler;
@ -33,8 +33,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
protected readonly IWebRequestResources RequestResources; protected readonly IWebRequestResources RequestResources;
public BundleManager( public BundleManager(
IOptions<BundlingOptions> options, IOptions<AbpBundlingOptions> options,
IOptions<BundleContributorOptions> contributorOptions, IOptions<AbpBundleContributorOptions> contributorOptions,
IScriptBundler scriptBundler, IScriptBundler scriptBundler,
IStyleBundler styleBundler, IStyleBundler styleBundler,
IWebHostEnvironment hostingEnvironment, IWebHostEnvironment hostingEnvironment,

4
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 namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
{ {
public class BundlingOptions public class AbpBundlingOptions
{ {
public BundleConfigurationCollection StyleBundles { get; set; } public BundleConfigurationCollection StyleBundles { get; set; }
@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
/// </summary> /// </summary>
public BundlingMode Mode { get; set; } = BundlingMode.Auto; public BundlingMode Mode { get; set; } = BundlingMode.Auto;
public BundlingOptions() public AbpBundlingOptions()
{ {
StyleBundles = new BundleConfigurationCollection(); StyleBundles = new BundleConfigurationCollection();
ScriptBundles = new BundleConfigurationCollection(); ScriptBundles = new BundleConfigurationCollection();

4
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 IBundleManager BundleManager { get; }
protected IWebContentFileProvider WebContentFileProvider { get; } protected IWebContentFileProvider WebContentFileProvider { get; }
protected IWebHostEnvironment HostingEnvironment { get; } protected IWebHostEnvironment HostingEnvironment { get; }
protected readonly BundlingOptions Options; protected readonly AbpBundlingOptions Options;
protected AbpTagHelperResourceService( protected AbpTagHelperResourceService(
IBundleManager bundleManager, IBundleManager bundleManager,
IWebContentFileProvider webContentFileProvider, IWebContentFileProvider webContentFileProvider,
IOptions<BundlingOptions> options, IOptions<AbpBundlingOptions> options,
IWebHostEnvironment hostingEnvironment) IWebHostEnvironment hostingEnvironment)
{ {
BundleManager = bundleManager; BundleManager = bundleManager;

2
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( public AbpTagHelperScriptService(
IBundleManager bundleManager, IBundleManager bundleManager,
IWebContentFileProvider webContentFileProvider, IWebContentFileProvider webContentFileProvider,
IOptions<BundlingOptions> options, IOptions<AbpBundlingOptions> options,
IWebHostEnvironment hostingEnvironment IWebHostEnvironment hostingEnvironment
) : base( ) : base(
bundleManager, bundleManager,

2
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( public AbpTagHelperStyleService(
IBundleManager bundleManager, IBundleManager bundleManager,
IWebContentFileProvider webContentFileProvider, IWebContentFileProvider webContentFileProvider,
IOptions<BundlingOptions> options, IOptions<AbpBundlingOptions> options,
IWebHostEnvironment hostingEnvironment IWebHostEnvironment hostingEnvironment
) : base( ) : base(
bundleManager, bundleManager,

4
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; } public TenantInfoModel Input { get; set; }
protected ITenantStore TenantStore { get; } protected ITenantStore TenantStore { get; }
protected AspNetCoreMultiTenancyOptions Options { get; } protected AbpAspNetCoreMultiTenancyOptions Options { get; }
public TenantSwitchModalModel( public TenantSwitchModalModel(
ITenantStore tenantStore, ITenantStore tenantStore,
IOptions<AspNetCoreMultiTenancyOptions> options) IOptions<AbpAspNetCoreMultiTenancyOptions> options)
{ {
TenantStore = tenantStore; TenantStore = tenantStore;
Options = options.Value; Options = options.Value;

4
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) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiMultiTenancyModule>(); options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiMultiTenancyModule>();
}); });
@ -47,7 +47,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy
.AddVirtualJson("/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization"); .AddVirtualJson("/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization");
}); });
Configure<BundlingOptions>(options => Configure<AbpBundlingOptions>(options =>
{ {
options.ScriptBundles options.ScriptBundles
.Get(StandardBundles.Scripts.Global) .Get(StandardBundles.Scripts.Global)

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

13
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");
}
}
}

3
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) 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");
} }
} }
} }

8
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) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<ThemingOptions>(options => Configure<AbpThemingOptions>(options =>
{ {
options.Themes.Add<BasicTheme>(); options.Themes.Add<BasicTheme>();
@ -38,17 +38,17 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic
} }
}); });
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiBasicThemeModule>("Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic"); options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiBasicThemeModule>("Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic");
}); });
Configure<ToolbarOptions>(options => Configure<AbpToolbarOptions>(options =>
{ {
options.Contributors.Add(new BasicThemeMainTopToolbarContributor()); options.Contributors.Add(new BasicThemeMainTopToolbarContributor());
}); });
Configure<BundlingOptions>(options => Configure<AbpBundlingOptions>(options =>
{ {
options options
.StyleBundles .StyleBundles

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml

@ -14,7 +14,7 @@
@using Volo.Abp.MultiTenancy @using Volo.Abp.MultiTenancy
@inject IAbpAntiForgeryManager AbpAntiForgeryManager @inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IBrandingProvider BrandingProvider @inject IBrandingProvider BrandingProvider
@inject IOptions<MultiTenancyOptions> MultiTenancyOptions @inject IOptions<AbpMultiTenancyOptions> MultiTenancyOptions
@inject ICurrentTenant CurrentTenant @inject ICurrentTenant CurrentTenant
@inject IStringLocalizer<AbpUiMultiTenancyResource> MultiTenancyStringLocalizer @inject IStringLocalizer<AbpUiMultiTenancyResource> MultiTenancyStringLocalizer
@inject ITenantResolveResultAccessor TenantResolveResultAccessor @inject ITenantResolveResultAccessor TenantResolveResultAccessor

4
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) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiThemeSharedModule>("Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared"); options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiThemeSharedModule>("Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared");
}); });
Configure<BundlingOptions>(options => Configure<AbpBundlingOptions>(options =>
{ {
options options
.StyleBundles .StyleBundles

3
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(ToastrScriptBundleContributor),
typeof(MalihuCustomScrollbarPluginScriptBundleContributor), typeof(MalihuCustomScrollbarPluginScriptBundleContributor),
typeof(LuxonScriptContributor), typeof(LuxonScriptContributor),
typeof(TimeagoScriptContributor) typeof(TimeagoScriptContributor),
typeof(BootstrapDatepickerScriptContributor)
)] )]
public class SharedThemeGlobalScriptContributor : BundleContributor public class SharedThemeGlobalScriptContributor : BundleContributor
{ {

3
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(ToastrStyleBundleContributor),
typeof(Select2StyleContributor), typeof(Select2StyleContributor),
typeof(MalihuCustomScrollbarPluginStyleBundleContributor), typeof(MalihuCustomScrollbarPluginStyleBundleContributor),
typeof(DatatablesNetBs4StyleContributor) typeof(DatatablesNetBs4StyleContributor),
typeof(BootstrapDatepickerStyleContributor)
)] )]
public class SharedThemeGlobalStyleContributor : BundleContributor public class SharedThemeGlobalStyleContributor : BundleContributor
{ {

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarOptions.cs → 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 namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars
{ {
public class ToolbarOptions public class AbpToolbarOptions
{ {
[NotNull] [NotNull]
public List<IToolbarContributor> Contributors { get; } public List<IToolbarContributor> Contributors { get; }
public ToolbarOptions() public AbpToolbarOptions()
{ {
Contributors = new List<IToolbarContributor>(); Contributors = new List<IToolbarContributor>();
} }

4
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 public class ToolbarManager : IToolbarManager, ITransientDependency
{ {
protected IThemeManager ThemeManager { get; } protected IThemeManager ThemeManager { get; }
protected ToolbarOptions Options { get; } protected AbpToolbarOptions Options { get; }
protected IServiceProvider ServiceProvider { get; } protected IServiceProvider ServiceProvider { get; }
public ToolbarManager( public ToolbarManager(
IOptions<ToolbarOptions> options, IOptions<AbpToolbarOptions> options,
IServiceProvider serviceProvider, IServiceProvider serviceProvider,
IThemeManager themeManager) IThemeManager themeManager)
{ {

4
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<DefaultViewComponentHelper>(); context.Services.AddTransient<DefaultViewComponentHelper>();
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiWidgetsModule>(); options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiWidgetsModule>();
}); });
@ -47,7 +47,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
} }
}); });
services.Configure<WidgetOptions>(options => services.Configure<AbpWidgetOptions>(options =>
{ {
foreach (var widgetType in widgetTypes) foreach (var widgetType in widgetTypes)
{ {

4
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)] [Dependency(ReplaceServices = true)]
public class AbpViewComponentHelper : IViewComponentHelper, IViewContextAware, ITransientDependency public class AbpViewComponentHelper : IViewComponentHelper, IViewContextAware, ITransientDependency
{ {
protected WidgetOptions Options { get; } protected AbpWidgetOptions Options { get; }
protected IPageWidgetManager PageWidgetManager { get; } protected IPageWidgetManager PageWidgetManager { get; }
protected DefaultViewComponentHelper DefaultViewComponentHelper { get; } protected DefaultViewComponentHelper DefaultViewComponentHelper { get; }
public AbpViewComponentHelper( public AbpViewComponentHelper(
DefaultViewComponentHelper defaultViewComponentHelper, DefaultViewComponentHelper defaultViewComponentHelper,
IOptions<WidgetOptions> widgetOptions, IOptions<AbpWidgetOptions> widgetOptions,
IPageWidgetManager pageWidgetManager) IPageWidgetManager pageWidgetManager)
{ {
DefaultViewComponentHelper = defaultViewComponentHelper; DefaultViewComponentHelper = defaultViewComponentHelper;

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetOptions.cs → 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 namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
{ {
public class WidgetOptions public class AbpWidgetOptions
{ {
public WidgetDefinitionCollection Widgets { get; } public WidgetDefinitionCollection Widgets { get; }
public WidgetOptions() public AbpWidgetOptions()
{ {
Widgets = new WidgetDefinitionCollection(); Widgets = new WidgetDefinitionCollection();
} }

4
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 public class WidgetScriptsViewComponent : AbpViewComponent
{ {
protected IPageWidgetManager PageWidgetManager { get; } protected IPageWidgetManager PageWidgetManager { get; }
protected WidgetOptions Options { get; } protected AbpWidgetOptions Options { get; }
public WidgetScriptsViewComponent( public WidgetScriptsViewComponent(
IPageWidgetManager pageWidgetManager, IPageWidgetManager pageWidgetManager,
IOptions<WidgetOptions> options) IOptions<AbpWidgetOptions> options)
{ {
PageWidgetManager = pageWidgetManager; PageWidgetManager = pageWidgetManager;
Options = options.Value; Options = options.Value;

4
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 public class WidgetStylesViewComponent : AbpViewComponent
{ {
protected IPageWidgetManager PageWidgetManager { get; } protected IPageWidgetManager PageWidgetManager { get; }
protected WidgetOptions Options { get; } protected AbpWidgetOptions Options { get; }
public WidgetStylesViewComponent( public WidgetStylesViewComponent(
IPageWidgetManager pageWidgetManager, IPageWidgetManager pageWidgetManager,
IOptions<WidgetOptions> options) IOptions<AbpWidgetOptions> options)
{ {
PageWidgetManager = pageWidgetManager; PageWidgetManager = pageWidgetManager;
Options = options.Value; Options = options.Value;

4
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 public class WidgetManager : IWidgetManager
{ {
protected WidgetOptions Options { get; } protected AbpWidgetOptions Options { get; }
protected IAuthorizationService AuthorizationService { get; } protected IAuthorizationService AuthorizationService { get; }
protected ICurrentUser CurrentUser { get; } protected ICurrentUser CurrentUser { get; }
public WidgetManager( public WidgetManager(
IOptions<WidgetOptions> widgetOptions, IOptions<AbpWidgetOptions> widgetOptions,
IAuthorizationService authorizationService, IAuthorizationService authorizationService,
ICurrentUser currentUser) ICurrentUser currentUser)
{ {

2
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) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<VirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiModule>(); options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiModule>();
}); });

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs → 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 namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
{ {
public class LayoutHookOptions public class AbpLayoutHookOptions
{ {
public IDictionary<string, List<LayoutHookInfo>> Hooks { get; } public IDictionary<string, List<LayoutHookInfo>> Hooks { get; }
public LayoutHookOptions() public AbpLayoutHookOptions()
{ {
Hooks = new Dictionary<string, List<LayoutHookInfo>>(); Hooks = new Dictionary<string, List<LayoutHookInfo>>();
} }
public LayoutHookOptions Add(string name, Type componentType, string layout = null) public AbpLayoutHookOptions Add(string name, Type componentType, string layout = null)
{ {
Hooks Hooks
.GetOrAdd(name, () => new List<LayoutHookInfo>()) .GetOrAdd(name, () => new List<LayoutHookInfo>())

4
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 public class LayoutHookViewComponent : AbpViewComponent
{ {
protected LayoutHookOptions Options { get; } protected AbpLayoutHookOptions Options { get; }
public LayoutHookViewComponent(IOptions<LayoutHookOptions> options) public LayoutHookViewComponent(IOptions<AbpLayoutHookOptions> options)
{ {
Options = options.Value; Options = options.Value;
} }

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/ThemingOptions.cs → 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 namespace Volo.Abp.AspNetCore.Mvc.UI.Theming
{ {
public class ThemingOptions public class AbpThemingOptions
{ {
public ThemeDictionary Themes { get; } public ThemeDictionary Themes { get; }
public string DefaultThemeName { get; set; } public string DefaultThemeName { get; set; }
public ThemingOptions() public AbpThemingOptions()
{ {
Themes = new ThemeDictionary(); Themes = new ThemeDictionary();
} }

6
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 public class DefaultThemeSelector : IThemeSelector, ITransientDependency
{ {
protected ThemingOptions Options { get; } protected AbpThemingOptions Options { get; }
public DefaultThemeSelector(IOptions<ThemingOptions> options) public DefaultThemeSelector(IOptions<AbpThemingOptions> options)
{ {
Options = options.Value; Options = options.Value;
} }
@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theming
{ {
if (!Options.Themes.Any()) 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) if (Options.DefaultThemeName == null)

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs

@ -57,7 +57,7 @@ namespace Volo.Abp.AspNetCore.Mvc
) )
); );
Configure<ApiDescriptionModelOptions>(options => Configure<AbpApiDescriptionModelOptions>(options =>
{ {
options.IgnoredInterfaces.AddIfNotContains(typeof(IAsyncActionFilter)); options.IgnoredInterfaces.AddIfNotContains(typeof(IAsyncActionFilter));
options.IgnoredInterfaces.AddIfNotContains(typeof(IFilterMetadata)); options.IgnoredInterfaces.AddIfNotContains(typeof(IFilterMetadata));

4
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 class AbpAspNetCoreMvcOptions
{ {
public ConventionalControllerOptions ConventionalControllers { get; } public AbpConventionalControllerOptions ConventionalControllers { get; }
public AbpAspNetCoreMvcOptions() public AbpAspNetCoreMvcOptions()
{ {
ConventionalControllers = new ConventionalControllerOptions(); ConventionalControllers = new AbpConventionalControllerOptions();
} }
} }
} }

4
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 IApiDescriptionGroupCollectionProvider _descriptionProvider;
private readonly AbpAspNetCoreMvcOptions _options; private readonly AbpAspNetCoreMvcOptions _options;
private readonly ApiDescriptionModelOptions _modelOptions; private readonly AbpApiDescriptionModelOptions _modelOptions;
public AspNetCoreApiDescriptionModelProvider( public AspNetCoreApiDescriptionModelProvider(
IApiDescriptionGroupCollectionProvider descriptionProvider, IApiDescriptionGroupCollectionProvider descriptionProvider,
IOptions<AbpAspNetCoreMvcOptions> options, IOptions<AbpAspNetCoreMvcOptions> options,
IOptions<ApiDescriptionModelOptions> modelOptions) IOptions<AbpApiDescriptionModelOptions> modelOptions)
{ {
_descriptionProvider = descriptionProvider; _descriptionProvider = descriptionProvider;
_options = options.Value; _options = options.Value;

6
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalControllerOptions.cs → 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 namespace Volo.Abp.AspNetCore.Mvc.Conventions
{ {
public class ConventionalControllerOptions public class AbpConventionalControllerOptions
{ {
public ConventionalControllerSettingList ConventionalControllerSettings { get; } public ConventionalControllerSettingList ConventionalControllerSettings { get; }
public List<Type> FormBodyBindingIgnoredTypes { get; } public List<Type> FormBodyBindingIgnoredTypes { get; }
public ConventionalControllerOptions() public AbpConventionalControllerOptions()
{ {
ConventionalControllerSettings = new ConventionalControllerSettingList(); ConventionalControllerSettings = new ConventionalControllerSettingList();
@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions
}; };
} }
public ConventionalControllerOptions Create(Assembly assembly, [CanBeNull] Action<ConventionalControllerSetting> optionsAction = null) public AbpConventionalControllerOptions Create(Assembly assembly, [CanBeNull] Action<ConventionalControllerSetting> optionsAction = null)
{ {
var setting = new ConventionalControllerSetting(assembly, ModuleApiDescriptionModel.DefaultRootPath); var setting = new ConventionalControllerSetting(assembly, ModuleApiDescriptionModel.DefaultRootPath);
optionsAction?.Invoke(setting); optionsAction?.Invoke(setting);

8
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 public class AbpUowActionFilter : IAsyncActionFilter, ITransientDependency
{ {
private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly UnitOfWorkDefaultOptions _defaultOptions; private readonly AbpUnitOfWorkDefaultOptions _defaultOptions;
public AbpUowActionFilter(IUnitOfWorkManager unitOfWorkManager, IOptions<UnitOfWorkDefaultOptions> options) public AbpUowActionFilter(IUnitOfWorkManager unitOfWorkManager, IOptions<AbpUnitOfWorkDefaultOptions> options)
{ {
_unitOfWorkManager = unitOfWorkManager; _unitOfWorkManager = unitOfWorkManager;
_defaultOptions = options.Value; _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); unitOfWorkAttribute?.SetOptions(options);

7
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs

@ -26,11 +26,8 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation
return; return;
} }
using (AbpCrossCuttingConcerns.Applying(context.Controller, AbpCrossCuttingConcerns.Validation)) _validator.Validate(context.ModelState);
{ await next();
_validator.Validate(context.ModelState);
await next();
}
} }
} }
} }

1
framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj

@ -19,6 +19,7 @@
<ProjectReference Include="..\Volo.Abp.AspNetCore\Volo.Abp.AspNetCore.csproj" /> <ProjectReference Include="..\Volo.Abp.AspNetCore\Volo.Abp.AspNetCore.csproj" />
<ProjectReference Include="..\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" /> <ProjectReference Include="..\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" />
<ProjectReference Include="..\Volo.Abp.TestBase\Volo.Abp.TestBase.csproj" /> <ProjectReference Include="..\Volo.Abp.TestBase\Volo.Abp.TestBase.csproj" />
<ProjectReference Include="..\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

33
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.Linq;
using System.Net.Http; using System.Net.Http;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.TestHost; using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Volo.Abp.AspNetCore.TestBase namespace Volo.Abp.AspNetCore.TestBase
{ {
@ -20,31 +22,36 @@ namespace Volo.Abp.AspNetCore.TestBase
protected AbpAspNetCoreIntegratedTestBase() protected AbpAspNetCoreIntegratedTestBase()
{ {
var builder = CreateWebHostBuilder(); var builder = CreateHostBuilder();
Server = CreateTestServer(builder);
Client = Server.CreateClient(); var host = builder.Build();
ServiceProvider = Server.Host.Services; host.Start();
Server = host.GetTestServer();
Client = host.GetTestClient();
ServiceProvider = Server.Services;
ServiceProvider.GetRequiredService<ITestServerAccessor>().Server = Server; ServiceProvider.GetRequiredService<ITestServerAccessor>().Server = Server;
} }
protected virtual IWebHostBuilder CreateWebHostBuilder() protected virtual IHostBuilder CreateHostBuilder()
{ {
return new WebHostBuilder() return Host.CreateDefaultBuilder()
.UseStartup<TStartup>() .ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<TStartup>();
webBuilder.UseTestServer();
})
.UseAutofac()
.ConfigureServices(ConfigureServices); .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 #region GetUrl
/// <summary> /// <summary>

4
framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs

@ -7,9 +7,9 @@ namespace Microsoft.AspNetCore.Hosting
{ {
public static IConfigurationRoot BuildConfiguration( public static IConfigurationRoot BuildConfiguration(
this IWebHostEnvironment env, this IWebHostEnvironment env,
ConfigurationBuilderOptions options = null) AbpConfigurationBuilderOptions options = null)
{ {
options = options ?? new ConfigurationBuilderOptions(); options = options ?? new AbpConfigurationBuilderOptions();
if (options.BasePath.IsNullOrEmpty()) if (options.BasePath.IsNullOrEmpty())
{ {

18
framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs

@ -1,6 +1,4 @@
using System; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
namespace Microsoft.Extensions.DependencyInjection namespace Microsoft.Extensions.DependencyInjection
{ {
@ -10,19 +8,5 @@ namespace Microsoft.Extensions.DependencyInjection
{ {
return services.GetSingletonInstance<IWebHostEnvironment>(); return services.GetSingletonInstance<IWebHostEnvironment>();
} }
[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;
}
} }
} }

5
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/AbpAspNetCoreModule.cs

@ -29,11 +29,6 @@ namespace Volo.Abp.AspNetCore
)] )]
public class AbpAspNetCoreModule : AbpModule public class AbpAspNetCoreModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddConfiguration();
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<AbpAuditingOptions>(options => Configure<AbpAuditingOptions>(options =>

4
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/ExceptionHttpStatusCodeOptions.cs → framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHttpStatusCodeOptions.cs

@ -3,11 +3,11 @@ using System.Net;
namespace Volo.Abp.AspNetCore.ExceptionHandling namespace Volo.Abp.AspNetCore.ExceptionHandling
{ {
public class ExceptionHttpStatusCodeOptions public class AbpExceptionHttpStatusCodeOptions
{ {
public IDictionary<string, HttpStatusCode> ErrorCodeToHttpStatusCodeMappings { get; } public IDictionary<string, HttpStatusCode> ErrorCodeToHttpStatusCodeMappings { get; }
public ExceptionHttpStatusCodeOptions() public AbpExceptionHttpStatusCodeOptions()
{ {
ErrorCodeToHttpStatusCodeMappings = new Dictionary<string, HttpStatusCode>(); ErrorCodeToHttpStatusCodeMappings = new Dictionary<string, HttpStatusCode>();
} }

4
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; public bool SendAllExceptionsToClients { get; set; } = false;
protected ExceptionLocalizationOptions LocalizationOptions { get; } protected AbpExceptionLocalizationOptions LocalizationOptions { get; }
protected IStringLocalizerFactory StringLocalizerFactory { get; } protected IStringLocalizerFactory StringLocalizerFactory { get; }
protected IStringLocalizer<AbpUiResource> L { get; } protected IStringLocalizer<AbpUiResource> L { get; }
protected IServiceProvider ServiceProvider { get; } protected IServiceProvider ServiceProvider { get; }
public DefaultExceptionToErrorInfoConverter( public DefaultExceptionToErrorInfoConverter(
IOptions<ExceptionLocalizationOptions> localizationOptions, IOptions<AbpExceptionLocalizationOptions> localizationOptions,
IStringLocalizerFactory stringLocalizerFactory, IStringLocalizerFactory stringLocalizerFactory,
IStringLocalizer<AbpUiResource> abpUiStringLocalizer, IStringLocalizer<AbpUiResource> abpUiStringLocalizer,
IServiceProvider serviceProvider) IServiceProvider serviceProvider)

4
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 public class DefaultHttpExceptionStatusCodeFinder : IHttpExceptionStatusCodeFinder, ITransientDependency
{ {
protected ExceptionHttpStatusCodeOptions Options { get; } protected AbpExceptionHttpStatusCodeOptions Options { get; }
public DefaultHttpExceptionStatusCodeFinder( public DefaultHttpExceptionStatusCodeFinder(
IOptions<ExceptionHttpStatusCodeOptions> options) IOptions<AbpExceptionHttpStatusCodeOptions> options)
{ {
Options = options.Value; Options = options.Value;
} }

6
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 public class AbpCorrelationIdMiddleware : IMiddleware, ITransientDependency
{ {
private readonly CorrelationIdOptions _options; private readonly AbpCorrelationIdOptions _options;
private readonly ICorrelationIdProvider _correlationIdProvider; private readonly ICorrelationIdProvider _correlationIdProvider;
public AbpCorrelationIdMiddleware(IOptions<CorrelationIdOptions> options, public AbpCorrelationIdMiddleware(IOptions<AbpCorrelationIdOptions> options,
ICorrelationIdProvider correlationIdProvider) ICorrelationIdProvider correlationIdProvider)
{ {
_options = options.Value; _options = options.Value;
@ -34,7 +34,7 @@ namespace Volo.Abp.AspNetCore.Tracing
protected virtual void CheckAndSetCorrelationIdOnResponse( protected virtual void CheckAndSetCorrelationIdOnResponse(
HttpContext httpContext, HttpContext httpContext,
CorrelationIdOptions options, AbpCorrelationIdOptions options,
string correlationId) string correlationId)
{ {
if (httpContext.Response.HasStarted) if (httpContext.Response.HasStarted)

4
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 public class AspNetCoreCorrelationIdProvider : ICorrelationIdProvider, ITransientDependency
{ {
protected IHttpContextAccessor HttpContextAccessor { get; } protected IHttpContextAccessor HttpContextAccessor { get; }
protected CorrelationIdOptions Options { get; } protected AbpCorrelationIdOptions Options { get; }
public AspNetCoreCorrelationIdProvider( public AspNetCoreCorrelationIdProvider(
IHttpContextAccessor httpContextAccessor, IHttpContextAccessor httpContextAccessor,
IOptions<CorrelationIdOptions> options) IOptions<AbpCorrelationIdOptions> options)
{ {
HttpContextAccessor = httpContextAccessor; HttpContextAccessor = httpContextAccessor;
Options = options.Value; Options = options.Value;

4
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreContentOptions.cs → framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs

@ -2,12 +2,12 @@
namespace Volo.Abp.AspNetCore.VirtualFileSystem namespace Volo.Abp.AspNetCore.VirtualFileSystem
{ {
public class AspNetCoreContentOptions public class AbpAspNetCoreContentOptions
{ {
public List<string> AllowedExtraWebContentFolders { get; } public List<string> AllowedExtraWebContentFolders { get; }
public List<string> AllowedExtraWebContentFileExtensions { get; } public List<string> AllowedExtraWebContentFileExtensions { get; }
public AspNetCoreContentOptions() public AbpAspNetCoreContentOptions()
{ {
AllowedExtraWebContentFolders = new List<string> AllowedExtraWebContentFolders = new List<string>
{ {

4
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 readonly IWebHostEnvironment _hostingEnvironment;
private string _rootPath = "/wwwroot"; //TODO: How to handle wwwroot naming? private string _rootPath = "/wwwroot"; //TODO: How to handle wwwroot naming?
protected AspNetCoreContentOptions Options { get; } protected AbpAspNetCoreContentOptions Options { get; }
public WebContentFileProvider( public WebContentFileProvider(
IVirtualFileProvider virtualFileProvider, IVirtualFileProvider virtualFileProvider,
IWebHostEnvironment hostingEnvironment, IWebHostEnvironment hostingEnvironment,
IOptions<AspNetCoreContentOptions> options) IOptions<AbpAspNetCoreContentOptions> options)
{ {
_virtualFileProvider = virtualFileProvider; _virtualFileProvider = virtualFileProvider;
_hostingEnvironment = hostingEnvironment; _hostingEnvironment = hostingEnvironment;

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs

@ -29,7 +29,7 @@ namespace Volo.Abp.Authorization
context.Services.AddSingleton<IAuthorizationHandler, PermissionRequirementHandler>(); context.Services.AddSingleton<IAuthorizationHandler, PermissionRequirementHandler>();
Configure<PermissionOptions>(options => Configure<AbpPermissionOptions>(options =>
{ {
options.ValueProviders.Add<UserPermissionValueProvider>(); options.ValueProviders.Add<UserPermissionValueProvider>();
options.ValueProviders.Add<RolePermissionValueProvider>(); options.ValueProviders.Add<RolePermissionValueProvider>();
@ -49,7 +49,7 @@ namespace Volo.Abp.Authorization
} }
}); });
services.Configure<PermissionOptions>(options => services.Configure<AbpPermissionOptions>(options =>
{ {
options.DefinitionProviders.AddIfNotContains(definitionProviders); options.DefinitionProviders.AddIfNotContains(definitionProviders);
}); });

13
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs

@ -1,5 +1,4 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Aspects;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.DynamicProxy; using Volo.Abp.DynamicProxy;
using Volo.Abp.Threading; using Volo.Abp.Threading;
@ -17,24 +16,12 @@ namespace Volo.Abp.Authorization
public override void Intercept(IAbpMethodInvocation invocation) public override void Intercept(IAbpMethodInvocation invocation)
{ {
if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.Authorization))
{
invocation.Proceed();
return;
}
AsyncHelper.RunSync(() => AuthorizeAsync(invocation)); AsyncHelper.RunSync(() => AuthorizeAsync(invocation));
invocation.Proceed(); invocation.Proceed();
} }
public override async Task InterceptAsync(IAbpMethodInvocation invocation) public override async Task InterceptAsync(IAbpMethodInvocation invocation)
{ {
if (AbpCrossCuttingConcerns.IsApplied(invocation.TargetObject, AbpCrossCuttingConcerns.Authorization))
{
await invocation.ProceedAsync();
return;
}
await AuthorizeAsync(invocation); await AuthorizeAsync(invocation);
await invocation.ProceedAsync(); await invocation.ProceedAsync();
} }

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionOptions.cs → framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AbpPermissionOptions.cs

@ -2,13 +2,13 @@
namespace Volo.Abp.Authorization.Permissions namespace Volo.Abp.Authorization.Permissions
{ {
public class PermissionOptions public class AbpPermissionOptions
{ {
public ITypeList<IPermissionDefinitionProvider> DefinitionProviders { get; } public ITypeList<IPermissionDefinitionProvider> DefinitionProviders { get; }
public ITypeList<IPermissionValueProvider> ValueProviders { get; } public ITypeList<IPermissionValueProvider> ValueProviders { get; }
public PermissionOptions() public AbpPermissionOptions()
{ {
DefinitionProviders = new TypeList<IPermissionDefinitionProvider>(); DefinitionProviders = new TypeList<IPermissionDefinitionProvider>();
ValueProviders = new TypeList<IPermissionValueProvider>(); ValueProviders = new TypeList<IPermissionValueProvider>();

2
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 class ClientPermissionValueProvider : PermissionValueProvider
{ {
public const string ProviderName = "Client"; public const string ProviderName = "C";
public override string Name => ProviderName; public override string Name => ProviderName;

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinitionManager.cs

@ -16,12 +16,12 @@ namespace Volo.Abp.Authorization.Permissions
protected IDictionary<string, PermissionDefinition> PermissionDefinitions => _lazyPermissionDefinitions.Value; protected IDictionary<string, PermissionDefinition> PermissionDefinitions => _lazyPermissionDefinitions.Value;
private readonly Lazy<Dictionary<string, PermissionDefinition>> _lazyPermissionDefinitions; private readonly Lazy<Dictionary<string, PermissionDefinition>> _lazyPermissionDefinitions;
protected PermissionOptions Options { get; } protected AbpPermissionOptions Options { get; }
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;
public PermissionDefinitionManager( public PermissionDefinitionManager(
IOptions<PermissionOptions> options, IOptions<AbpPermissionOptions> options,
IServiceProvider serviceProvider) IServiceProvider serviceProvider)
{ {
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderManager.cs

@ -12,11 +12,11 @@ namespace Volo.Abp.Authorization.Permissions
public IReadOnlyList<IPermissionValueProvider> ValueProviders => _lazyProviders.Value; public IReadOnlyList<IPermissionValueProvider> ValueProviders => _lazyProviders.Value;
private readonly Lazy<List<IPermissionValueProvider>> _lazyProviders; private readonly Lazy<List<IPermissionValueProvider>> _lazyProviders;
protected PermissionOptions Options { get; } protected AbpPermissionOptions Options { get; }
public PermissionValueProviderManager( public PermissionValueProviderManager(
IServiceProvider serviceProvider, IServiceProvider serviceProvider,
IOptions<PermissionOptions> options) IOptions<AbpPermissionOptions> options)
{ {
Options = options.Value; Options = options.Value;

2
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 class RolePermissionValueProvider : PermissionValueProvider
{ {
public const string ProviderName = "Role"; public const string ProviderName = "R";
public override string Name => ProviderName; public override string Name => ProviderName;

2
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 class UserPermissionValueProvider : PermissionValueProvider
{ {
public const string ProviderName = "User"; public const string ProviderName = "U";
public override string Name => ProviderName; public override string Name => ProviderName;

4
framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs → framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs

@ -4,7 +4,7 @@ using System.Collections.Immutable;
namespace Volo.Abp.BackgroundJobs namespace Volo.Abp.BackgroundJobs
{ {
public class BackgroundJobOptions public class AbpBackgroundJobOptions
{ {
private readonly Dictionary<Type, BackgroundJobConfiguration> _jobConfigurationsByArgsType; private readonly Dictionary<Type, BackgroundJobConfiguration> _jobConfigurationsByArgsType;
private readonly Dictionary<string, BackgroundJobConfiguration> _jobConfigurationsByName; private readonly Dictionary<string, BackgroundJobConfiguration> _jobConfigurationsByName;
@ -15,7 +15,7 @@ namespace Volo.Abp.BackgroundJobs
/// </summary> /// </summary>
public bool IsJobExecutionEnabled { get; set; } = true; public bool IsJobExecutionEnabled { get; set; } = true;
public BackgroundJobOptions() public AbpBackgroundJobOptions()
{ {
_jobConfigurationsByArgsType = new Dictionary<Type, BackgroundJobConfiguration>(); _jobConfigurationsByArgsType = new Dictionary<Type, BackgroundJobConfiguration>();
_jobConfigurationsByName = new Dictionary<string, BackgroundJobConfiguration>(); _jobConfigurationsByName = new Dictionary<string, BackgroundJobConfiguration>();

2
framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs

@ -29,7 +29,7 @@ namespace Volo.Abp.BackgroundJobs
} }
}); });
services.Configure<BackgroundJobOptions>(options => services.Configure<AbpBackgroundJobOptions>(options =>
{ {
foreach (var jobType in jobTypes) foreach (var jobType in jobTypes)
{ {

4
framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs

@ -10,9 +10,9 @@ namespace Volo.Abp.BackgroundJobs
{ {
public ILogger<BackgroundJobExecuter> Logger { protected get; set; } public ILogger<BackgroundJobExecuter> Logger { protected get; set; }
protected BackgroundJobOptions Options { get; } protected AbpBackgroundJobOptions Options { get; }
public BackgroundJobExecuter(IOptions<BackgroundJobOptions> options) public BackgroundJobExecuter(IOptions<AbpBackgroundJobOptions> options)
{ {
Options = options.Value; Options = options.Value;

4
framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs

@ -5,12 +5,12 @@ namespace Volo.Abp.BackgroundJobs.Hangfire
{ {
public class HangfireJobExecutionAdapter<TArgs> public class HangfireJobExecutionAdapter<TArgs>
{ {
protected BackgroundJobOptions Options { get; } protected AbpBackgroundJobOptions Options { get; }
protected IServiceScopeFactory ServiceScopeFactory { get; } protected IServiceScopeFactory ServiceScopeFactory { get; }
protected IBackgroundJobExecuter JobExecuter { get; } protected IBackgroundJobExecuter JobExecuter { get; }
public HangfireJobExecutionAdapter( public HangfireJobExecutionAdapter(
IOptions<BackgroundJobOptions> options, IOptions<AbpBackgroundJobOptions> options,
IBackgroundJobExecuter jobExecuter, IBackgroundJobExecuter jobExecuter,
IServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
{ {

4
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobOptions.cs → 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 namespace Volo.Abp.BackgroundJobs.RabbitMQ
{ {
public class RabbitMqBackgroundJobOptions public class AbpRabbitMqBackgroundJobOptions
{ {
/// <summary> /// <summary>
/// Key: Job Args Type /// Key: Job Args Type
@ -15,7 +15,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
/// </summary> /// </summary>
public string DefaultQueueNamePrefix { get; set; } public string DefaultQueueNamePrefix { get; set; }
public RabbitMqBackgroundJobOptions() public AbpRabbitMqBackgroundJobOptions()
{ {
JobQueues = new Dictionary<Type, JobQueueConfiguration>(); JobQueues = new Dictionary<Type, JobQueueConfiguration>();
DefaultQueueNamePrefix = "AbpBackgroundJobs."; DefaultQueueNamePrefix = "AbpBackgroundJobs.";

22
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs

@ -24,8 +24,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
public ILogger<JobQueue<TArgs>> Logger { get; set; } public ILogger<JobQueue<TArgs>> Logger { get; set; }
protected BackgroundJobOptions BackgroundJobOptions { get; } protected AbpBackgroundJobOptions AbpBackgroundJobOptions { get; }
protected RabbitMqBackgroundJobOptions RabbitMqBackgroundJobOptions { get; } protected AbpRabbitMqBackgroundJobOptions AbpRabbitMqBackgroundJobOptions { get; }
protected IChannelPool ChannelPool { get; } protected IChannelPool ChannelPool { get; }
protected IRabbitMqSerializer Serializer { get; } protected IRabbitMqSerializer Serializer { get; }
protected IBackgroundJobExecuter JobExecuter { get; } protected IBackgroundJobExecuter JobExecuter { get; }
@ -35,21 +35,21 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
protected bool IsDiposed { get; private set; } protected bool IsDiposed { get; private set; }
public JobQueue( public JobQueue(
IOptions<BackgroundJobOptions> backgroundJobOptions, IOptions<AbpBackgroundJobOptions> backgroundJobOptions,
IOptions<RabbitMqBackgroundJobOptions> rabbitMqBackgroundJobOptions, IOptions<AbpRabbitMqBackgroundJobOptions> rabbitMqAbpBackgroundJobOptions,
IChannelPool channelPool, IChannelPool channelPool,
IRabbitMqSerializer serializer, IRabbitMqSerializer serializer,
IBackgroundJobExecuter jobExecuter, IBackgroundJobExecuter jobExecuter,
IServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
{ {
BackgroundJobOptions = backgroundJobOptions.Value; AbpBackgroundJobOptions = backgroundJobOptions.Value;
RabbitMqBackgroundJobOptions = rabbitMqBackgroundJobOptions.Value; AbpRabbitMqBackgroundJobOptions = rabbitMqAbpBackgroundJobOptions.Value;
Serializer = serializer; Serializer = serializer;
JobExecuter = jobExecuter; JobExecuter = jobExecuter;
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;
ChannelPool = channelPool; ChannelPool = channelPool;
JobConfiguration = BackgroundJobOptions.GetJob(typeof(TArgs)); JobConfiguration = AbpBackgroundJobOptions.GetJob(typeof(TArgs));
QueueConfiguration = GetOrCreateJobQueueConfiguration(); QueueConfiguration = GetOrCreateJobQueueConfiguration();
Logger = NullLogger<JobQueue<TArgs>>.Instance; Logger = NullLogger<JobQueue<TArgs>>.Instance;
@ -57,10 +57,10 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration() protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration()
{ {
return RabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ?? return AbpRabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ??
new JobQueueConfiguration( new JobQueueConfiguration(
typeof(TArgs), typeof(TArgs),
RabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName
); );
} }
@ -85,7 +85,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
{ {
CheckDisposed(); CheckDisposed();
if (!BackgroundJobOptions.IsJobExecutionEnabled) if (!AbpBackgroundJobOptions.IsJobExecutionEnabled)
{ {
return; return;
} }
@ -129,7 +129,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
var result = QueueConfiguration.Declare(ChannelAccessor.Channel); var result = QueueConfiguration.Declare(ChannelAccessor.Channel);
Logger.LogDebug($"RabbitMQ Queue '{QueueConfiguration.QueueName}' has {result.MessageCount} messages and {result.ConsumerCount} consumers."); 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 = new EventingBasicConsumer(ChannelAccessor.Channel);
Consumer.Received += MessageReceived; Consumer.Received += MessageReceived;

4
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 IServiceProvider ServiceProvider { get; }
protected BackgroundJobOptions Options { get; } protected AbpBackgroundJobOptions Options { get; }
public JobQueueManager( public JobQueueManager(
IOptions<BackgroundJobOptions> options, IOptions<AbpBackgroundJobOptions> options,
IServiceProvider serviceProvider) IServiceProvider serviceProvider)
{ {
ServiceProvider = serviceProvider; ServiceProvider = serviceProvider;

4
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorkerOptions.cs → framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobWorkerOptions.cs

@ -1,6 +1,6 @@
namespace Volo.Abp.BackgroundJobs namespace Volo.Abp.BackgroundJobs
{ {
public class BackgroundJobWorkerOptions public class AbpBackgroundJobWorkerOptions
{ {
/// <summary> /// <summary>
/// Interval between polling jobs from <see cref="IBackgroundJobStore"/>. /// Interval between polling jobs from <see cref="IBackgroundJobStore"/>.
@ -33,7 +33,7 @@
/// </summary> /// </summary>
public double DefaultWaitFactor { get; set; } public double DefaultWaitFactor { get; set; }
public BackgroundJobWorkerOptions() public AbpBackgroundJobWorkerOptions()
{ {
MaxJobFetchCount = 1000; MaxJobFetchCount = 1000;
JobPollPeriod = 5000; JobPollPeriod = 5000;

2
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.BackgroundJobs
{ {
public override void OnApplicationInitialization(ApplicationInitializationContext context) public override void OnApplicationInitialization(ApplicationInitializationContext context)
{ {
var options = context.ServiceProvider.GetRequiredService<IOptions<BackgroundJobOptions>>().Value; var options = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>().Value;
if (options.IsJobExecutionEnabled) if (options.IsJobExecutionEnabled)
{ {
context.ServiceProvider context.ServiceProvider

8
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs

@ -11,16 +11,16 @@ namespace Volo.Abp.BackgroundJobs
{ {
public class BackgroundJobWorker : PeriodicBackgroundWorkerBase, IBackgroundJobWorker 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; } protected IServiceScopeFactory ServiceScopeFactory { get; }
public BackgroundJobWorker( public BackgroundJobWorker(
AbpTimer timer, AbpTimer timer,
IOptions<BackgroundJobOptions> jobOptions, IOptions<AbpBackgroundJobOptions> jobOptions,
IOptions<BackgroundJobWorkerOptions> workerOptions, IOptions<AbpBackgroundJobWorkerOptions> workerOptions,
IServiceScopeFactory serviceScopeFactory) IServiceScopeFactory serviceScopeFactory)
: base(timer) : base(timer)
{ {

2
framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerOptions.cs → framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkerOptions.cs

@ -1,6 +1,6 @@
namespace Volo.Abp.BackgroundWorkers namespace Volo.Abp.BackgroundWorkers
{ {
public class BackgroundWorkerOptions public class AbpBackgroundWorkerOptions
{ {
/// <summary> /// <summary>
/// Default: true. /// Default: true.

4
framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/AbpBackgroundWorkersModule.cs

@ -12,7 +12,7 @@ namespace Volo.Abp.BackgroundWorkers
{ {
public override void OnApplicationInitialization(ApplicationInitializationContext context) public override void OnApplicationInitialization(ApplicationInitializationContext context)
{ {
var options = context.ServiceProvider.GetRequiredService<IOptions<BackgroundWorkerOptions>>().Value; var options = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundWorkerOptions>>().Value;
if (options.IsEnabled) if (options.IsEnabled)
{ {
AsyncHelper.RunSync( AsyncHelper.RunSync(
@ -25,7 +25,7 @@ namespace Volo.Abp.BackgroundWorkers
public override void OnApplicationShutdown(ApplicationShutdownContext context) public override void OnApplicationShutdown(ApplicationShutdownContext context)
{ {
var options = context.ServiceProvider.GetRequiredService<IOptions<BackgroundWorkerOptions>>().Value; var options = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundWorkerOptions>>().Value;
if (options.IsEnabled) if (options.IsEnabled)
{ {
AsyncHelper.RunSync( AsyncHelper.RunSync(

3
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs

@ -21,8 +21,9 @@ namespace Volo.Abp.Caching
context.Services.AddDistributedMemoryCache(); context.Services.AddDistributedMemoryCache();
context.Services.AddSingleton(typeof(IDistributedCache<>), typeof(DistributedCache<>)); context.Services.AddSingleton(typeof(IDistributedCache<>), typeof(DistributedCache<>));
context.Services.AddSingleton(typeof(IDistributedCache<,>), typeof(DistributedCache<,>));
context.Services.Configure<CacheOptions>(cacheOptions => context.Services.Configure<AbpDistributedCacheOptions>(cacheOptions =>
{ {
cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20); cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20);
}); });

17
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/CacheOptions.cs → 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 System.Collections.Generic;
using Microsoft.Extensions.Caching.Distributed;
namespace Volo.Abp.Caching namespace Volo.Abp.Caching
{ {
public class CacheOptions public class AbpDistributedCacheOptions
{ {
/// <summary>
/// Throw or hide exceptions for the distributed cache.
/// </summary>
public bool HideErrors { get; set; } = true;
/// <summary> /// <summary>
/// Cache key prefix. /// Cache key prefix.
/// </summary> /// </summary>
@ -20,13 +25,13 @@ namespace Volo.Abp.Caching
/// List of all cache configurators. /// List of all cache configurators.
/// (func argument:Name of cache) /// (func argument:Name of cache)
/// </summary> /// </summary>
public List<Func<string, DistributedCacheEntryOptions>> CacheConfigurators { get; set; } //TODO list item use a configurator interface instead? public List<Func<string, DistributedCacheEntryOptions>> CacheConfigurators { get; set; } //TODO: use a configurator interface instead?
public CacheOptions() public AbpDistributedCacheOptions()
{ {
CacheConfigurators = new List<Func<string, DistributedCacheEntryOptions>>(); CacheConfigurators = new List<Func<string, DistributedCacheEntryOptions>>();
GlobalCacheEntryOptions = new DistributedCacheEntryOptions(); GlobalCacheEntryOptions = new DistributedCacheEntryOptions();
KeyPrefix = ""; KeyPrefix = "";
} }
} }
} }

179
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs

@ -15,10 +15,36 @@ namespace Volo.Abp.Caching
/// Represents a distributed cache of <typeparamref name="TCacheItem" /> type. /// Represents a distributed cache of <typeparamref name="TCacheItem" /> type.
/// </summary> /// </summary>
/// <typeparam name="TCacheItem">The type of cache item being cached.</typeparam> /// <typeparam name="TCacheItem">The type of cache item being cached.</typeparam>
public class DistributedCache<TCacheItem> : IDistributedCache<TCacheItem> public class DistributedCache<TCacheItem> : DistributedCache<TCacheItem, string>, IDistributedCache<TCacheItem>
where TCacheItem : class where TCacheItem : class
{ {
public ILogger<DistributedCache<TCacheItem>> Logger { get; set; } public DistributedCache(
IOptions<CacheOptions> cacheOption,
IOptions<DistributedCacheOptions> distributedCacheOption,
IDistributedCache cache,
ICancellationTokenProvider cancellationTokenProvider,
IDistributedCacheSerializer serializer,
ICurrentTenant currentTenant) : base(
cacheOption: cacheOption,
distributedCacheOption: distributedCacheOption,
cache: cache,
cancellationTokenProvider: cancellationTokenProvider,
serializer: serializer,
currentTenant: currentTenant)
{
}
}
/// <summary>
/// Represents a distributed cache of <typeparamref name="TCacheItem" /> type.
/// Uses a generic cache key type of <typeparamref name="TCacheKey" /> type.
/// </summary>
/// <typeparam name="TCacheItem">The type of cache item being cached.</typeparam>
/// <typeparam name="TCacheKey">The type of cache key being used.</typeparam>
public class DistributedCache<TCacheItem, TCacheKey> : IDistributedCache<TCacheItem, TCacheKey>
where TCacheItem : class
{
public ILogger<DistributedCache<TCacheItem, TCacheKey>> Logger { get; set; }
protected string CacheName { get; set; } protected string CacheName { get; set; }
@ -36,13 +62,13 @@ namespace Volo.Abp.Caching
protected DistributedCacheEntryOptions DefaultCacheOptions; protected DistributedCacheEntryOptions DefaultCacheOptions;
private readonly CacheOptions _cacheOption; private readonly AbpDistributedCacheOptions _cacheOption;
private readonly DistributedCacheOptions _distributedCacheOption; private readonly AbpDistributedCacheOptions _distributedCacheOption;
public DistributedCache( public DistributedCache(
IOptions<CacheOptions> cacheOption, IOptions<AbpDistributedCacheOptions> cacheOption,
IOptions<DistributedCacheOptions> distributedCacheOption, IOptions<AbpDistributedCacheOptions> distributedCacheOption,
IDistributedCache cache, IDistributedCache cache,
ICancellationTokenProvider cancellationTokenProvider, ICancellationTokenProvider cancellationTokenProvider,
IDistributedCacheSerializer serializer, IDistributedCacheSerializer serializer,
@ -52,7 +78,7 @@ namespace Volo.Abp.Caching
_cacheOption = cacheOption.Value; _cacheOption = cacheOption.Value;
Cache = cache; Cache = cache;
CancellationTokenProvider = cancellationTokenProvider; CancellationTokenProvider = cancellationTokenProvider;
Logger = NullLogger<DistributedCache<TCacheItem>>.Instance; Logger = NullLogger<DistributedCache<TCacheItem, TCacheKey>>.Instance;
Serializer = serializer; Serializer = serializer;
CurrentTenant = currentTenant; CurrentTenant = currentTenant;
@ -60,7 +86,41 @@ namespace Volo.Abp.Caching
SetDefaultOptions(); 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();
}
/// <summary> /// <summary>
/// Gets a cache item with the given key. If no cache item is found for the given key then returns null. /// Gets a cache item with the given key. If no cache item is found for the given key then returns null.
/// </summary> /// </summary>
@ -68,7 +128,7 @@ namespace Volo.Abp.Caching
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
/// <returns>The cache item, or null.</returns> /// <returns>The cache item, or null.</returns>
public virtual TCacheItem Get( public virtual TCacheItem Get(
string key, TCacheKey key,
bool? hideErrors = null) bool? hideErrors = null)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -106,8 +166,8 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The cache item, or null.</returns> /// <returns>The cache item, or null.</returns>
public virtual async Task<TCacheItem> GetAsync( public virtual async Task<TCacheItem> GetAsync(
string key, TCacheKey key,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default) CancellationToken token = default)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -131,7 +191,7 @@ namespace Volo.Abp.Caching
throw; throw;
} }
if (cachedBytes == null) if (cachedBytes == null)
{ {
return null; return null;
@ -139,7 +199,6 @@ namespace Volo.Abp.Caching
return Serializer.Deserialize<TCacheItem>(cachedBytes); return Serializer.Deserialize<TCacheItem>(cachedBytes);
} }
/// <summary> /// <summary>
/// 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 /// 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 <paramref name="factory" /> delegate and returns the provided cache item. /// provided by <paramref name="factory" /> delegate and returns the provided cache item.
@ -149,10 +208,10 @@ namespace Volo.Abp.Caching
/// <param name="optionsFactory">The cache options for the factory delegate.</param> /// <param name="optionsFactory">The cache options for the factory delegate.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
/// <returns>The cache item.</returns> /// <returns>The cache item.</returns>
public TCacheItem GetOrAdd( public virtual TCacheItem GetOrAdd(
string key, TCacheKey key,
Func<TCacheItem> factory, Func<TCacheItem> factory,
Func<DistributedCacheEntryOptions> optionsFactory = null, Func<DistributedCacheEntryOptions> optionsFactory = null,
bool? hideErrors = null) bool? hideErrors = null)
{ {
var value = Get(key, hideErrors); var value = Get(key, hideErrors);
@ -175,7 +234,6 @@ namespace Volo.Abp.Caching
return value; return value;
} }
/// <summary> /// <summary>
/// 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 /// 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 <paramref name="factory" /> delegate and returns the provided cache item. /// provided by <paramref name="factory" /> delegate and returns the provided cache item.
@ -186,11 +244,11 @@ namespace Volo.Abp.Caching
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The cache item.</returns> /// <returns>The cache item.</returns>
public async Task<TCacheItem> GetOrAddAsync( public virtual async Task<TCacheItem> GetOrAddAsync(
string key, TCacheKey key,
Func<Task<TCacheItem>> factory, Func<Task<TCacheItem>> factory,
Func<DistributedCacheEntryOptions> optionsFactory = null, Func<DistributedCacheEntryOptions> optionsFactory = null,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default) CancellationToken token = default)
{ {
token = CancellationTokenProvider.FallbackToProvider(token); token = CancellationTokenProvider.FallbackToProvider(token);
@ -214,7 +272,6 @@ namespace Volo.Abp.Caching
return value; return value;
} }
/// <summary> /// <summary>
/// Sets the cache item value for the provided key. /// Sets the cache item value for the provided key.
/// </summary> /// </summary>
@ -223,9 +280,9 @@ namespace Volo.Abp.Caching
/// <param name="options">The cache options for the value.</param> /// <param name="options">The cache options for the value.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
public virtual void Set( public virtual void Set(
string key, TCacheKey key,
TCacheItem value, TCacheItem value,
DistributedCacheEntryOptions options = null, DistributedCacheEntryOptions options = null,
bool? hideErrors = null) bool? hideErrors = null)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -249,7 +306,6 @@ namespace Volo.Abp.Caching
throw; throw;
} }
} }
/// <summary> /// <summary>
/// Sets the cache item value for the provided key. /// Sets the cache item value for the provided key.
/// </summary> /// </summary>
@ -260,10 +316,10 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns> /// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns>
public virtual async Task SetAsync( public virtual async Task SetAsync(
string key, TCacheKey key,
TCacheItem value, TCacheItem value,
DistributedCacheEntryOptions options = null, DistributedCacheEntryOptions options = null,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default) CancellationToken token = default)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -288,15 +344,14 @@ namespace Volo.Abp.Caching
throw; throw;
} }
} }
/// <summary> /// <summary>
/// Refreshes the cache value of the given key, and resets its sliding expiration timeout. /// Refreshes the cache value of the given key, and resets its sliding expiration timeout.
/// </summary> /// </summary>
/// <param name="key">The key of cached item to be retrieved from the cache.</param> /// <param name="key">The key of cached item to be retrieved from the cache.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
public virtual void Refresh( public virtual void Refresh(
string key, TCacheKey key, bool?
bool? hideErrors = null) hideErrors = null)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -315,7 +370,6 @@ namespace Volo.Abp.Caching
throw; throw;
} }
} }
/// <summary> /// <summary>
/// Refreshes the cache value of the given key, and resets its sliding expiration timeout. /// Refreshes the cache value of the given key, and resets its sliding expiration timeout.
/// </summary> /// </summary>
@ -324,8 +378,8 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns> /// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns>
public virtual async Task RefreshAsync( public virtual async Task RefreshAsync(
string key, TCacheKey key,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default) CancellationToken token = default)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -345,15 +399,13 @@ namespace Volo.Abp.Caching
throw; throw;
} }
} }
/// <summary> /// <summary>
/// Removes the cache item for given key from cache. /// Removes the cache item for given key from cache.
/// </summary> /// </summary>
/// <param name="key">The key of cached item to be retrieved from the cache.</param> /// <param name="key">The key of cached item to be retrieved from the cache.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
public virtual void Remove( public virtual void Remove(
string key, TCacheKey key,
bool? hideErrors = null) bool? hideErrors = null)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -372,7 +424,6 @@ namespace Volo.Abp.Caching
throw; throw;
} }
} }
/// <summary> /// <summary>
/// Removes the cache item for given key from cache. /// Removes the cache item for given key from cache.
/// </summary> /// </summary>
@ -381,8 +432,8 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns> /// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns>
public virtual async Task RemoveAsync( public virtual async Task RemoveAsync(
string key, TCacheKey key,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default) CancellationToken token = default)
{ {
hideErrors = hideErrors ?? _distributedCacheOption.HideErrors; hideErrors = hideErrors ?? _distributedCacheOption.HideErrors;
@ -401,42 +452,8 @@ namespace Volo.Abp.Caching
throw; 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();
}
}
} }

10
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCacheOptions.cs

@ -1,10 +0,0 @@
namespace Volo.Abp.Caching
{
public class DistributedCacheOptions
{
/// <summary>
/// Throw or hide exceptions for the distributed cache.
/// </summary>
public bool HideErrors { get; set; } = true;
}
}

33
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/IDistributedCache.cs

@ -10,7 +10,18 @@ namespace Volo.Abp.Caching
/// Represents a distributed cache of <typeparamref name="TCacheItem" /> type. /// Represents a distributed cache of <typeparamref name="TCacheItem" /> type.
/// </summary> /// </summary>
/// <typeparam name="TCacheItem">The type of cache item being cached.</typeparam> /// <typeparam name="TCacheItem">The type of cache item being cached.</typeparam>
public interface IDistributedCache<TCacheItem> public interface IDistributedCache<TCacheItem> : IDistributedCache<TCacheItem, string>
where TCacheItem : class
{
}
/// <summary>
/// Represents a distributed cache of <typeparamref name="TCacheItem" /> type.
/// Uses a generic cache key type of <typeparamref name="TCacheKey" /> type.
/// </summary>
/// <typeparam name="TCacheItem">The type of cache item being cached.</typeparam>
/// <typeparam name="TCacheKey">The type of cache key being used.</typeparam>
public interface IDistributedCache<TCacheItem, TCacheKey>
where TCacheItem : class where TCacheItem : class
{ {
/// <summary> /// <summary>
@ -20,7 +31,7 @@ namespace Volo.Abp.Caching
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
/// <returns>The cache item, or null.</returns> /// <returns>The cache item, or null.</returns>
TCacheItem Get( TCacheItem Get(
string key, TCacheKey key,
bool? hideErrors = null bool? hideErrors = null
); );
@ -32,7 +43,7 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The cache item, or null.</returns> /// <returns>The cache item, or null.</returns>
Task<TCacheItem> GetAsync( Task<TCacheItem> GetAsync(
[NotNull] string key, [NotNull] TCacheKey key,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default CancellationToken token = default
); );
@ -47,7 +58,7 @@ namespace Volo.Abp.Caching
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
/// <returns>The cache item.</returns> /// <returns>The cache item.</returns>
TCacheItem GetOrAdd( TCacheItem GetOrAdd(
string key, TCacheKey key,
Func<TCacheItem> factory, Func<TCacheItem> factory,
Func<DistributedCacheEntryOptions> optionsFactory = null, Func<DistributedCacheEntryOptions> optionsFactory = null,
bool? hideErrors = null bool? hideErrors = null
@ -64,7 +75,7 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The cache item.</returns> /// <returns>The cache item.</returns>
Task<TCacheItem> GetOrAddAsync( Task<TCacheItem> GetOrAddAsync(
[NotNull] string key, [NotNull] TCacheKey key,
Func<Task<TCacheItem>> factory, Func<Task<TCacheItem>> factory,
Func<DistributedCacheEntryOptions> optionsFactory = null, Func<DistributedCacheEntryOptions> optionsFactory = null,
bool? hideErrors = null, bool? hideErrors = null,
@ -79,7 +90,7 @@ namespace Volo.Abp.Caching
/// <param name="options">The cache options for the value.</param> /// <param name="options">The cache options for the value.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
void Set( void Set(
string key, TCacheKey key,
TCacheItem value, TCacheItem value,
DistributedCacheEntryOptions options = null, DistributedCacheEntryOptions options = null,
bool? hideErrors = null bool? hideErrors = null
@ -95,7 +106,7 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns> /// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns>
Task SetAsync( Task SetAsync(
[NotNull] string key, [NotNull] TCacheKey key,
[NotNull] TCacheItem value, [NotNull] TCacheItem value,
[CanBeNull] DistributedCacheEntryOptions options = null, [CanBeNull] DistributedCacheEntryOptions options = null,
bool? hideErrors = null, bool? hideErrors = null,
@ -108,7 +119,7 @@ namespace Volo.Abp.Caching
/// <param name="key">The key of cached item to be retrieved from the cache.</param> /// <param name="key">The key of cached item to be retrieved from the cache.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
void Refresh( void Refresh(
string key, TCacheKey key,
bool? hideErrors = null bool? hideErrors = null
); );
@ -120,7 +131,7 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns> /// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns>
Task RefreshAsync( Task RefreshAsync(
string key, TCacheKey key,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default CancellationToken token = default
); );
@ -131,7 +142,7 @@ namespace Volo.Abp.Caching
/// <param name="key">The key of cached item to be retrieved from the cache.</param> /// <param name="key">The key of cached item to be retrieved from the cache.</param>
/// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param> /// <param name="hideErrors">Indicates to throw or hide the exceptions for the distributed cache.</param>
void Remove( void Remove(
string key, TCacheKey key,
bool? hideErrors = null bool? hideErrors = null
); );
@ -143,7 +154,7 @@ namespace Volo.Abp.Caching
/// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param> /// <param name="token">The <see cref="T:System.Threading.CancellationToken" /> for the task.</param>
/// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns> /// <returns>The <see cref="T:System.Threading.Tasks.Task" /> indicating that the operation is asynchronous.</returns>
Task RemoveAsync( Task RemoveAsync(
string key, TCacheKey key,
bool? hideErrors = null, bool? hideErrors = null,
CancellationToken token = default CancellationToken token = default
); );

8
framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj

@ -15,10 +15,10 @@
<PackageReference Include="SharpZipLib" Version="1.2.0" /> <PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="HtmlAgilityPack.NetCore" Version="1.5.0.1" /> <PackageReference Include="HtmlAgilityPack.NetCore" Version="1.5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="NuGet.Versioning" Version="5.2.0" /> <PackageReference Include="NuGet.Versioning" Version="5.3.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
<PackageReference Include="System.Security.Permissions" Version="4.5.0" /> <PackageReference Include="System.Security.Permissions" Version="4.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.2.1" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.3.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
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 // 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); AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false);
Configure<CliOptions>(options => Configure<AbpCliOptions>(options =>
{ {
options.Commands["help"] = typeof(HelpCommand); options.Commands["help"] = typeof(HelpCommand);
options.Commands["new"] = typeof(NewCommand); options.Commands["new"] = typeof(NewCommand);

4
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliOptions.cs

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace Volo.Abp.Cli namespace Volo.Abp.Cli
{ {
public class CliOptions public class AbpCliOptions
{ {
public Dictionary<string, Type> Commands { get; } public Dictionary<string, Type> Commands { get; }
@ -17,7 +17,7 @@ namespace Volo.Abp.Cli
/// </summary> /// </summary>
public string ToolName { get; set; } = "CLI"; public string ToolName { get; set; } = "CLI";
public CliOptions() public AbpCliOptions()
{ {
Commands = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); Commands = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
} }

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AbpCommandLineOptions.cs

@ -4,7 +4,7 @@ using JetBrains.Annotations;
namespace Volo.Abp.Cli.Args namespace Volo.Abp.Cli.Args
{ {
public class CommandLineOptions : Dictionary<string, string> public class AbpCommandLineOptions : Dictionary<string, string>
{ {
[CanBeNull] [CanBeNull]
public string GetOrNull([NotNull] string name, params string[] alternativeNames) public string GetOrNull([NotNull] string name, params string[] alternativeNames)

4
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; } public string Target { get; }
[NotNull] [NotNull]
public CommandLineOptions Options { get; } public AbpCommandLineOptions Options { get; }
public CommandLineArgs([CanBeNull] string command = null, [CanBeNull] string target = null) public CommandLineArgs([CanBeNull] string command = null, [CanBeNull] string target = null)
{ {
Command = command; Command = command;
Target = target; Target = target;
Options = new CommandLineOptions(); Options = new AbpCommandLineOptions();
} }
public static CommandLineArgs Empty() public static CommandLineArgs Empty()

4
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 public class CommandSelector : ICommandSelector, ITransientDependency
{ {
protected CliOptions Options { get; } protected AbpCliOptions Options { get; }
public CommandSelector(IOptions<CliOptions> options) public CommandSelector(IOptions<AbpCliOptions> options)
{ {
Options = options.Value; Options = options.Value;
} }

10
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 class HelpCommand : IConsoleCommand, ITransientDependency
{ {
public ILogger<HelpCommand> Logger { get; set; } public ILogger<HelpCommand> Logger { get; set; }
protected CliOptions CliOptions { get; } protected AbpCliOptions AbpCliOptions { get; }
protected IHybridServiceScopeFactory ServiceScopeFactory { get; } protected IHybridServiceScopeFactory ServiceScopeFactory { get; }
public HelpCommand(IOptions<CliOptions> cliOptions, public HelpCommand(IOptions<AbpCliOptions> cliOptions,
IHybridServiceScopeFactory serviceScopeFactory) IHybridServiceScopeFactory serviceScopeFactory)
{ {
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;
Logger = NullLogger<HelpCommand>.Instance; Logger = NullLogger<HelpCommand>.Instance;
CliOptions = cliOptions.Value; AbpCliOptions = cliOptions.Value;
} }
public async Task ExecuteAsync(CommandLineArgs commandLineArgs) public async Task ExecuteAsync(CommandLineArgs commandLineArgs)
@ -32,7 +32,7 @@ namespace Volo.Abp.Cli.Commands
return; return;
} }
var commandType = CliOptions.Commands[commandLineArgs.Target]; var commandType = AbpCliOptions.Commands[commandLineArgs.Target];
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())
{ {
@ -53,7 +53,7 @@ namespace Volo.Abp.Cli.Commands
sb.AppendLine("Command List:"); sb.AppendLine("Command List:");
sb.AppendLine(""); sb.AppendLine("");
foreach (var command in CliOptions.Commands.ToArray()) foreach (var command in AbpCliOptions.Commands.ToArray())
{ {
string shortDescription; string shortDescription;

4
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 VoloNugetPackagesVersionUpdater _nugetPackagesVersionUpdater;
private readonly NpmPackagesUpdater _npmPackagesUpdater; private readonly NpmPackagesUpdater _npmPackagesUpdater;
private readonly ICliAnalyticsCollect _cliAnalyticsCollect; private readonly ICliAnalyticsCollect _cliAnalyticsCollect;
private readonly CliOptions _options; private readonly AbpCliOptions _options;
private readonly IJsonSerializer _jsonSerializer; private readonly IJsonSerializer _jsonSerializer;
public UpdateCommand(VoloNugetPackagesVersionUpdater nugetPackagesVersionUpdater, public UpdateCommand(VoloNugetPackagesVersionUpdater nugetPackagesVersionUpdater,
NpmPackagesUpdater npmPackagesUpdater, NpmPackagesUpdater npmPackagesUpdater,
ICliAnalyticsCollect cliAnalyticsCollect, ICliAnalyticsCollect cliAnalyticsCollect,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IOptions<CliOptions> options) IOptions<AbpCliOptions> options)
{ {
_nugetPackagesVersionUpdater = nugetPackagesVersionUpdater; _nugetPackagesVersionUpdater = nugetPackagesVersionUpdater;
_npmPackagesUpdater = npmPackagesUpdater; _npmPackagesUpdater = npmPackagesUpdater;

4
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs

@ -21,7 +21,7 @@ namespace Volo.Abp.Cli.ProjectBuilding
{ {
public ILogger<AbpIoSourceCodeStore> Logger { get; set; } public ILogger<AbpIoSourceCodeStore> Logger { get; set; }
protected CliOptions Options { get; } protected AbpCliOptions Options { get; }
protected IJsonSerializer JsonSerializer { get; } protected IJsonSerializer JsonSerializer { get; }
@ -30,7 +30,7 @@ namespace Volo.Abp.Cli.ProjectBuilding
protected ICancellationTokenProvider CancellationTokenProvider { get; } protected ICancellationTokenProvider CancellationTokenProvider { get; }
public AbpIoSourceCodeStore( public AbpIoSourceCodeStore(
IOptions<CliOptions> options, IOptions<AbpCliOptions> options,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IRemoteServiceExceptionHandler remoteServiceExceptionHandler, IRemoteServiceExceptionHandler remoteServiceExceptionHandler,
ICancellationTokenProvider cancellationTokenProvider) ICancellationTokenProvider cancellationTokenProvider)

4
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 ISourceCodeStore SourceCodeStore { get; }
protected IModuleInfoProvider ModuleInfoProvider { get; } protected IModuleInfoProvider ModuleInfoProvider { get; }
protected ICliAnalyticsCollect CliAnalyticsCollect { get; } protected ICliAnalyticsCollect CliAnalyticsCollect { get; }
protected CliOptions Options { get; } protected AbpCliOptions Options { get; }
protected IJsonSerializer JsonSerializer { get; } protected IJsonSerializer JsonSerializer { get; }
protected IApiKeyService ApiKeyService { get; } protected IApiKeyService ApiKeyService { get; }
public ModuleProjectBuilder(ISourceCodeStore sourceCodeStore, public ModuleProjectBuilder(ISourceCodeStore sourceCodeStore,
IModuleInfoProvider moduleInfoProvider, IModuleInfoProvider moduleInfoProvider,
ICliAnalyticsCollect cliAnalyticsCollect, ICliAnalyticsCollect cliAnalyticsCollect,
IOptions<CliOptions> options, IOptions<AbpCliOptions> options,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IApiKeyService apiKeyService) IApiKeyService apiKeyService)
{ {

4
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 ISourceCodeStore SourceCodeStore { get; }
protected ITemplateInfoProvider TemplateInfoProvider { get; } protected ITemplateInfoProvider TemplateInfoProvider { get; }
protected ICliAnalyticsCollect CliAnalyticsCollect { get; } protected ICliAnalyticsCollect CliAnalyticsCollect { get; }
protected CliOptions Options { get; } protected AbpCliOptions Options { get; }
protected IJsonSerializer JsonSerializer { get; } protected IJsonSerializer JsonSerializer { get; }
protected IApiKeyService ApiKeyService { get; } protected IApiKeyService ApiKeyService { get; }
public TemplateProjectBuilder(ISourceCodeStore sourceCodeStore, public TemplateProjectBuilder(ISourceCodeStore sourceCodeStore,
ITemplateInfoProvider templateInfoProvider, ITemplateInfoProvider templateInfoProvider,
ICliAnalyticsCollect cliAnalyticsCollect, ICliAnalyticsCollect cliAnalyticsCollect,
IOptions<CliOptions> options, IOptions<AbpCliOptions> options,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IApiKeyService apiKeyService) IApiKeyService apiKeyService)
{ {

4
framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj

@ -12,8 +12,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="NETStandard.Library" Version="2.0.3" /> <PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.4" /> <PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
</ItemGroup> </ItemGroup>

7
framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs → framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/AbpConfigurationBuilderOptions.cs

@ -2,7 +2,7 @@
namespace Microsoft.Extensions.Configuration namespace Microsoft.Extensions.Configuration
{ {
public class ConfigurationBuilderOptions public class AbpConfigurationBuilderOptions
{ {
/// <summary> /// <summary>
/// Used to set assembly which is used to get the user secret id for the application. /// 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. /// Prefix for the environment variables.
/// </summary> /// </summary>
public string EnvironmentVariablesPrefix { get; set; } public string EnvironmentVariablesPrefix { get; set; }
/// <summary>
/// Command line arguments.
/// </summary>
public string[] CommandLineArgs { get; set; }
} }
} }

14
framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs

@ -5,9 +5,10 @@ namespace Microsoft.Extensions.Configuration
{ {
public static class ConfigurationHelper 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()) 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.AddJsonFile($"{options.FileName}.{options.EnvironmentName}.json", optional: true, reloadOnChange: true);
} }
builder = builder.AddEnvironmentVariables(options.EnvironmentVariablesPrefix);
if (options.EnvironmentName == "Development") 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(); return builder.Build();
} }
} }

13
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.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Volo.Abp.Configuration;
namespace Microsoft.Extensions.DependencyInjection namespace Microsoft.Extensions.DependencyInjection
{ {
public static class ServiceCollectionConfigurationExtensions public static class ServiceCollectionConfigurationExtensions
{ {
[Obsolete] public static IServiceCollection ReplaceConfiguration(this IServiceCollection services, IConfiguration configuration)
public static IServiceCollection SetConfiguration(this IServiceCollection services, IConfigurationRoot configurationRoot)
{ {
return services.Replace(ServiceDescriptor.Singleton<IConfigurationAccessor>(new DefaultConfigurationAccessor(configurationRoot))); return services.Replace(ServiceDescriptor.Singleton<IConfiguration>(configuration));
} }
public static IConfigurationRoot GetConfiguration(this IServiceCollection services) public static IConfiguration GetConfiguration(this IServiceCollection services)
{ {
var hostBuilderContext = services.GetSingletonInstanceOrNull<HostBuilderContext>(); var hostBuilderContext = services.GetSingletonInstanceOrNull<HostBuilderContext>();
if (hostBuilderContext?.Configuration != null) if (hostBuilderContext?.Configuration != null)
@ -22,7 +19,7 @@ namespace Microsoft.Extensions.DependencyInjection
return hostBuilderContext.Configuration as IConfigurationRoot; return hostBuilderContext.Configuration as IConfigurationRoot;
} }
return services.GetSingletonInstance<IConfigurationAccessor>().Configuration; return services.GetSingletonInstance<IConfiguration>();
} }
} }
} }

1
framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj

@ -17,6 +17,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Options" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0" />

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save