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
{{ message }}
Repository navigation
Commit b022d99
Browse filesBrowse the repository at this point in the historyBrowse files
Add AlsoNotify support to ReactiveAttribute and generator (#354)
* Add AlsoNotify support to ReactiveAttribute and generator
Introduces the AlsoNotify parameter to the ReactiveAttribute, allowing additional property change notifications to be specified. Updates the source generator to handle AlsoNotify, emitting RaisePropertyChanged calls for the specified properties in generated setters. Includes new and updated tests to verify the new behavior, and updates documentation to describe the new feature.
* Trim whitespace and refactor AlsoNotify property handling
Removed trailing whitespace in generated property setters across multiple test verification files. Refactored AlsoNotify property handling in the source generator to filter and add valid property names more efficiently, and simplified the code for generating AlsoNotify attributes. Updated a test summary for clarity.
* Fix typos in README.md
Corrected 'decalaration' to 'declaration' in two instances to improve documentation accuracy.
* Fix typo in XML doc comment for Inheritance property
Corrected '</sumary>' to '</summary>' in the XML documentation comments for the Inheritance property in ReactiveAttribute. Updated both the source and generated test files for consistency.
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,10 @@ This documentation covers using ReactiveUI Source Generators to simplify and enh
25
25
ReactiveUI Source Generators automatically generate ReactiveUI objects to streamline your code. These Source Generators are designed to work with ReactiveUI V19.5.31+ and support the following features:
26
26
27
27
-`[Reactive]` With field and access modifiers, partial property support (C# 13 Visual Studio Version 17.12.0), partial properties with initializer support (C# preview only)
28
-
-`[Reactive(SetModifier = AccessModifier.Protected)]` With field and access modifiers, (Not Required for partial properties, configure set accessor with the property decalaration).
28
+
-`[Reactive(SetModifier = AccessModifier.Protected)]` With field and access modifiers, (Not Required for partial properties, configure set accessor with the property declaration).
29
29
-`[Reactive(Inheritance = InheritanceModifier.Virtual)]` With field and access modifiers. This will generate a virtual property.
30
-
-`[Reactive(UseRequired = true)]` With field and access modifiers. This will generate a required property, (Not Required for partial properties, use required keyword for property decalaration).
30
+
-`[Reactive(UseRequired = true)]` With field and access modifiers. This will generate a required property, (Not Required for partial properties, use required keyword for property declaration).
31
+
-`[Reactive(nameof(RaiseProperty1), nameof(RaiseProperty2))]` With field and property changed notification for additional properties.
31
32
-`[ObservableAsProperty]` With field, method, Observable property and partial property support (C# 13 Visual Studio Version 17.12.0)
32
33
-`[ObservableAsProperty(ReadOnly = false)]` Removes readonly keyword from the generated helper field
Copy file name to clipboardExpand all lines: src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePartialProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs
Copy file name to clipboardExpand all lines: src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs
Copy file name to clipboardExpand all lines: src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs
Copy file name to clipboardExpand all lines: src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs
Copy file name to clipboardExpand all lines: src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs
Copy file name to clipboardExpand all lines: src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs
0 commit comments