-
Couldn't load subscription status.
- Fork 582
Description
Hi,
I'm migrating my code from v6 to v8.
Previously, I would send an email like this:
var transportWeb = new Web(SendGridApiKey); await transportWeb.DeliverAsync(emailMessage).ConfigureAwait(false);
With v8, I am required to do something like this:
var mailClient = new SendGridAPIClient(SendGridApiKey); dynamic response = await mailClient.client.mail.send.post(requestBody: mail.Get());
The code is missing ConfigureAwait(false) - and as far as I am aware, this is required for proper async handling.
Due to the dynamic nature of the API, i can add it, but this results in an exception with the message:
'System.Runtime.CompilerServices.ConfiguredTaskAwaitable<SendGrid.CSharp.HTTP.Client.Response>'
So, how can I add ConfigureAwait(false) to make this follow the async guidelines?
Thanks,
Steve