CommunityToolkit / dotnet

.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
https://docs.microsoft.com/dotnet/communitytoolkit/?WT.mc_id=dotnet-0000-bramin
Other
3.07k stars 299 forks source link

Closes #451 - Add pragma restore directive for the CS0108 warning #773

Open GabrieleMessina opened 1 year ago

GabrieleMessina commented 1 year ago

Closes #451

I've added a pragma restore directive for the CS0108 warning into the ObservableObject class source generator.

I haven't updated the tests to support the newly generated code yet. I want to be sure this can be a good solution before proceeding to that seeing that updating the test is a lot of work. @Sergio0694 Can you confirm I can proceed?

PR Checklist

Other information

I've not found a way of testing the newly generated code on an actual class that inherits from ObservableObject. When I try to add this kind of class nothing goes generated under the hood. There is a way of testing this like I'm working with the final nuget package?