umbraco / Umbraco.Headless.Client.Net

.NET Client Library and Samples for the Umbraco headless cms Cloud Service called Umbraco Heartcore
https://umbraco.com/products/umbraco-heartcore/
13 stars 14 forks source link

Fixes violation of static code analysis rule CA2007 #24

Closed balanikas closed 4 years ago

balanikas commented 4 years ago

As this is library code that is agnostic to the app model it might be used in, ConfigureAwait(false) should be used.

More info about the rule here: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2007?view=vs-2019

More info about ConfigureAwait (a deep dive) here: https://devblogs.microsoft.com/dotnet/configureawait-faq/

sitereactor commented 4 years ago

Hey @balanikas thanks for submitting this! Very good to get this added, so appreciate that you highlighted this.

@rasmusjp this looks good to me. Do you want to have a look as well?

rasmusjp commented 4 years ago

Looks good to me too.

The analyzer is revealing some other violations we'll need to look at, I think some of them can be ignored while others should be fixed.

sitereactor commented 4 years ago

@rasmusjp are these violations something that will "break" the build or are they just warnings? Just curious if there is something we need to change or so differently before we merge this PR.

rasmusjp commented 4 years ago

They are just warnings so it should be fine to merge this and then look at them later.

sitereactor commented 4 years ago

:shipit: ... Thanks for the contribution @balanikas much appreciated 🙌