AArnott / CodeGeneration.Roslyn

Assists in performing Roslyn-based code generation during a build.
Microsoft Public License
408 stars 60 forks source link

Do not use Task.GetAwaiter().GetResult() #176

Closed Corniel closed 4 years ago

Corniel commented 4 years ago

Using Task.GetAwaiter().GetResult() is discouraged. So don't use it.

This is simple refactoring. I'm not sure if is breaks a public contract, but I guess not. I searched for GetAwaiter, GetResult and GetRoot (from SyntaxTree). I assume, I found all code that should be called async. If not, It should not be that hard (assumption) to change that too.

I skipped Console.WriteLineAsync() but, that might be reconsidered.