Describe the bug
MVVMTK0042 code fix does not work for fields with additional attributes (e.g. NotifyPropertyChangedFor)
Regression
No response
Steps to reproduce
Before MVVMTK0042 code fix:
public partial class Class1 : ObservableObject
{
[ObservableProperty, NotifyPropertyChangedFor(nameof(Age))] private string _name = String.Empty;
[ObservableProperty] private int _age;
}
After MVVMTK0042 code fix is applied to the project:
public partial class Class1 : ObservableObject
{
[ObservableProperty, NotifyPropertyChangedFor(nameof(Age))] private string _name = String.Empty;
[ObservableProperty]
public partial int Age { get; set; }
}
_name is not automatically converted to a public partial property along with _age.
Expected behavior
Fields with attributes in addition to [ObservableProperty] are automatically converted when the MVVMTK0042 code fix runs.
public partial class Class1 : ObservableObject
{
[ObservableProperty, NotifyPropertyChangedFor(nameof(Age))] public partial string Name { get; set; } = String.Empty;
[ObservableProperty] public partial int Age { get; set; }
}
Screenshots
No response
IDE and version
VS 2022 Preview
IDE version
v17.13.0 Preview 1.0
Nuget packages
Nuget package version(s)
8.4.0-preview2
Additional context
No response
Help us help you
No, just wanted to report this
Describe the bug
MVVMTK0042 code fix does not work for fields with additional attributes (e.g.
NotifyPropertyChangedFor)Regression
No response
Steps to reproduce
Before MVVMTK0042 code fix:
After MVVMTK0042 code fix is applied to the project:
_nameis not automatically converted to apublic partialproperty along with_age.Expected behavior
Fields with attributes in addition to
[ObservableProperty]are automatically converted when the MVVMTK0042 code fix runs.Screenshots
No response
IDE and version
VS 2022 Preview
IDE version
v17.13.0 Preview 1.0
Nuget packages
Nuget package version(s)
8.4.0-preview2
Additional context
No response
Help us help you
No, just wanted to report this