If you cannot use async and await, use AsyncMethodCaller to easily make asynchronous calls. The code becomes testable and it works perfectly in ViewModels.
Install-Package AsyncMethodCaller -Version 1.0.2
dotnet add package AsyncMethodCaller --version 1.0.2
<PackageReference Include="AsyncMethodCaller" Version="1.0.2" />
paket add AsyncMethodCaller --version 1.0.2
#r "nuget: AsyncMethodCaller, 1.0.2"
// Install AsyncMethodCaller as a Cake Addin #addin nuget:?package=AsyncMethodCaller&version=1.0.2 // Install AsyncMethodCaller as a Cake Tool #tool nuget:?package=AsyncMethodCaller&version=1.0.2
This package has no dependencies.
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.