I am using the excellent library from Steven called AsyncEx to help me baby-step the transition of an old codebases across to the async world.
The docs say..
class Program
{
static async Task<int> AsyncMain()
{
..
}
static int Main(string[] args)
{
return AsyncContext.Run(AsyncMain);
}
}
When calling a method with a different signature, should I be doing..
var blah = AsyncContext.Run(() => MyMethodAsync(myvar));
or specify the async/wait in the call?
var blah = AsyncContext.Run( async () => await MyMethodAsync(myvar));
or, doesn't it matter?