phasTrak / AsyncApostle

MIT License
20 stars 3 forks source link

Do not warn usages of Result in ContinueWith #7

Open FstTesla opened 2 years ago

FstTesla commented 2 years ago

Usage of property Task.Result in the continuation function of any overload of Task.ContinueWith should not raise a warning. In fact, this is a scenario (AFAICT the only one) where it is the correct way of accessing the result of a Task.

Example:

await task.ContinueWith(t => { ... t.Result ... });
                                // ^ there should be no warning here