@reyang , i was looking at this and i have one question about our current project structure.
Right now, we have the following folders with code:
Right now, we have the StyleCop in Common.props. So, it's analyzing all projects inside examples, src, test. But, if we add the same to FxCop, we will receive some errors from examples code that I think is not a priority.
What do you suggest? Should we create another props? Is it possible to create a condition based on the folder? To enable only for the src, for example. Or, should we solve everything?
I guess at this stage we only need fxcop in Common.prod.props.
Agree the priority is to get it into the main source. I think second priority is actually the examples, so that we provide best-practice stuff to our future friends. Third is tests. Fourth is happy hour.
I was looking at the current errors that FxCop shows, below a list:
Should we really do this?
My thoughts...
Turn off (set to None via ruleset):
Leave on:
.ConfigureAwait(false)? So the warning is valid IMO.Ok, after those PR's, we still have some issues to solve (~100).
The one's that I'm not sure the overhead and if we should do it:
ToString and add the InvariantCulture optionStringComparison.IgnoreCulture or other option.What do you think?
@eddynaka I'm not 100% certain, but I feel like there would actually be slightly less overhead if we specified the format/culture to use. Because if we don't specify it, the framework has to go and look up the current culture. Probably OK to just use invariant everywhere. @reyang What do you think?
I think in this project we should use either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, depending on the scenario.
We need to use ToString with InvariantCulture everywhere as we're not dealing with UI (e.g. we don't expect an internal exception to be translated to Chinese; we don't expect 12345 to be formatted to "12,345").
I think in this project we should use either
StringComparison.OrdinalorStringComparison.OrdinalIgnoreCase, depending on the scenario.We need to use
ToStringwithInvariantCultureeverywhere as we're not dealing with UI (e.g. we don't expect an internal exception to be translated to Chinese; we don't expect 12345 to be formatted to "12,345").
@CodeBlanch @reyang , i will open a separate pr (probably part 06), because part 05 already has ~40 files changes.