You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added property attributes to ObservableProperty attribute is ignored while code cleanup.
In this example the using directive for System.Text.Json.Serialization gets removed even when used as property attribute.
using System.Text.Json.Serialization;using CommunityToolkit.Mvvm.ComponentModel;partialclassExample:ObservableObject{[ObservableProperty][property:JsonPropertyName("exampleProperty")]privatestring_exampleProperty=string.Empty;}
After performed clean up - on file save etc. for example
// using directive for System.Text.Json.Serialisation was removedusing CommunityToolkit.Mvvm.ComponentModel;partialclass Example :ObservableObject{[ObservableProperty][property:JsonPropertyName("exampleProperty")]// missing property "JsonPropertyName"privatestring_exampleProperty=string.Empty;}
### Page URL
None
### Content source URL
None
### Document Version Independent Id
None
### Article author
Tom Oeser
### Metadata
_No response_
The text was updated successfully, but these errors were encountered:
Type of issue
Other (describe below)
Description
Added property attributes to ObservableProperty attribute is ignored while code cleanup.
In this example the using directive for System.Text.Json.Serialization gets removed even when used as property attribute.
After performed clean up - on file save etc. for example
The text was updated successfully, but these errors were encountered: