icsharpcode/NRefactory — pull request #298 by luiscubal (2013-08-28 01:39:21+00:00)
Title: Auto Async Issue

Converts classic TaskCompletionSource/ContinueWith code to new async/await.
Disabled for C# < 5.0.

```csharp
public Task MyTask() {
var tcs = new TaskCompletionSource();
Task.Run(() => { Console.WriteLine(1); })
.ContinueWith(precedent => { Console.WriteLine(2); })
.ContinueWith(precedent => {
Task.Run(() => { Console.WriteLine(3); }).ContinueWith(precedent2 => { tcs.SetResult(42); });
});
return tcs.Task;
}
//Becomes:
public async Task MyTask() {
await Task.Run(() => { Console.WriteLine(1); });
Console.WriteLine(2);
await Task.Run(() => { Console.WriteLine(3); });
return 42;
}
```