Why does reading the backing field decorated with the ObservableProperty attribute generate the MVVMTK0034 warning? #907
egvijayanand
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For a particular reason, have created another property (DateTimeOffset -> DateTime) that returns the value of the backing field decorated with ObservableProperty attribute.
I can understand writing to the backing field directly defeats the purpose of using this toolkit. But reading has no consequences. In fact, it will save one extra redirection of reading the property and returning the same backing field.
The MVVMTK0034 warning is to be updated such that it is raised only when it's used in the scenario of direct backing field updates like assignment operation.
Beta Was this translation helpful? Give feedback.
All reactions