Skip to content

Commit

Permalink
Fixing async voids (Lombiq Technologies: OCORE-192) (#16441)
Browse files Browse the repository at this point in the history
  • Loading branch information
Piedone authored Jul 15, 2024
1 parent 29cd5fb commit 20f5aa4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task<IActionResult> Test()
Provider = _emailOptions.DefaultProviderName,
};

PopulateModel(model);
await PopulateModelAsync(model);

return View(model);
}
Expand Down Expand Up @@ -107,7 +107,7 @@ public async Task<IActionResult> Test(EmailTestViewModel model)
}
}

PopulateModel(model);
await PopulateModelAsync(model);

return View(model);
}
Expand Down Expand Up @@ -140,7 +140,7 @@ private static MailMessage GetMessage(EmailTestViewModel testSettings)
return message;
}

private async void PopulateModel(EmailTestViewModel model)
private async Task PopulateModelAsync(EmailTestViewModel model)
{
var options = new List<SelectListItem>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public AzureAISearchDefaultOptionsConfigurations(
_siteService = siteService;
}

public async void Configure(AzureAISearchDefaultOptions options)
public void Configure(AzureAISearchDefaultOptions options)
{
var fileOptions = _shellConfiguration.GetSection("OrchardCore_AzureAISearch")
.Get<AzureAISearchDefaultOptions>()
Expand All @@ -49,7 +49,9 @@ public async void Configure(AzureAISearchDefaultOptions options)
else
{
// At this point, we can allow the user to update the settings from UI.
var settings = await _siteService.GetSettingsAsync<AzureAISearchDefaultSettings>();
var settings = _siteService.GetSettingsAsync<AzureAISearchDefaultSettings>()
.GetAwaiter()
.GetResult();

if (settings.UseCustomConfiguration)
{
Expand Down

0 comments on commit 20f5aa4

Please sign in to comment.