Closed dgellow closed 1 year ago
Hello dgellow, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
Wrong repo:
Thanks Sergio, that was a quick fix :)
Describe the bug
When using MVVM Toolkit with ObservableValidator, I noticed that the source generator does not generate the validation code for abstract classes as part of the generated method
static void ValidateAllProperties(object obj)
.Example
Here is a sample abstract class with validator properties:
Here is a concrete class that inherits from the abstract class:
Here is the generated source file
C:\Users\sam\AppData\Local\Temp\VSGeneratedDocuments\ef8d18dd-b51e-be83-e0c9-e148364b22d7\MyNamespace.MyViewModel.g.cs
:Here is what I would instead expect as the implementation of
ValidateAllProperties
:Steps to reproduce
CommunityToolkit.Mvvm.ComponentModel.__Internals
.Expected behavior
The generated code for the concrete class should contain the validation logic for properties in the abstract class.
Visual Studio Version
2022
Nuget packages
CommunityToolkit.Mvvm v8.1.0
Help us help you
Yes, but only if others can assist.