maui-bindableproperty-generator icon indicating copy to clipboard operation
maui-bindableproperty-generator copied to clipboard

Supress Warnings For AutoBindable Field

Open Axemasta opened this issue 1 year ago • 2 comments

Currently if your control has an autogenerated bindable property, you will get IDE warnings for an unused field:

[AutoBindable]
private readonly ICommand? completedCommand;

I have noted the following warnings:

My proposal is to generate suppression attributes for these warnings since we know they aren't actually unused. I believe the MVVM community toolkit does a similar thing so maybe there is code to copy across.

MVVM toolkit also has a warning for accessing a backing field directly, perhaps that might be useful for this library?

I am happy to take on the work for this feature!

Axemasta avatar Sep 04 '23 14:09 Axemasta

I'd really like this to be fixed. Indeed it's very similar to CommunityToolkit.Mvvm.

tranb3r avatar Dec 13 '23 20:12 tranb3r

Hi, @Axemasta yes, I am working on this fix, and should be ready soon, I will keep you updated on this thread. Thanks for your feedback !!

rrmanzano avatar Dec 20 '23 19:12 rrmanzano