How would one use c# async features to simulate js-style callbacks? (see: node.js fs API )
Imagine I have the following C# method:
async Task<string> ReadFileAsync(string path)
{
return await DoWhatever(path);
}
How would I register a js function which takes a string and a callback as arguments and calls it asynchronously?