Browse Source

Remove ConfigureAwait of async method.

pull/2645/head
maliming 6 years ago
parent
commit
174e25b0be
  1. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/FodyWeavers.xml
  2. 2
      framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xml
  3. 2
      framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xml
  4. 4
      framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs
  5. 2
      framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xml
  6. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xml
  7. 8
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs
  8. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xml
  9. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs
  10. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteFeatureChecker.cs
  11. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteLanguageProvider.cs
  12. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs
  13. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteSettingProvider.cs
  14. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs
  15. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xml
  16. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xml
  17. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Breadcrumb/AbpBreadcrumbTagHelperService.cs
  18. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs
  19. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs
  20. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionTagHelperService.cs
  21. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseBodyTagHelperService.cs
  22. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs
  23. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Extensions/TagHelperExtensions.cs
  24. 20
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs
  25. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs
  26. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs
  27. 18
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs
  28. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs
  29. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs
  30. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs
  31. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xml
  32. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs
  33. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleItemTagHelperService.cs
  34. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleTagHelperService.cs
  35. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs
  36. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs
  37. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs
  38. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xml
  39. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs
  40. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs
  41. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs
  42. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xml
  43. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xml
  44. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs
  45. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs
  46. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs
  47. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs
  48. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs
  49. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xml
  50. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs
  51. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xml
  52. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs
  53. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs
  54. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xml
  55. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xml
  56. 16
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs
  57. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs
  58. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs
  59. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Auditing/AbpAuditActionFilter.cs
  60. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs
  61. 6
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Features/AbpFeatureActionFilter.cs
  62. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinder.cs
  63. 14
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs
  64. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/AbpValidationActionFilter.cs
  65. 2
      framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xml
  66. 2
      framework/src/Volo.Abp.AspNetCore.Serilog/Volo/Abp/AspNetCore/Serilog/AbpSerilogMiddleware.cs
  67. 2
      framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xml
  68. 2
      framework/src/Volo.Abp.AspNetCore/FodyWeavers.xml
  69. 4
      framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs
  70. 6
      framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs
  71. 6
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs
  72. 6
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs
  73. 2
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs
  74. 4
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs
  75. 2
      framework/src/Volo.Abp.Auditing/FodyWeavers.xml
  76. 4
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs
  77. 4
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs
  78. 2
      framework/src/Volo.Abp.Authorization/FodyWeavers.xml
  79. 38
      framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AbpAuthorizationServiceExtensions.cs
  80. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationPolicyProvider.cs
  81. 6
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AuthorizationInterceptor.cs
  82. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs
  83. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/PermissionRequirementHandler.cs
  84. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs
  85. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs
  86. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs
  87. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs
  88. 2
      framework/src/Volo.Abp.AutoMapper/FodyWeavers.xml
  89. 2
      framework/src/Volo.Abp.Autofac/FodyWeavers.xml
  90. 2
      framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xml
  91. 2
      framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs
  92. 2
      framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xml
  93. 2
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xml
  94. 10
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs
  95. 8
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs
  96. 4
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobManager.cs
  97. 2
      framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xml
  98. 12
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs
  99. 4
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs
  100. 2
      framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xml

2
abp_io/AbpIoLocalization/AbpIoLocalization/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.ApiVersioning.Abstractions/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

4
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs

@ -11,14 +11,14 @@ namespace Microsoft.AspNetCore.Builder
{
if (ctx.User.Identity?.IsAuthenticated != true)
{
var result = await ctx.AuthenticateAsync(schema).ConfigureAwait(false);
var result = await ctx.AuthenticateAsync(schema);
if (result.Succeeded && result.Principal != null)
{
ctx.User = result.Principal;
}
}
await next().ConfigureAwait(false);
await next();
});
}
}

2
framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.MultiTenancy/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

8
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs

@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
TenantConfiguration tenant = null;
if (resolveResult.TenantIdOrName != null)
{
tenant = await FindTenantAsync(resolveResult.TenantIdOrName).ConfigureAwait(false);
tenant = await FindTenantAsync(resolveResult.TenantIdOrName);
if (tenant == null)
{
//TODO: A better exception?
@ -45,7 +45,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
using (_currentTenant.Change(tenant?.Id, tenant?.Name))
{
await next(context).ConfigureAwait(false);
await next(context);
}
}
@ -53,11 +53,11 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
{
if (Guid.TryParse(tenantIdOrName, out var parsedTenantId))
{
return await _tenantStore.FindAsync(parsedTenantId).ConfigureAwait(false);
return await _tenantStore.FindAsync(parsedTenantId);
}
else
{
return await _tenantStore.FindAsync(tenantIdOrName).ConfigureAwait(false);
return await _tenantStore.FindAsync(tenantIdOrName);
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Client/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

4
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs

@ -43,12 +43,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
configuration = await Cache.GetOrAddAsync(
cacheKey,
async () => await Proxy.Service.GetAsync().ConfigureAwait(false),
async () => await Proxy.Service.GetAsync(),
() => new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(120) //TODO: Should be configurable. Default value should be higher (5 mins would be good).
}
).ConfigureAwait(false);
);
if (httpContext != null)
{

2
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteFeatureChecker.cs

@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
public override async Task<string> GetOrNullAsync(string name)
{
var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false);
var configuration = await ConfigurationClient.GetAsync();
return configuration.Features.Values.GetOrDefault(name);
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteLanguageProvider.cs

@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
public async Task<IReadOnlyList<LanguageInfo>> GetLanguagesAsync()
{
var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false);
var configuration = await ConfigurationClient.GetAsync();
return configuration.Localization.Languages;
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs

@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
public async Task<bool> IsGrantedAsync(string name)
{
var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false);
var configuration = await ConfigurationClient.GetAsync();
return configuration.Auth.GrantedPolicies.ContainsKey(name);
}
@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
public async Task<bool> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name)
{
/* This provider always works for the current principal. */
return await IsGrantedAsync(name).ConfigureAwait(false);
return await IsGrantedAsync(name);
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteSettingProvider.cs

@ -17,13 +17,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
public async Task<string> GetOrNullAsync(string name)
{
var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false);
var configuration = await ConfigurationClient.GetAsync();
return configuration.Setting.Values.GetOrDefault(name);
}
public async Task<List<SettingValue>> GetAllAsync()
{
var configuration = await ConfigurationClient.GetAsync().ConfigureAwait(false);
var configuration = await ConfigurationClient.GetAsync();
return configuration
.Setting.Values
.Select(s => new SettingValue(s.Key, s.Value))

12
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs

@ -39,13 +39,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
tenantConfiguration = await Cache.GetOrAddAsync(
cacheKey,
async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name).ConfigureAwait(false)),
async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)),
() => new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow =
TimeSpan.FromMinutes(5) //TODO: Should be configurable.
}
).ConfigureAwait(false);
);
if (httpContext != null)
{
@ -67,13 +67,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
tenantConfiguration = await Cache.GetOrAddAsync(
cacheKey,
async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id).ConfigureAwait(false)),
async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)),
() => new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow =
TimeSpan.FromMinutes(5) //TODO: Should be configurable.
}
).ConfigureAwait(false);
);
if (httpContext != null)
{
@ -95,7 +95,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
tenantConfiguration = Cache.GetOrAdd(
cacheKey,
() => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name).ConfigureAwait(false))),
() => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name))),
() => new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow =
@ -123,7 +123,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
tenantConfiguration = Cache.GetOrAdd(
cacheKey,
() => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id).ConfigureAwait(false))),
() => AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id))),
() => new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow =

2
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Breadcrumb/AbpBreadcrumbTagHelperService.cs

@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Breadcrumb
{
var list = InitilizeFormGroupContentsContext(context, output);
await output.GetChildContentAsync().ConfigureAwait(false);
await output.GetChildContentAsync();
SetInnerOlTag(context, output);
SetInnerList(context, output, list);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs

@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Carousel
var itemList = InitilizeCarouselItemsContentsContext(context, output);
await output.GetChildContentAsync().ConfigureAwait(false);
await output.GetChildContentAsync();
SetOneItemAsActive(context, output, itemList);
SetItems(context, output, itemList);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs

@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
{
SetRandomIdIfNotProvided();
var innerContent = (await output.GetChildContentAsync().ConfigureAwait(false)).GetContent();
var innerContent = (await output.GetChildContentAsync()).GetContent();
var html = GetAccordionHeaderItem(context, output) + GetAccordionContentItem(context, output, innerContent);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionTagHelperService.cs

@ -20,7 +20,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
var items = InitilizeFormGroupContentsContext(context, output);
await output.GetChildContentAsync().ConfigureAwait(false);
await output.GetChildContentAsync();
var content = GetContent(items);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseBodyTagHelperService.cs

@ -22,7 +22,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
output.Attributes.AddClass("multi-collapse");
}
var innerContent = (await output.GetChildContentAsync().ConfigureAwait(false)).GetContent();
var innerContent = (await output.GetChildContentAsync()).GetContent();
output.Content.SetHtmlContent(innerContent);
}

12
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs

@ -26,9 +26,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
var content = await output.GetChildContentAsync().ConfigureAwait(false);
var content = await output.GetChildContentAsync();
var buttonsAsHtml = await GetButtonsAsHtmlAsync(context, output, content).ConfigureAwait(false);
var buttonsAsHtml = await GetButtonsAsHtmlAsync(context, output, content);
output.PreElement.SetHtmlContent(buttonsAsHtml);
@ -43,13 +43,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown
{
var buttonBuilder = new StringBuilder("");
var mainButton = await GetMainButtonAsync(context, output, content).ConfigureAwait(false);
var mainButton = await GetMainButtonAsync(context, output, content);
buttonBuilder.AppendLine(mainButton);
if (TagHelper.DropdownStyle == DropdownStyle.Split)
{
var splitButton = await GetSplitButtonAsync(context, output).ConfigureAwait(false);
var splitButton = await GetSplitButtonAsync(context, output);
buttonBuilder.AppendLine(splitButton);
}
@ -68,7 +68,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown
abpButtonTagHelper.ButtonType = TagHelper.ButtonType;
var attributes = GetAttributesForMainButton(context, output);
var buttonTag = await abpButtonTagHelper.ProcessAndGetOutputAsync(attributes, context, "button", TagMode.StartTagAndEndTag).ConfigureAwait(false);
var buttonTag = await abpButtonTagHelper.ProcessAndGetOutputAsync(attributes, context, "button", TagMode.StartTagAndEndTag);
buttonTag.PreContent.SetHtmlContent(content.GetContent());
@ -89,7 +89,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown
abpButtonTagHelper.ButtonType = TagHelper.ButtonType;
var attributes = GetAttributesForSplitButton(context, output);
return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag).ConfigureAwait(false);
return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag);
}
protected virtual TagHelperAttributeList GetAttributesForMainButton(TagHelperContext context, TagHelperOutput output)

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Extensions/TagHelperExtensions.cs

@ -19,14 +19,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Extensions
tagHelper.Init(context);
await tagHelper.ProcessAsync(innerContext, innerOutput).ConfigureAwait(false);
await tagHelper.ProcessAsync(innerContext, innerOutput);
return innerOutput;
}
public static async Task<string> RenderAsync(this TagHelper tagHelper, TagHelperAttributeList attributeList, TagHelperContext context, HtmlEncoder htmlEncoder, string tagName = "div", TagMode tagMode = TagMode.SelfClosing)
{
var innerOutput = await tagHelper.ProcessAndGetOutputAsync(attributeList, context, tagName, tagMode).ConfigureAwait(false);
var innerOutput = await tagHelper.ProcessAndGetOutputAsync(attributeList, context, tagName, tagMode);
return innerOutput.Render(htmlEncoder);
}

20
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs

@ -37,11 +37,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
NormalizeTagMode(context, output);
var childContent = (await output.GetChildContentAsync().ConfigureAwait(false)).GetContent();
var childContent = (await output.GetChildContentAsync()).GetContent();
await ConvertToMvcForm(context, output).ConfigureAwait(false);
await ConvertToMvcForm(context, output);
await ProcessFieldsAsync(context, output).ConfigureAwait(false);
await ProcessFieldsAsync(context, output);
SetContent(context, output, list, childContent);
@ -67,9 +67,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
ViewContext = TagHelper.ViewContext
};
var formTagOutput = await formTagHelper.ProcessAndGetOutputAsync(output.Attributes, context, "form", TagMode.StartTagAndEndTag).ConfigureAwait(false);
var formTagOutput = await formTagHelper.ProcessAndGetOutputAsync(output.Attributes, context, "form", TagMode.StartTagAndEndTag);
await formTagOutput.GetChildContentAsync().ConfigureAwait(false);
await formTagOutput.GetChildContentAsync();
output.PostContent.SetHtmlContent(output.PostContent.GetContent() + formTagOutput.PostContent.GetContent());
output.PreContent.SetHtmlContent(output.PreContent.GetContent() + formTagOutput.PreContent.GetContent());
@ -134,11 +134,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
{
if (IsSelectGroup(context, model))
{
await ProcessSelectGroupAsync(context, output, model).ConfigureAwait(false);
await ProcessSelectGroupAsync(context, output, model);
}
else
{
await ProcessInputGroupAsync(context, output, model).ConfigureAwait(false);
await ProcessInputGroupAsync(context, output, model);
}
}
}
@ -147,7 +147,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
{
var abpSelectTagHelper = GetSelectGroupTagHelper(context, output, model);
await abpSelectTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag).ConfigureAwait(false);
await abpSelectTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag);
}
protected virtual AbpTagHelper GetSelectGroupTagHelper(TagHelperContext context, TagHelperOutput output, ModelExpression model)
@ -185,7 +185,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
abpButtonTagHelper.Text = "Submit";
abpButtonTagHelper.ButtonType = AbpButtonType.Primary;
return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag).ConfigureAwait(false);
return await abpButtonTagHelper.RenderAsync(attributes, context, _htmlEncoder, "button", TagMode.StartTagAndEndTag);
}
protected virtual async Task ProcessInputGroupAsync(TagHelperContext context, TagHelperOutput output, ModelExpression model)
@ -195,7 +195,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
abpInputTagHelper.ViewContext = TagHelper.ViewContext;
abpInputTagHelper.DisplayRequiredSymbol = TagHelper.RequiredSymbols ?? true;
await abpInputTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag).ConfigureAwait(false);
await abpInputTagHelper.RenderAsync(new TagHelperAttributeList(), context, _htmlEncoder, "div", TagMode.StartTagAndEndTag);
}
protected virtual List<ModelExpression> GetModels(TagHelperContext context, TagHelperOutput output)

16
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs

@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
var (innerHtml, isCheckBox) = await GetFormInputGroupAsHtmlAsync(context, output).ConfigureAwait(false);
var (innerHtml, isCheckBox) = await GetFormInputGroupAsHtmlAsync(context, output);
var order = TagHelper.AspFor.ModelExplorer.GetDisplayOrder();
@ -57,12 +57,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
protected virtual async Task<(string, bool)> GetFormInputGroupAsHtmlAsync(TagHelperContext context, TagHelperOutput output)
{
var (inputTag, isCheckBox) = await GetInputTagHelperOutputAsync(context, output).ConfigureAwait(false);
var (inputTag, isCheckBox) = await GetInputTagHelperOutputAsync(context, output);
var inputHtml = inputTag.Render(_encoder);
var label = await GetLabelAsHtmlAsync(context, output, inputTag, isCheckBox).ConfigureAwait(false);
var label = await GetLabelAsHtmlAsync(context, output, inputTag, isCheckBox);
var info = GetInfoAsHtml(context, output, inputTag, isCheckBox);
var validation = isCheckBox ? "" : await GetValidationAsHtmlAsync(context, output, inputTag).ConfigureAwait(false);
var validation = isCheckBox ? "" : await GetValidationAsHtmlAsync(context, output, inputTag);
return (GetContent(context, output, label, inputHtml, validation, info, isCheckBox), isCheckBox);
}
@ -82,7 +82,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var attributeList = new TagHelperAttributeList { { "class", "text-danger" } };
return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag).ConfigureAwait(false);
return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag);
}
protected virtual string GetContent(TagHelperContext context, TagHelperOutput output, string label, string inputHtml, string validation, string infoHtml, bool isCheckbox)
@ -125,7 +125,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
{
var tagHelper = GetInputTagHelper(context, output);
var inputTagHelperOutput = await tagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "input").ConfigureAwait(false);
var inputTagHelperOutput = await tagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "input");
ConvertToTextAreaIfTextArea(inputTagHelperOutput);
AddDisabledAttribute(inputTagHelperOutput);
@ -227,7 +227,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
if (string.IsNullOrEmpty(TagHelper.Label))
{
return await GetLabelAsHtmlUsingTagHelperAsync(context, output, isCheckbox).ConfigureAwait(false) + GetRequiredSymbol(context, output);
return await GetLabelAsHtmlUsingTagHelperAsync(context, output, isCheckbox) + GetRequiredSymbol(context, output);
}
var checkboxClass = isCheckbox ? "class=\"custom-control-label\" " : "";
@ -301,7 +301,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
attributeList.AddClass("custom-control-label");
}
return await labelTagHelper.RenderAsync(attributeList, context, _encoder, "label", TagMode.StartTagAndEndTag).ConfigureAwait(false);
return await labelTagHelper.RenderAsync(attributeList, context, _encoder, "label", TagMode.StartTagAndEndTag);
}
protected virtual void ConvertToTextAreaIfTextArea(TagHelperOutput tagHelperOutput)

16
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs

@ -30,7 +30,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
var innerHtml = await GetFormInputGroupAsHtmlAsync(context, output).ConfigureAwait(false);
var innerHtml = await GetFormInputGroupAsHtmlAsync(context, output);
var order = TagHelper.AspFor.ModelExplorer.GetDisplayOrder();
@ -52,10 +52,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
protected virtual async Task<string> GetFormInputGroupAsHtmlAsync(TagHelperContext context, TagHelperOutput output)
{
var selectTag = await GetSelectTagAsync(context, output).ConfigureAwait(false);
var selectTag = await GetSelectTagAsync(context, output);
var selectAsHtml = selectTag.Render(_encoder);
var label = await GetLabelAsHtmlAsync(context, output, selectTag).ConfigureAwait(false);
var validation = await GetValidationAsHtmlAsync(context, output, selectTag).ConfigureAwait(false);
var label = await GetLabelAsHtmlAsync(context, output, selectTag);
var validation = await GetValidationAsHtmlAsync(context, output, selectTag);
var infoText = GetInfoAsHtml(context, output, selectTag);
return label + Environment.NewLine + selectAsHtml + Environment.NewLine + infoText + Environment.NewLine + validation;
@ -75,7 +75,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
ViewContext = TagHelper.ViewContext
};
var selectTagHelperOutput = await selectTagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "select", TagMode.StartTagAndEndTag).ConfigureAwait(false);
var selectTagHelperOutput = await selectTagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "select", TagMode.StartTagAndEndTag);
selectTagHelperOutput.Attributes.AddClass("form-control");
selectTagHelperOutput.Attributes.AddClass(GetSize(context, output));
@ -123,7 +123,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
return "<label " + GetIdAttributeAsString(selectTag) + ">" + TagHelper.Label + "</label>" + GetRequiredSymbol(context, output);
}
return await GetLabelAsHtmlUsingTagHelperAsync(context, output).ConfigureAwait(false) + GetRequiredSymbol(context, output);
return await GetLabelAsHtmlUsingTagHelperAsync(context, output) + GetRequiredSymbol(context, output);
}
protected virtual string GetRequiredSymbol(TagHelperContext context, TagHelperOutput output)
@ -242,7 +242,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
ViewContext = TagHelper.ViewContext
};
return await labelTagHelper.RenderAsync(new TagHelperAttributeList(), context, _encoder, "label", TagMode.StartTagAndEndTag).ConfigureAwait(false);
return await labelTagHelper.RenderAsync(new TagHelperAttributeList(), context, _encoder, "label", TagMode.StartTagAndEndTag);
}
protected virtual async Task<string> GetValidationAsHtmlAsync(TagHelperContext context, TagHelperOutput output, TagHelperOutput inputTag)
@ -255,7 +255,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var attributeList = new TagHelperAttributeList { { "class", "text-danger" } };
return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag).ConfigureAwait(false);
return await validationMessageTagHelper.RenderAsync(attributeList, context, _encoder, "span", TagMode.StartTagAndEndTag);
}
protected virtual string GetSize(TagHelperContext context, TagHelperOutput output)

18
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs

@ -31,7 +31,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
}
ProcessMainTag(context, output);
await SetContentAsHtmlAsync(context, output).ConfigureAwait(false);
await SetContentAsHtmlAsync(context, output);
}
protected virtual async Task SetContentAsHtmlAsync(TagHelperContext context, TagHelperOutput output)
@ -39,9 +39,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
var html = new StringBuilder("");
html.AppendLine(GetOpeningTags(context, output));
html.AppendLine(await GetPreviousButtonAsync(context, output).ConfigureAwait(false));
html.AppendLine(await GetPagesAsync(context, output).ConfigureAwait(false));
html.AppendLine(await GetNextButton(context, output).ConfigureAwait(false));
html.AppendLine(await GetPreviousButtonAsync(context, output));
html.AppendLine(await GetPagesAsync(context, output));
html.AppendLine(await GetNextButton(context, output));
html.AppendLine(GetClosingTags(context, output));
output.Content.SetHtmlContent(html.ToString());
@ -61,7 +61,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
foreach (var page in TagHelper.Model.Pages)
{
pagesHtml.AppendLine(await GetPageAsync(context, output, page).ConfigureAwait(false));
pagesHtml.AppendLine(await GetPageAsync(context, output, page));
}
return pagesHtml.ToString();
@ -86,7 +86,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
}
else
{
pageHtml.AppendLine(await RenderAnchorTagHelperLinkHtmlAsync(context, output, page.Index.ToString(), page.Index.ToString()).ConfigureAwait(false));
pageHtml.AppendLine(await RenderAnchorTagHelperLinkHtmlAsync(context, output, page.Index.ToString(), page.Index.ToString()));
}
pageHtml.AppendLine("</li>");
@ -102,7 +102,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
: (TagHelper.Model.CurrentPage - 1).ToString();
return
"<li class=\"page-item " + (TagHelper.Model.CurrentPage == 1 ? "disabled" : "") + "\">\r\n" +
(await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey).ConfigureAwait(false)) + " </li>";
(await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey)) + " </li>";
}
protected virtual async Task<string> GetNextButton(TagHelperContext context, TagHelperOutput output)
@ -111,7 +111,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
var currentPage = (TagHelper.Model.CurrentPage + 1).ToString();
return
"<li class=\"page-item " + (TagHelper.Model.CurrentPage >= TagHelper.Model.TotalPageCount ? "disabled" : "") + "\">\r\n" +
(await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey).ConfigureAwait(false)) +
(await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey)) +
" </li>";
}
@ -121,7 +121,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination
var anchorTagHelper = GetAnchorTagHelper(currentPage, out var attributeList);
var tagHelperOutput = await anchorTagHelper.ProcessAndGetOutputAsync(attributeList, context, "a", TagMode.StartTagAndEndTag).ConfigureAwait(false);
var tagHelperOutput = await anchorTagHelper.ProcessAndGetOutputAsync(attributeList, context, "a", TagMode.StartTagAndEndTag);
tagHelperOutput.Content.SetHtmlContent(localizer[localizationKey]);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs

@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab
throw new Exception("Name of tab dropdown tag can not bu null or empty.");
}
await output.GetChildContentAsync().ConfigureAwait(false);
await output.GetChildContentAsync();
var tabHeader = GetTabHeaderItem(context, output);
var tabHeaderItems = context.GetValue<List<TabItem>>(TabItems);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs

@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab
{
SetPlaceholderForNameIfNotProvided();
var innerContent = await output.GetChildContentAsync().ConfigureAwait(false);
var innerContent = await output.GetChildContentAsync();
var tabHeader = GetTabHeaderItem(context, output);
var tabContent = GetTabContentItem(context, output, innerContent.GetContent());

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab
var items = InitilizeFormGroupContentsContext(context, output);
await output.GetChildContentAsync().ConfigureAwait(false);
await output.GetChildContentAsync();
var headers = GetHeaders(context, output, items);
var contents = GetConents(context, output, items);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

12
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs

@ -61,12 +61,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
public virtual async Task<IReadOnlyList<string>> GetStyleBundleFilesAsync(string bundleName)
{
return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler).ConfigureAwait(false);
return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler);
}
public virtual async Task<IReadOnlyList<string>> GetScriptBundleFilesAsync(string bundleName)
{
return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler).ConfigureAwait(false);
return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler);
}
protected virtual async Task<IReadOnlyList<string>> GetBundleFilesAsync(BundleConfigurationCollection bundles, string bundleName, IBundler bundler)
@ -185,17 +185,17 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
foreach (var contributor in contributors)
{
await contributor.PreConfigureBundleAsync(context).ConfigureAwait(false);
await contributor.PreConfigureBundleAsync(context);
}
foreach (var contributor in contributors)
{
await contributor.ConfigureBundleAsync(context).ConfigureAwait(false);
await contributor.ConfigureBundleAsync(context);
}
foreach (var contributor in contributors)
{
await contributor.PostConfigureBundleAsync(context).ConfigureAwait(false);
await contributor.PostConfigureBundleAsync(context);
}
return context.Files;
@ -207,7 +207,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
foreach (var contributor in contributors)
{
await contributor.ConfigureDynamicResourcesAsync(context).ConfigureAwait(false);
await contributor.ConfigureDynamicResourcesAsync(context);
}
return context.Files;

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleItemTagHelperService.cs

@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
TagHelper.CreateBundleTagHelperItem()
},
TagHelper.GetNameOrNull()
).ConfigureAwait(false);
);
}
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpBundleTagHelperService.cs

@ -20,16 +20,16 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
await ResourceService.ProcessAsync(
context,
output,
await GetBundleItems(context, output).ConfigureAwait(false),
await GetBundleItems(context, output),
TagHelper.GetNameOrNull()
).ConfigureAwait(false);
);
}
protected virtual async Task<List<BundleTagHelperItem>> GetBundleItems(TagHelperContext context, TagHelperOutput output)
{
var bundleItems = new List<BundleTagHelperItem>();
context.Items[AbpTagHelperConsts.ContextBundleItemListKey] = bundleItems;
await output.GetChildContentAsync().ConfigureAwait(false); //TODO: Is there a way of executing children without getting content?
await output.GetChildContentAsync(); //TODO: Is there a way of executing children without getting content?
return bundleItems;
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs

@ -56,7 +56,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
CreateBundle(bundleName, bundleItems);
var bundleFiles = await GetBundleFilesAsync(bundleName).ConfigureAwait(false);
var bundleFiles = await GetBundleFilesAsync(bundleName);
output.Content.Clear();

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs

@ -36,7 +36,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
protected override async Task<IReadOnlyList<string>> GetBundleFilesAsync(string bundleName)
{
return await BundleManager.GetScriptBundleFilesAsync(bundleName).ConfigureAwait(false);
return await BundleManager.GetScriptBundleFilesAsync(bundleName);
}
protected override void AddHtmlTag(TagHelperContext context, TagHelperOutput output, string file)

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs

@ -36,7 +36,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
protected override async Task<IReadOnlyList<string>> GetBundleFilesAsync(string bundleName)
{
return await BundleManager.GetStyleBundleFilesAsync(bundleName).ConfigureAwait(false);
return await BundleManager.GetStyleBundleFilesAsync(bundleName);
}
protected override void AddHtmlTag(TagHelperContext context, TagHelperOutput output, string file)

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs

@ -17,7 +17,7 @@ namespace Pages.Abp.MultiTenancy
public async Task<FindTenantResultDto> FindTenantByNameAsync(string name)
{
var tenant = await TenantStore.FindAsync(name).ConfigureAwait(false);
var tenant = await TenantStore.FindAsync(name);
if (tenant == null)
{
@ -34,7 +34,7 @@ namespace Pages.Abp.MultiTenancy
public async Task<FindTenantResultDto> FindTenantByIdAsync(Guid id)
{
var tenant = await TenantStore.FindAsync(id).ConfigureAwait(false);
var tenant = await TenantStore.FindAsync(id);
if (tenant == null)
{

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs

@ -21,14 +21,14 @@ namespace Pages.Abp.MultiTenancy
[Route("tenants/by-name/{name}")]
public async Task<FindTenantResultDto> FindTenantByNameAsync(string name)
{
return await _abpTenantAppService.FindTenantByNameAsync(name).ConfigureAwait(false);
return await _abpTenantAppService.FindTenantByNameAsync(name);
}
[HttpGet]
[Route("tenants/by-id/{id}")]
public async Task<FindTenantResultDto> FindTenantByIdAsync(Guid id)
{
return await _abpTenantAppService.FindTenantByIdAsync(id).ConfigureAwait(false);
return await _abpTenantAppService.FindTenantByIdAsync(id);
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs

@ -34,7 +34,7 @@ namespace Pages.Abp.MultiTenancy
if (CurrentTenant.IsAvailable)
{
var tenant = await TenantStore.FindAsync(CurrentTenant.GetId()).ConfigureAwait(false);
var tenant = await TenantStore.FindAsync(CurrentTenant.GetId());
Input.Name = tenant?.Name;
}
}
@ -47,7 +47,7 @@ namespace Pages.Abp.MultiTenancy
}
else
{
var tenant = await TenantStore.FindAsync(Input.Name).ConfigureAwait(false);
var tenant = await TenantStore.FindAsync(Input.Name);
if (tenant == null)
{
throw new UserFriendlyException(L["GivenTenantIsNotAvailable", Input.Name]);

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs

@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu
public async Task<IViewComponentResult> InvokeAsync()
{
var menu = await _menuManager.GetAsync(StandardMenus.Main).ConfigureAwait(false);
var menu = await _menuManager.GetAsync(StandardMenus.Main);
return View("~/Themes/Basic/Components/Menu/Default.cshtml", menu);
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar
public async Task<IViewComponentResult> InvokeAsync()
{
var languages = await _languageProvider.GetLanguagesAsync().ConfigureAwait(false);
var languages = await _languageProvider.GetLanguagesAsync();
var currentLanguage = languages.FindByCulture(
CultureInfo.CurrentCulture.Name,
CultureInfo.CurrentUICulture.Name

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs

@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar
public async Task<IViewComponentResult> InvokeAsync()
{
var toolbar = await _toolbarManager.GetAsync(StandardToolbars.Main).ConfigureAwait(false);
var toolbar = await _toolbarManager.GetAsync(StandardToolbars.Main);
return View("~/Themes/Basic/Components/Toolbar/Default.cshtml", toolbar);
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs

@ -15,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar
public async Task<IViewComponentResult> InvokeAsync()
{
var menu = await _menuManager.GetAsync(StandardMenus.User).ConfigureAwait(false);
var menu = await _menuManager.GetAsync(StandardMenus.User);
return View("~/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml", menu);
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs

@ -25,7 +25,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Toolbars
var languageProvider = context.ServiceProvider.GetService<ILanguageProvider>();
//TODO: This duplicates GetLanguages() usage. Can we eleminate this?
var languages = await languageProvider.GetLanguagesAsync().ConfigureAwait(false);
var languages = await languageProvider.GetLanguagesAsync();
if (languages.Count > 1)
{
context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitchViewComponent)));

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs

@ -33,7 +33,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars
foreach (var contributor in Options.Contributors)
{
await contributor.ConfigureToolbarAsync(context).ConfigureAwait(false);
await contributor.ConfigureToolbarAsync(context);
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

10
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/AbpViewComponentHelper.cs

@ -33,10 +33,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
var widget = Options.Widgets.Find(name);
if (widget == null)
{
return await DefaultViewComponentHelper.InvokeAsync(name, arguments).ConfigureAwait(false);
return await DefaultViewComponentHelper.InvokeAsync(name, arguments);
}
return await InvokeWidgetAsync(arguments, widget).ConfigureAwait(false);
return await InvokeWidgetAsync(arguments, widget);
}
public virtual async Task<IHtmlContent> InvokeAsync(Type componentType, object arguments)
@ -44,10 +44,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
var widget = Options.Widgets.Find(componentType);
if (widget == null)
{
return await DefaultViewComponentHelper.InvokeAsync(componentType, arguments).ConfigureAwait(false);
return await DefaultViewComponentHelper.InvokeAsync(componentType, arguments);
}
return await InvokeWidgetAsync(arguments, widget).ConfigureAwait(false);
return await InvokeWidgetAsync(arguments, widget);
}
public virtual void Contextualize(ViewContext viewContext)
@ -68,7 +68,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
return new HtmlContentBuilder()
.AppendHtml($"<div {wrapperAttributesBuilder}>")
.AppendHtml(await DefaultViewComponentHelper.InvokeAsync(widget.ViewComponentType, arguments).ConfigureAwait(false))
.AppendHtml(await DefaultViewComponentHelper.InvokeAsync(widget.ViewComponentType, arguments))
.AppendHtml("</div>");
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetManager.cs

@ -27,14 +27,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
{
var widget = Options.Widgets.Find(widgetComponentType);
return await IsGrantedAsyncInternal(widget, widgetComponentType.FullName).ConfigureAwait(false);
return await IsGrantedAsyncInternal(widget, widgetComponentType.FullName);
}
public async Task<bool> IsGrantedAsync(string name)
{
var widget = Options.Widgets.Find(name);
return await IsGrantedAsyncInternal(widget, name).ConfigureAwait(false);
return await IsGrantedAsyncInternal(widget, name);
}
private async Task<bool> IsGrantedAsyncInternal(WidgetDefinition widget, string wantedWidgetName)
@ -48,7 +48,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets
{
foreach (var requiredPolicy in widget.RequiredPolicies)
{
if (!(await AuthorizationService.AuthorizeAsync(requiredPolicy).ConfigureAwait(false)).Succeeded)
if (!(await AuthorizationService.AuthorizeAsync(requiredPolicy)).Succeeded)
{
return false;
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Mvc/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

16
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs

@ -56,12 +56,12 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
return new ApplicationConfigurationDto
{
Auth = await GetAuthConfigAsync().ConfigureAwait(false),
Features = await GetFeaturesConfigAsync().ConfigureAwait(false),
Localization = await GetLocalizationConfigAsync().ConfigureAwait(false),
Auth = await GetAuthConfigAsync(),
Features = await GetFeaturesConfigAsync(),
Localization = await GetLocalizationConfigAsync(),
CurrentUser = GetCurrentUser(),
Setting = await GetSettingConfigAsync()
.ConfigureAwait(false)
};
}
@ -82,7 +82,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
var authConfig = new ApplicationAuthConfigurationDto();
var policyNames = await _abpAuthorizationPolicyProvider.GetPoliciesNamesAsync().ConfigureAwait(false);
var policyNames = await _abpAuthorizationPolicyProvider.GetPoliciesNamesAsync();
Logger.LogDebug($"GetPoliciesNamesAsync returns {policyNames.Count} items.");
@ -92,7 +92,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
Logger.LogDebug($"_authorizationService.IsGrantedAsync? {policyName}");
if (await _authorizationService.IsGrantedAsync(policyName).ConfigureAwait(false))
if (await _authorizationService.IsGrantedAsync(policyName))
{
authConfig.GrantedPolicies[policyName] = true;
}
@ -175,7 +175,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
continue;
}
result.Values[settingDefinition.Name] = await _settingProvider.GetOrNullAsync(settingDefinition.Name).ConfigureAwait(false);
result.Values[settingDefinition.Name] = await _settingProvider.GetOrNullAsync(settingDefinition.Name);
}
Logger.LogDebug("Executed AbpApplicationConfigurationAppService.GetSettingConfigAsync()");
@ -196,7 +196,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
continue;
}
result.Values[featureDefinition.Name] = await FeatureChecker.GetOrNullAsync(featureDefinition.Name).ConfigureAwait(false);
result.Values[featureDefinition.Name] = await FeatureChecker.GetOrNullAsync(featureDefinition.Name);
}
Logger.LogDebug("Executed AbpApplicationConfigurationAppService.GetFeaturesConfigAsync()");

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
[HttpGet]
public async Task<ApplicationConfigurationDto> GetAsync()
{
return await _applicationConfigurationAppService.GetAsync().ConfigureAwait(false);
return await _applicationConfigurationAppService.GetAsync();
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs

@ -35,7 +35,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
[Produces(MimeTypes.Application.Javascript, MimeTypes.Text.Plain)]
public async Task<ActionResult> Get()
{
var script = CreateAbpExtendScript(await _configurationAppService.GetAsync().ConfigureAwait(false));
var script = CreateAbpExtendScript(await _configurationAppService.GetAsync());
return Content(
_options.MinifyGeneratedScript == true

4
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Auditing/AbpAuditActionFilter.cs

@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Auditing
{
if (!ShouldSaveAudit(context, out var auditLog, out var auditLogAction))
{
await next().ConfigureAwait(false);
await next();
return;
}
@ -37,7 +37,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Auditing
try
{
var result = await next().ConfigureAwait(false);
var result = await next();
if (result.Exception != null && !result.ExceptionHandled)
{

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs

@ -40,7 +40,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication
[HttpGet]
public async Task<ActionResult> Logout(string returnUrl = "", string returnUrlHash = "")
{
await HttpContext.SignOutAsync().ConfigureAwait(false);
await HttpContext.SignOutAsync();
return RedirectSafely(returnUrl, returnUrlHash);
}

6
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Features/AbpFeatureActionFilter.cs

@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Features
{
if (!context.ActionDescriptor.IsControllerAction())
{
await next().ConfigureAwait(false);
await next();
return;
}
@ -33,9 +33,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Features
{
await _methodInvocationAuthorizationService.CheckAsync(
new MethodInvocationFeatureCheckerContext(methodInfo)
).ConfigureAwait(false);
);
await next().ConfigureAwait(false);
await next();
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinder.cs

@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding
public async Task BindModelAsync(ModelBindingContext bindingContext)
{
await _simpleTypeModelBinder.BindModelAsync(bindingContext).ConfigureAwait(false);
await _simpleTypeModelBinder.BindModelAsync(bindingContext);
if (!bindingContext.Result.IsModelSet)
{

14
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs

@ -25,7 +25,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow
{
if (!context.ActionDescriptor.IsControllerAction())
{
await next().ConfigureAwait(false);
await next();
return;
}
@ -39,7 +39,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow
if (unitOfWorkAttr?.IsDisabled == true)
{
await next().ConfigureAwait(false);
await next();
return;
}
@ -48,10 +48,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow
//Trying to begin a reserved UOW by AbpUnitOfWorkMiddleware
if (_unitOfWorkManager.TryBeginReserved(AbpUnitOfWorkMiddleware.UnitOfWorkReservationName, options))
{
var result = await next().ConfigureAwait(false);
var result = await next();
if (!Succeed(result))
{
await RollbackAsync(context).ConfigureAwait(false);
await RollbackAsync(context);
}
return;
@ -60,10 +60,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow
//Begin a new, independent unit of work
using (var uow = _unitOfWorkManager.Begin(options))
{
var result = await next().ConfigureAwait(false);
var result = await next();
if (Succeed(result))
{
await uow.CompleteAsync(context.HttpContext.RequestAborted).ConfigureAwait(false);
await uow.CompleteAsync(context.HttpContext.RequestAborted);
}
}
}
@ -89,7 +89,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow
var currentUow = _unitOfWorkManager.Current;
if (currentUow != null)
{
await currentUow.RollbackAsync(context.HttpContext.RequestAborted).ConfigureAwait(false);
await currentUow.RollbackAsync(context.HttpContext.RequestAborted);
}
}

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

@ -21,12 +21,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation
if (!context.ActionDescriptor.IsControllerAction() ||
!context.ActionDescriptor.HasObjectResult())
{
await next().ConfigureAwait(false);
await next();
return;
}
_validator.Validate(context.ModelState);
await next().ConfigureAwait(false);
await next();
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Serilog/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore.Serilog/Volo/Abp/AspNetCore/Serilog/AbpSerilogMiddleware.cs

@ -62,7 +62,7 @@ namespace Volo.Abp.AspNetCore.Serilog
using (LogContext.Push(enrichers.ToArray()))
{
await next(context).ConfigureAwait(false);
await next(context);
}
}
}

2
framework/src/Volo.Abp.AspNetCore.TestBase/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.AspNetCore/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

4
framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs

@ -27,11 +27,11 @@ namespace Microsoft.AspNetCore.RequestLocalization
next,
new OptionsWrapper<RequestLocalizationOptions>(
await _requestLocalizationOptionsProvider.GetLocalizationOptionsAsync()
.ConfigureAwait(false)),
),
_loggerFactory
);
await middleware.Invoke(context).ConfigureAwait(false);
await middleware.Invoke(context);
}
}
}

6
framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs

@ -36,15 +36,15 @@ namespace Microsoft.AspNetCore.RequestLocalization
{
if (_requestLocalizationOptions == null)
{
using (await _syncSemaphore.LockAsync().ConfigureAwait(false))
using (await _syncSemaphore.LockAsync())
{
using (var serviceScope = _serviceProviderFactory.CreateScope())
{
var languageProvider = serviceScope.ServiceProvider.GetRequiredService<ILanguageProvider>();
var settingProvider = serviceScope.ServiceProvider.GetRequiredService<ISettingProvider>();
var languages = await languageProvider.GetLanguagesAsync().ConfigureAwait(false);
var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage).ConfigureAwait(false);
var languages = await languageProvider.GetLanguagesAsync();
var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage);
var options = !languages.Any()
? new RequestLocalizationOptions()

6
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs

@ -30,7 +30,7 @@ namespace Volo.Abp.AspNetCore.Auditing
{
if (!ShouldWriteAuditLog(context))
{
await next(context).ConfigureAwait(false);
await next(context);
return;
}
@ -38,11 +38,11 @@ namespace Volo.Abp.AspNetCore.Auditing
{
try
{
await next(context).ConfigureAwait(false);
await next(context);
}
finally
{
await scope.SaveAsync().ConfigureAwait(false);
await scope.SaveAsync();
}
}
}

6
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs

@ -29,7 +29,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling
{
try
{
await next(context).ConfigureAwait(false);
await next(context);
}
catch (Exception ex)
{
@ -44,7 +44,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling
{
if (actionInfo.IsObjectResult) //TODO: Align with AbpExceptionFilter.ShouldHandleException!
{
await HandleAndWrapException(context, ex).ConfigureAwait(false);
await HandleAndWrapException(context, ex);
return;
}
}
@ -72,7 +72,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling
errorInfoConverter.Convert(exception)
)
)
).ConfigureAwait(false);
);
}
private Task ClearCacheHeaders(object state)

2
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs

@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Tracing
try
{
await next(context).ConfigureAwait(false);
await next(context);
}
finally
{

4
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs

@ -20,8 +20,8 @@ namespace Volo.Abp.AspNetCore.Uow
{
using (var uow = _unitOfWorkManager.Reserve(UnitOfWorkReservationName))
{
await next(context).ConfigureAwait(false);
await uow.CompleteAsync(context.RequestAborted).ConfigureAwait(false);
await next(context);
await uow.CompleteAsync(context.RequestAborted);
}
}
}

2
framework/src/Volo.Abp.Auditing/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

4
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingInterceptor.cs

@ -22,7 +22,7 @@ namespace Volo.Abp.Auditing
{
if (!ShouldIntercept(invocation, out var auditLog, out var auditLogAction))
{
await invocation.ProceedAsync().ConfigureAwait(false);
await invocation.ProceedAsync();
return;
}
@ -30,7 +30,7 @@ namespace Volo.Abp.Auditing
try
{
await invocation.ProceedAsync().ConfigureAwait(false);
await invocation.ProceedAsync();
}
catch (Exception ex)
{

4
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs

@ -116,7 +116,7 @@ namespace Volo.Abp.Auditing
if (ShouldSave(saveHandle.AuditLog))
{
await _auditingStore.SaveAsync(saveHandle.AuditLog).ConfigureAwait(false);
await _auditingStore.SaveAsync(saveHandle.AuditLog);
}
}
@ -152,7 +152,7 @@ namespace Volo.Abp.Auditing
public async Task SaveAsync()
{
await _auditingManager.SaveAsync(this).ConfigureAwait(false);
await _auditingManager.SaveAsync(this);
}
public void Dispose()

2
framework/src/Volo.Abp.Authorization/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

38
framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AbpAuthorizationServiceExtensions.cs

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Authorization
authorizationService,
null,
policyName
).ConfigureAwait(false);
);
}
public static async Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService authorizationService, object resource, IAuthorizationRequirement requirement)
@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Authorization
authorizationService.AsAbpAuthorizationService().CurrentPrincipal,
resource,
requirement
).ConfigureAwait(false);
);
}
public static async Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService authorizationService, object resource, AuthorizationPolicy policy)
@ -31,16 +31,16 @@ namespace Microsoft.AspNetCore.Authorization
authorizationService.AsAbpAuthorizationService().CurrentPrincipal,
resource,
policy
).ConfigureAwait(false);
);
}
public static async Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService authorizationService, AuthorizationPolicy policy)
{
return await AuthorizeAsync(
authorizationService,
authorizationService,
null,
policy
).ConfigureAwait(false);
);
}
public static async Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService authorizationService, object resource, IEnumerable<IAuthorizationRequirement> requirements)
@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Authorization
authorizationService.AsAbpAuthorizationService().CurrentPrincipal,
resource,
requirements
).ConfigureAwait(false);
);
}
public static async Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService authorizationService, object resource, string policyName)
@ -58,42 +58,42 @@ namespace Microsoft.AspNetCore.Authorization
authorizationService.AsAbpAuthorizationService().CurrentPrincipal,
resource,
policyName
).ConfigureAwait(false);
);
}
public static async Task<bool> IsGrantedAsync(this IAuthorizationService authorizationService, string policyName)
{
return (await authorizationService.AuthorizeAsync(policyName).ConfigureAwait(false)).Succeeded;
return (await authorizationService.AuthorizeAsync(policyName)).Succeeded;
}
public static async Task<bool> IsGrantedAsync(this IAuthorizationService authorizationService, object resource, IAuthorizationRequirement requirement)
{
return (await authorizationService.AuthorizeAsync(resource, requirement).ConfigureAwait(false)).Succeeded;
return (await authorizationService.AuthorizeAsync(resource, requirement)).Succeeded;
}
public static async Task<bool> IsGrantedAsync(this IAuthorizationService authorizationService, object resource, AuthorizationPolicy policy)
{
return (await authorizationService.AuthorizeAsync(resource, policy).ConfigureAwait(false)).Succeeded;
return (await authorizationService.AuthorizeAsync(resource, policy)).Succeeded;
}
public static async Task<bool> IsGrantedAsync(this IAuthorizationService authorizationService, AuthorizationPolicy policy)
{
return (await authorizationService.AuthorizeAsync(policy).ConfigureAwait(false)).Succeeded;
return (await authorizationService.AuthorizeAsync(policy)).Succeeded;
}
public static async Task<bool> IsGrantedAsync(this IAuthorizationService authorizationService, object resource, IEnumerable<IAuthorizationRequirement> requirements)
{
return (await authorizationService.AuthorizeAsync(resource, requirements).ConfigureAwait(false)).Succeeded;
return (await authorizationService.AuthorizeAsync(resource, requirements)).Succeeded;
}
public static async Task<bool> IsGrantedAsync(this IAuthorizationService authorizationService, object resource, string policyName)
{
return (await authorizationService.AuthorizeAsync(resource, policyName).ConfigureAwait(false)).Succeeded;
return (await authorizationService.AuthorizeAsync(resource, policyName)).Succeeded;
}
public static async Task CheckAsync(this IAuthorizationService authorizationService, string policyName)
{
if (!await authorizationService.IsGrantedAsync(policyName).ConfigureAwait(false))
if (!await authorizationService.IsGrantedAsync(policyName))
{
throw new AbpAuthorizationException("Authorization failed! Given policy has not granted: " + policyName);
}
@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.Authorization
public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, IAuthorizationRequirement requirement)
{
if (!await authorizationService.IsGrantedAsync(resource, requirement).ConfigureAwait(false))
if (!await authorizationService.IsGrantedAsync(resource, requirement))
{
throw new AbpAuthorizationException("Authorization failed! Given requirement has not granted for given resource: " + resource);
}
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Authorization
public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, AuthorizationPolicy policy)
{
if (!await authorizationService.IsGrantedAsync(resource, policy).ConfigureAwait(false))
if (!await authorizationService.IsGrantedAsync(resource, policy))
{
throw new AbpAuthorizationException("Authorization failed! Given policy has not granted for given resource: " + resource);
}
@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Authorization
public static async Task CheckAsync(this IAuthorizationService authorizationService, AuthorizationPolicy policy)
{
if (!await authorizationService.IsGrantedAsync(policy).ConfigureAwait(false))
if (!await authorizationService.IsGrantedAsync(policy))
{
throw new AbpAuthorizationException("Authorization failed! Given policy has not granted.");
}
@ -125,7 +125,7 @@ namespace Microsoft.AspNetCore.Authorization
public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, IEnumerable<IAuthorizationRequirement> requirements)
{
if (!await authorizationService.IsGrantedAsync(resource, requirements).ConfigureAwait(false))
if (!await authorizationService.IsGrantedAsync(resource, requirements))
{
throw new AbpAuthorizationException("Authorization failed! Given requirements have not granted for given resource: " + resource);
}
@ -133,7 +133,7 @@ namespace Microsoft.AspNetCore.Authorization
public static async Task CheckAsync(this IAuthorizationService authorizationService, object resource, string policyName)
{
if (!await authorizationService.IsGrantedAsync(resource, policyName).ConfigureAwait(false))
if (!await authorizationService.IsGrantedAsync(resource, policyName))
{
throw new AbpAuthorizationException("Authorization failed! Given polist has not granted for given resource: " + resource);
}

2
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationPolicyProvider.cs

@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization
public override async Task<AuthorizationPolicy> GetPolicyAsync(string policyName)
{
var policy = await base.GetPolicyAsync(policyName).ConfigureAwait(false);
var policy = await base.GetPolicyAsync(policyName);
if (policy != null)
{
return policy;

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

@ -15,8 +15,8 @@ namespace Volo.Abp.Authorization
public override async Task InterceptAsync(IAbpMethodInvocation invocation)
{
await AuthorizeAsync(invocation).ConfigureAwait(false);
await invocation.ProceedAsync().ConfigureAwait(false);
await AuthorizeAsync(invocation);
await invocation.ProceedAsync();
}
protected virtual async Task AuthorizeAsync(IAbpMethodInvocation invocation)
@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization
new MethodInvocationAuthorizationContext(
invocation.Method
)
).ConfigureAwait(false);
);
}
}
}

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

@ -34,7 +34,7 @@ namespace Volo.Abp.Authorization
foreach (var authorizationAttribute in GetAuthorizationDataAttributes(context.Method))
{
await CheckAsync(authorizationAttribute).ConfigureAwait(false);
await CheckAsync(authorizationAttribute);
}
}
@ -74,7 +74,7 @@ namespace Volo.Abp.Authorization
}
else
{
await _authorizationService.CheckAsync(authorizationAttribute.Policy).ConfigureAwait(false);
await _authorizationService.CheckAsync(authorizationAttribute.Policy);
}
//TODO: What about roles and other props?

2
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/PermissionRequirementHandler.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.Authorization
AuthorizationHandlerContext context,
PermissionRequirement requirement)
{
if (await _permissionChecker.IsGrantedAsync(context.User, requirement.PermissionName).ConfigureAwait(false))
if (await _permissionChecker.IsGrantedAsync(context.User, requirement.PermissionName))
{
context.Succeed(requirement);
}

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

@ -24,8 +24,8 @@ namespace Volo.Abp.Authorization.Permissions
return PermissionGrantResult.Undefined;
}
return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId)
.ConfigureAwait(false) ? PermissionGrantResult.Granted
return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId)
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined;
}
}

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

@ -29,7 +29,7 @@ namespace Volo.Abp.Authorization.Permissions
public virtual async Task<bool> IsGrantedAsync(string name)
{
return await IsGrantedAsync(PrincipalAccessor.Principal, name).ConfigureAwait(false);
return await IsGrantedAsync(PrincipalAccessor.Principal, name);
}
public virtual async Task<bool> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name)
@ -56,7 +56,7 @@ namespace Volo.Abp.Authorization.Permissions
continue;
}
var result = await provider.CheckAsync(context).ConfigureAwait(false);
var result = await provider.CheckAsync(context);
if (result == PermissionGrantResult.Granted)
{

2
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs

@ -27,7 +27,7 @@ namespace Volo.Abp.Authorization.Permissions
foreach (var role in roles)
{
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role).ConfigureAwait(false))
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role))
{
return PermissionGrantResult.Granted;
}

2
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs

@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization.Permissions
}
return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, userId)
.ConfigureAwait(false) ? PermissionGrantResult.Granted
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined;
}
}

2
framework/src/Volo.Abp.AutoMapper/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.Autofac/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.BackgroundJobs.Abstractions/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

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

@ -40,7 +40,7 @@ namespace Volo.Abp.BackgroundJobs
{
if (jobExecuteMethod.Name == nameof(IAsyncBackgroundJob<object>.ExecuteAsync))
{
await ((Task) jobExecuteMethod.Invoke(job, new[] {context.JobArgs})).ConfigureAwait(false);
await ((Task) jobExecuteMethod.Invoke(job, new[] {context.JobArgs}));
}
else
{

2
framework/src/Volo.Abp.BackgroundJobs.HangFire/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

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

@ -72,11 +72,11 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
{
CheckDisposed();
using (await SyncObj.LockAsync().ConfigureAwait(false))
using (await SyncObj.LockAsync())
{
await EnsureInitializedAsync().ConfigureAwait(false);
await EnsureInitializedAsync();
await PublishAsync(args, priority, delay).ConfigureAwait(false);
await PublishAsync(args, priority, delay);
return null;
}
@ -91,9 +91,9 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
return;
}
using (await SyncObj.LockAsync().ConfigureAwait(false))
using (await SyncObj.LockAsync())
{
await EnsureInitializedAsync().ConfigureAwait(false);
await EnsureInitializedAsync();
}
}

8
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs

@ -40,7 +40,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
foreach (var jobConfiguration in Options.GetJobs())
{
var jobQueue = (IRunnable)ServiceProvider.GetRequiredService(typeof(IJobQueue<>).MakeGenericType(jobConfiguration.ArgsType));
await jobQueue.StartAsync(cancellationToken).ConfigureAwait(false);
await jobQueue.StartAsync(cancellationToken);
JobQueues[jobConfiguration.JobName] = jobQueue;
}
}
@ -49,7 +49,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
{
foreach (var jobQueue in JobQueues.Values)
{
await jobQueue.StopAsync(cancellationToken).ConfigureAwait(false);
await jobQueue.StopAsync(cancellationToken);
}
JobQueues.Clear();
@ -64,7 +64,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
return (IJobQueue<TArgs>)jobQueue;
}
using (await SyncSemaphore.LockAsync().ConfigureAwait(false))
using (await SyncSemaphore.LockAsync())
{
if (JobQueues.TryGetValue(jobConfiguration.JobName, out jobQueue))
{
@ -74,7 +74,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
jobQueue = (IJobQueue<TArgs>)ServiceProvider
.GetRequiredService(typeof(IJobQueue<>).MakeGenericType(typeof(TArgs)));
await jobQueue.StartAsync().ConfigureAwait(false);
await jobQueue.StartAsync();
JobQueues.TryAdd(jobConfiguration.JobName, jobQueue);

4
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/RabbitMqBackgroundJobManager.cs

@ -19,8 +19,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
BackgroundJobPriority priority = BackgroundJobPriority.Normal,
TimeSpan? delay = null)
{
var jobQueue = await _jobQueueManager.GetAsync<TArgs>().ConfigureAwait(false);
return await jobQueue.EnqueueAsync(args, priority, delay).ConfigureAwait(false);
var jobQueue = await _jobQueueManager.GetAsync<TArgs>();
return await jobQueue.EnqueueAsync(args, priority, delay);
}
}
}

2
framework/src/Volo.Abp.BackgroundJobs/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

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

@ -34,7 +34,7 @@ namespace Volo.Abp.BackgroundJobs
{
var store = workerContext.ServiceProvider.GetRequiredService<IBackgroundJobStore>();
var waitingJobs = await store.GetWaitingJobsAsync(WorkerOptions.MaxJobFetchCount).ConfigureAwait(false);
var waitingJobs = await store.GetWaitingJobsAsync(WorkerOptions.MaxJobFetchCount);
if (!waitingJobs.Any())
{
@ -58,9 +58,9 @@ namespace Volo.Abp.BackgroundJobs
try
{
await jobExecuter.ExecuteAsync(context).ConfigureAwait(false);
await jobExecuter.ExecuteAsync(context);
await store.DeleteAsync(jobInfo.Id).ConfigureAwait(false);
await store.DeleteAsync(jobInfo.Id);
}
catch (BackgroundJobExecutionException)
{
@ -75,14 +75,14 @@ namespace Volo.Abp.BackgroundJobs
jobInfo.IsAbandoned = true;
}
await TryUpdateAsync(store, jobInfo).ConfigureAwait(false);
await TryUpdateAsync(store, jobInfo);
}
}
catch (Exception ex)
{
Logger.LogException(ex);
jobInfo.IsAbandoned = true;
await TryUpdateAsync(store, jobInfo).ConfigureAwait(false);
await TryUpdateAsync(store, jobInfo);
}
}
}
@ -91,7 +91,7 @@ namespace Volo.Abp.BackgroundJobs
{
try
{
await store.UpdateAsync(jobInfo).ConfigureAwait(false);
await store.UpdateAsync(jobInfo);
}
catch (Exception updateEx)
{

4
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/DefaultBackgroundJobManager.cs

@ -32,7 +32,7 @@ namespace Volo.Abp.BackgroundJobs
public virtual async Task<string> EnqueueAsync<TArgs>(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
{
var jobName = BackgroundJobNameAttribute.GetName<TArgs>();
var jobId = await EnqueueAsync(jobName, args, priority, delay).ConfigureAwait(false);
var jobId = await EnqueueAsync(jobName, args, priority, delay);
return jobId.ToString();
}
@ -53,7 +53,7 @@ namespace Volo.Abp.BackgroundJobs
jobInfo.NextTryTime = Clock.Now.Add(delay.Value);
}
await Store.InsertAsync(jobInfo).ConfigureAwait(false);
await Store.InsertAsync(jobInfo);
return jobInfo.Id;
}

2
framework/src/Volo.Abp.BackgroundWorkers/FodyWeavers.xml

@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

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

Loading…
Cancel
Save