Do not await an async method

From this answer on StackOverflow – to avoid the compiler warning you about not awaiting an async method. Not sure if this is the best answer, but it works for me:

public static class TaskExtensions
public static void DoNotAwait(this Task task) { }


Leave a Reply

Your email address will not be published.