コールバック関数をパラメーターとして受け入れる既存の非同期メソッドをタスク並列ライブラリ互換メソッドにラップする方法は?
// Existing method
void DoAsync(Action<string> callback) {
...
}
// The desired method should have similar prototype
Task<string> DoAsync() {
// Internally this method should call existing
// version of DoAsync method (see above)
}