I have a public async void Foo() method that I want to call from synchronous method. So far all I have seen from MSDN documentation is calling async methods via
public async void Foo()
var result = Task.Run(async () => await configManager.GetConfigurationAsync()).ConfigureAwait(false); OpenIdConnectConfiguration config = result.GetAwaiter().GetResult();
Or use this:
var result=result.GetAwaiter().GetResult().AccessToken