From 37600596eb16381b24d8d54d4668480a2fb86395 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 19 Jul 2025 01:35:21 +0100 Subject: [PATCH 1/3] merge --- .../ReactiveCollectionGenerator.Execute.cs | 10 +++ .../ReactiveCollectionGenerator.cs | 83 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs new file mode 100644 index 00000000..c4f6571c --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReactiveUI.SourceGenerators.Roslyn.ReactiveCollection +{ + class ReactiveCollectionGenerator + { + } +} diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs new file mode 100644 index 00000000..4fa58fec --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs @@ -0,0 +1,83 @@ +// Copyright (c) 2025 ReactiveUI and contributors. All rights reserved. +// Licensed to the ReactiveUI and contributors under one or more agreements. +// The ReactiveUI and contributors licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Collections.Immutable; +using System.Linq; +using System.Text; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Text; +using ReactiveUI.SourceGenerators.Helpers; + +namespace ReactiveUI.SourceGenerators; + +/// +/// A source generator for generating reative properties. +/// +[Generator(LanguageNames.CSharp)] +public sealed partial class ReactiveCollectionGenerator : IIncrementalGenerator +{ + /// + public void Initialize(IncrementalGeneratorInitializationContext context) + { + context.RegisterPostInitializationOutput(ctx => + { + // Add the ReactiveAttribute to the compilation + ctx.AddSource($"{AttributeDefinitions.ReactiveCollectionAttributeType}.g.cs", SourceText.From(AttributeDefinitions.ReactiveCollectionAttribute, Encoding.UTF8)); + }); + + RunReactiveCollectionFromField(context); + } + + private static void RunReactiveCollectionFromField(IncrementalGeneratorInitializationContext context) + { + ////// Gather info for all annotated variable with at least one attribute. + ////var propertyInfo = + //// context.SyntaxProvider + //// .ForAttributeWithMetadataName( + //// AttributeDefinitions.ReactiveAttributeType, + //// static (node, _) => node is VariableDeclaratorSyntax { Parent: VariableDeclarationSyntax { Parent: FieldDeclarationSyntax { Parent: ClassDeclarationSyntax or RecordDeclarationSyntax, AttributeLists.Count: > 0 } } }, + //// static (context, token) => GetVariableInfo(context, token)) + //// .Where(x => x != null) + //// .Select((x, _) => x!) + //// .Collect(); + + ////// Generate the requested properties + ////context.RegisterSourceOutput(propertyInfo, static (context, input) => + ////{ + //// foreach (var diagnostic in input.SelectMany(static x => x.Errors)) + //// { + //// // Output the diagnostics + //// context.ReportDiagnostic(diagnostic.ToDiagnostic()); + //// } + + //// // Gather all the properties that are valid and group them by the target information. + //// var groupedPropertyInfo = input + //// .Where(static x => x.Value != null) + //// .Select(static x => x.Value!).GroupBy( + //// static info => (info.TargetInfo.FileHintName, info.TargetInfo.TargetName, info.TargetInfo.TargetNamespace, info.TargetInfo.TargetVisibility, info.TargetInfo.TargetType), + //// static info => info) + //// .ToImmutableArray(); + + //// if (groupedPropertyInfo.Length == 0) + //// { + //// return; + //// } + + //// foreach (var grouping in groupedPropertyInfo) + //// { + //// var items = grouping.ToImmutableArray(); + + //// if (items.Length == 0) + //// { + //// continue; + //// } + + //// var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, [.. grouping]); + //// context.AddSource($"{grouping.Key.FileHintName}.Properties.g.cs", source); + //// } + ////}); + } +} From 41f687b8d413d7fee0aebee173aee8b419724163 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 19 Jul 2025 03:51:48 +0100 Subject: [PATCH 2/3] Add ReactiveCollection source generator and tests Introduces the [ReactiveCollection] Attribute and its source generator, enabling automatic property generation for ObservableCollection OnChanged fields. Adds corresponding unit tests and verified outputs, updates test helpers, and includes usage in InternalTestViewModel. --- ...BindableDerivedListAttribute.g.verified.cs | 21 ++ ...Generators.IViewForAttribute.g.verified.cs | 36 +++ ...estVM.ObservableAsProperties.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...ableAsPropertyFromObservable.g.verified.cs | 4 +- ...estVM.ObservableAsProperties.g.verified.cs | 4 +- ...nner1.ObservableAsProperties.g.verified.cs | 4 +- ...nner3.ObservableAsProperties.g.verified.cs | 4 +- ...nner2.ObservableAsProperties.g.verified.cs | 4 +- ...estVM.ObservableAsProperties.g.verified.cs | 4 +- ...estVM.ObservableAsProperties.g.verified.cs | 4 +- ...estVM.ObservableAsProperties.g.verified.cs | 4 +- ...estVM.ObservableAsProperties.g.verified.cs | 4 +- ...tes#TestNs.TestVM.Properties.g.verified.cs | 4 +- ...ies#TestNs.TestVM.Properties.g.verified.cs | 4 +- ...lue#TestNs.TestVM.Properties.g.verified.cs | 4 +- ...ess#TestNs.TestVM.Properties.g.verified.cs | 4 +- ...nce#TestNs.TestVM.Properties.g.verified.cs | 4 +- ...ss#TestNs1.TestVM.Properties.g.verified.cs | 4 +- ...ss#TestNs2.TestVM.Properties.g.verified.cs | 4 +- ...nit#TestNs.TestVM.Properties.g.verified.cs | 4 +- ...3+TestInnerClass1.Properties.g.verified.cs | 4 +- ...2+TestInnerClass3.Properties.g.verified.cs | 4 +- ...3+TestInnerClass2.Properties.g.verified.cs | 4 +- ...s1.TestViewModel3.Properties.g.verified.cs | 4 +- ....ReactiveCollectionAttribute.g.verified.cs | 21 ++ ...s.TestVM.ReactiveCollections.g.verified.cs | 42 ++++ .../ReactiveUI.SourceGenerators.Tests.csproj | 1 + .../TestHelper.cs | 1 + .../UnitTests/IViewForGeneratorTests.cs | 57 +++++ .../ReactiveCollectionGeneratorTests.cs | 40 ++++ .../InternalTestViewModel.cs | 30 +++ ...ReactiveUI.SourceGenerators.Execute.csproj | 2 +- .../TestViewModel.cs | 1 + .../AttributeDefinitions.cs | 28 +++ ...eAsPropertyGenerator{FromField}.Execute.cs | 4 +- ...opertyGenerator{FromObservable}.Execute.cs | 4 +- .../Reactive/ReactiveGenerator.Execute.cs | 4 +- .../Models/ReactiveCollectionFieldInfo.cs | 25 +++ .../ReactiveCollectionGenerator.Execute.cs | 212 +++++++++++++++++- .../ReactiveCollectionGenerator.cs | 82 +++---- .../ReactiveCommandGenerator.Execute.cs | 4 +- ...activeUI.SourceGenerators.Roslyn.projitems | 3 + 53 files changed, 593 insertions(+), 157 deletions(-) create mode 100644 src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs create mode 100644 src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs create mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs create mode 100644 src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#TestNs.TestVM.ReactiveCollections.g.verified.cs create mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs create mode 100644 src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionGeneratorTests.cs create mode 100644 src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs new file mode 100644 index 00000000..bc8d7792 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.cs +// Copyright (c) 2025 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; + +// +#pragma warning disable +#nullable enable +namespace ReactiveUI.SourceGenerators; + +/// +/// ReactiveAttribute. +/// +/// +[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] +internal sealed class BindableDerivedListAttribute : Attribute; +#nullable restore +#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs new file mode 100644 index 00000000..ed18620e --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: ReactiveUI.SourceGenerators.IViewForAttribute.g.cs +// Copyright (c) 2025 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; + +// +#pragma warning disable +#nullable enable +namespace ReactiveUI.SourceGenerators; + +/// +/// IViewForAttribute. +/// +/// +/// +/// Initializes a new instance of the class. +/// +/// Type of the view model. +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +internal sealed class IViewForAttribute : Attribute; + +/// +/// IViewForAttribute. +/// +/// +/// +/// Initializes a new instance of the class. +/// +/// Type of the view model. +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +internal sealed class IViewForAttribute(string? viewModelType) : Attribute; +#nullable restore +#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index fc5c2880..318d2020 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -4,9 +4,7 @@ #nullable enable namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 91b55bcb..3c24f8cd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 05d3bb9e..177122c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 701c79b7..e0b9a239 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs index 6aa924a1..dca36436 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs @@ -9,9 +9,7 @@ namespace TestNs { public partial class TestVM { -/// - /// Partial class for the TestVMInner1 which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVMInner1 { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs index 7cad2984..3c245835 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs @@ -11,9 +11,7 @@ public partial class TestVM { public partial class TestVMInner2 { -/// - /// Partial class for the TestVMInner3 which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVMInner3 { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs index 809dcd9b..b1258225 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs @@ -9,9 +9,7 @@ namespace TestNs { public partial class TestVM { -/// - /// Partial class for the TestVMInner2 which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVMInner2 { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 701c79b7..e0b9a239 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index faa3ac7b..7b27e440 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 4019a145..117817bd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 794f535d..af726740 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index ff99053c..bd0fb8a3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 5b353441..4befe88e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 869b1d54..23682fad 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -4,9 +4,7 @@ #nullable enable namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs index 92c2804a..5221cb69 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs @@ -6,9 +6,7 @@ namespace TestNs { public partial class TestVM { -/// - /// Partial class for the TestVMInner1 which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVMInner1 { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs index 7e2f0fc2..190f193e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs @@ -8,9 +8,7 @@ public partial class TestVM { public partial class TestVMInner2 { -/// - /// Partial class for the TestVMInner3 which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVMInner3 { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs index 31f2189d..d8747a92 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs @@ -6,9 +6,7 @@ namespace TestNs { public partial class TestVM { -/// - /// Partial class for the TestVMInner2 which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVMInner2 { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs index da4cef1e..2897a9b2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -4,9 +4,7 @@ #nullable enable namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 24eb3c9a..e96b9824 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -4,9 +4,7 @@ #nullable enable namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 34fffa66..3b2b7bcb 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -4,9 +4,7 @@ #nullable enable namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 73c40889..548e82d7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -4,9 +4,7 @@ #nullable enable namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Observable As Property initialization. - /// + public partial class TestVM { /// diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs index 2b9aa7ff..cd0ffd2a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs index 1c5ad56e..49b034f3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs index c8b969d0..283ab8dd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs index 240162b0..89940cb2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs index 3728a754..92267be5 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs index 159c9f2a..0e7ba6b3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs1 { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs index 0a2dd961..f27308ee 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs2 { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs index fe7117df..f1b9a0ee 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs { - /// - /// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. - /// + public partial class TestVM { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs index 0fffb75e..f716a5c8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs @@ -9,9 +9,7 @@ namespace TestNs1 { public partial class TestViewModel3 { -/// - /// Partial class for the TestInnerClass1 which contains ReactiveUI Reactive property initialization. - /// + public partial class TestInnerClass1 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs index 1a8a826d..21bede28 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs @@ -11,9 +11,7 @@ public partial class TestViewModel3 { public partial class TestInnerClass2 { -/// - /// Partial class for the TestInnerClass3 which contains ReactiveUI Reactive property initialization. - /// + public partial class TestInnerClass3 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs index 37cf5b9d..ba38f3a3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs @@ -9,9 +9,7 @@ namespace TestNs1 { public partial class TestViewModel3 { -/// - /// Partial class for the TestInnerClass2 which contains ReactiveUI Reactive property initialization. - /// + public partial class TestInnerClass2 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs index 14731ce7..898c290f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs @@ -7,9 +7,7 @@ namespace TestNs1 { - /// - /// Partial class for the TestViewModel3 which contains ReactiveUI Reactive property initialization. - /// + public partial class TestViewModel3 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs new file mode 100644 index 00000000..845853f5 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.cs +// Copyright (c) 2025 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; + +// +#pragma warning disable +#nullable enable +namespace ReactiveUI.SourceGenerators; + +/// +/// ReactiveAttribute. +/// +/// +[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] +internal sealed class ReactiveCollectionAttribute : Attribute; +#nullable restore +#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#TestNs.TestVM.ReactiveCollections.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#TestNs.TestVM.ReactiveCollections.g.verified.cs new file mode 100644 index 00000000..52dbc418 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#TestNs.TestVM.ReactiveCollections.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: TestNs.TestVM.ReactiveCollections.g.cs +// +using ReactiveUI; + +#pragma warning disable +#nullable enable +namespace TestNs +{ + + public partial class TestVM + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public global::System.Collections.ObjectModel.ObservableCollection? PublicObservableCollectionTest + { + get => _publicObservableCollectionTest; + set + { + if (value == null) + { + PublicObservableCollectionTest.CollectionChanged -= CollectionChanged(this, nameof(PublicObservableCollectionTest)); + } + + _publicObservableCollectionTest = value; + this.RaisePropertyChanged(nameof(PublicObservableCollectionTest)); + + if (_publicObservableCollectionTest != null) + { + // Remove the old handler if it exists + PublicObservableCollectionTest.CollectionChanged -= CollectionChanged(this, nameof(PublicObservableCollectionTest)); + + PublicObservableCollectionTest.CollectionChanged += CollectionChanged(this, nameof(PublicObservableCollectionTest)); + } + } + } + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); + } +} +#nullable restore +#pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj b/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj index 02ad8203..dbcb328a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj +++ b/src/ReactiveUI.SourceGenerator.Tests/ReactiveUI.SourceGenerators.Tests.csproj @@ -40,6 +40,7 @@ + diff --git a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs index fc010ae4..395c7be3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs @@ -91,6 +91,7 @@ public string VerifiedFilePath() nameof(RoutedControlHostGenerator) => "ROUTEDHOST", nameof(ViewModelControlHostGenerator) => "CONTROLHOST", nameof(BindableDerivedListGenerator) => "DERIVEDLIST", + nameof(ReactiveCollectionGenerator) => "REACTIVECOLL", _ => name, }; } diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs new file mode 100644 index 00000000..b1001cdf --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/IViewForGeneratorTests.cs @@ -0,0 +1,57 @@ +// Copyright (c) 2025 ReactiveUI and contributors. All rights reserved. +// Licensed to the ReactiveUI and contributors under one or more agreements. +// The ReactiveUI and contributors licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using ReactiveUI.SourceGenerators; +using Xunit.Abstractions; + +namespace ReactiveUI.SourceGenerator.Tests; + +/// +/// IViewForGeneratorTests. +/// +public class IViewForGeneratorTests(ITestOutputHelper output) : TestBase(output) +{ + /// + /// Tests that the source generator correctly generates reactive properties. + /// + /// A task to monitor the async. + [Fact] + public Task FromIViewFor() + { + // Arrange: Setup the source code that matches the generator input expectations. + const string sourceCode = """ + using System.Collections.ObjectModel; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + + namespace TestNs; + + [IViewFor] + public partial class TestViewWpf : Window + { + /// + /// Initializes a new instance of the class. + /// + public TestViewWpf() => ViewModel = TestViewModel.Instance; + } + + public partial class TestViewModel : ReactiveObject + { + /// + /// Gets the instance of the test view model. + /// + public static TestViewModel Instance { get; } = new(); + + /// + /// Gets or sets the test property. + /// + public int TestProperty { get; set; } + } + """; + + // Act: Initialize the helper and run the generator. Assert: Verify the generated code. + return TestHelper.TestPass(sourceCode); + } +} diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionGeneratorTests.cs new file mode 100644 index 00000000..233ecac2 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCollectionGeneratorTests.cs @@ -0,0 +1,40 @@ +// Copyright (c) 2025 ReactiveUI and contributors. All rights reserved. +// Licensed to the ReactiveUI and contributors under one or more agreements. +// The ReactiveUI and contributors licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using ReactiveUI.SourceGenerator.Tests; +using Xunit.Abstractions; + +namespace ReactiveUI.SourceGenerators.Tests; +/// +/// ReactiveCollectionGeneratorTests. +/// +public class ReactiveCollectionGeneratorTests(ITestOutputHelper output) : TestBase(output) +{ + /// + /// Tests that the source generator correctly generates reactive properties. + /// + /// A task to monitor the async. + [Fact] + public Task FromReactiveCollectionField() + { + // Arrange: Setup the source code that matches the generator input expectations. + const string sourceCode = """ + using System.Collections.ObjectModel; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + + namespace TestNs; + + public partial class TestVM : ReactiveObject + { + [ReactiveCollection] + private ObservableCollection? _publicObservableCollectionTest; + } + """; + + // Act: Initialize the helper and run the generator. Assert: Verify the generated code. + return TestHelper.TestPass(sourceCode); + } +} diff --git a/src/ReactiveUI.SourceGenerators.Execute/InternalTestViewModel.cs b/src/ReactiveUI.SourceGenerators.Execute/InternalTestViewModel.cs index e6c8a19c..2a179e6f 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/InternalTestViewModel.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/InternalTestViewModel.cs @@ -3,6 +3,7 @@ // The ReactiveUI and contributors licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. +using System.Collections.ObjectModel; using ReactiveUI; using ReactiveUI.SourceGenerators; @@ -10,6 +11,32 @@ namespace SGReactiveUI.SourceGenerators.Test; internal partial class InternalTestViewModel : ReactiveObject { + [ReactiveCollection] + private ObservableCollection? _publicObservableCollectionTest; + + public InternalTestViewModel() + { + // observe property changes + Changed + .Subscribe(x => + { + // handle property changes + if (x.PropertyName == nameof(PublicObservableCollectionTest)) + { + Console.WriteLine($"PublicObservableCollectionTest changed: {PublicObservableCollectionTest?.Count}"); + } + }); + PublicObservableCollectionTest = []; + PublicObservableCollectionTest.Add(1); + PublicObservableCollectionTest.Add(2); + PublicObservableCollectionTest.Add(3); + PublicObservableCollectionTest = null; + PublicObservableCollectionTest = []; + PublicObservableCollectionTest.Add(1); + PublicObservableCollectionTest.Add(2); + PublicObservableCollectionTest.Add(3); + } + [Reactive] public partial int PublicPartialPropertyTest { get; set; } @@ -31,6 +58,9 @@ internal partial class InternalTestViewModel : ReactiveObject [Reactive] public partial int PublicPartialPropertyWithPrivateTest { get; private set; } + [Reactive] + public partial string PublicPartialStringPropertyTest { get; set; } = "initial"; + [Reactive] internal partial int InternalPartialPropertyTest { get; set; } diff --git a/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj b/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj index b7cc8588..2bdda74a 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj +++ b/src/ReactiveUI.SourceGenerators.Execute/ReactiveUI.SourceGenerators.Execute.csproj @@ -8,7 +8,7 @@ true enable false - 13.0 + preview $(NoWarn);CA1812 A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the Source Generators package for ReactiveUI diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs index b7c9b257..f2eda401 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel.cs @@ -87,6 +87,7 @@ public partial class TestViewModel : ReactiveObject, IActivatableViewModel, IDis [SetsRequiredMembers] public TestViewModel() { + var itv = new InternalTestViewModel { PublicRequiredPartialPropertyTest = true }; MustBeSet = "Test"; this.WhenActivated(disposables => { diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs index a4802f5e..f40ffcc2 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs @@ -460,6 +460,34 @@ internal sealed class BindableDerivedListAttribute : Attribute; #nullable restore #pragma warning restore """; + + + + public const string ReactiveCollectionAttributeType = "ReactiveUI.SourceGenerators.ReactiveCollectionAttribute"; + + public static string ReactiveCollectionAttribute => $$""" +// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; + +// +#pragma warning disable +#nullable enable +namespace ReactiveUI.SourceGenerators; + +/// +/// ReactiveAttribute. +/// +/// +[global::System.CodeDom.Compiler.GeneratedCode("{{ReactiveGenerator.GeneratorName}}", "{{ReactiveGenerator.GeneratorVersion}}")] +[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] +internal sealed class ReactiveCollectionAttribute : Attribute; +#nullable restore +#pragma warning restore +"""; } #pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs index 24f581a3..eb61f0e6 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromField}.Execute.cs @@ -165,9 +165,7 @@ private static string GenerateClassWithProperties(string containingTypeName, str return $$""" -/// - /// Partial class for the {{containingTypeName}} which contains ReactiveUI Observable As Property initialization. - /// + {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} { [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs index 97cc8c57..fa07900a 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ObservableAsProperty/ObservableAsPropertyGenerator{FromObservable}.Execute.cs @@ -290,9 +290,7 @@ private static string GenerateClassWithProperties(string containingTypeName, str return $$""" -/// - /// Partial class for the {{containingTypeName}} which contains ReactiveUI Observable As Property initialization. - /// + {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} { [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs index e66acf97..60a6dd1a 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/Reactive/ReactiveGenerator.Execute.cs @@ -346,9 +346,7 @@ private static string GenerateClassWithProperties(string containingTypeName, str return $$""" -/// - /// Partial class for the {{containingTypeName}} which contains ReactiveUI Reactive property initialization. - /// + {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} { [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs new file mode 100644 index 00000000..321251de --- /dev/null +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs @@ -0,0 +1,25 @@ +// Copyright (c) 2025 ReactiveUI and contributors. All rights reserved. +// Licensed to the ReactiveUI and contributors under one or more agreements. +// The ReactiveUI and contributors licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using ReactiveUI.SourceGenerators.Helpers; +using ReactiveUI.SourceGenerators.Models; + +namespace ReactiveUI.SourceGenerators.Reactive.Models; + +/// +/// A model with gathered info on a given field. +/// +internal sealed record ReactiveCollectionFieldInfo( + TargetInfo TargetInfo, + string TypeNameWithNullabilityAnnotations, + string FieldName, + string PropertyName, + string? Initializer, + bool IsReferenceTypeOrUnconstrainedTypeParameter, + bool IncludeMemberNotNullOnSetAccessor, + EquatableArray ForwardedAttributes, + string IsReadOnly, + string AccessModifier, + string Inheritance); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs index c4f6571c..56ea6629 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -1,10 +1,212 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Copyright (c) 2025 ReactiveUI and contributors. All rights reserved. +// Licensed to the ReactiveUI and contributors under one or more agreements. +// The ReactiveUI and contributors licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. -namespace ReactiveUI.SourceGenerators.Roslyn.ReactiveCollection +using System; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using ReactiveUI.SourceGenerators.Extensions; +using ReactiveUI.SourceGenerators.Helpers; +using ReactiveUI.SourceGenerators.Models; +using ReactiveUI.SourceGenerators.Reactive.Models; +using static ReactiveUI.SourceGenerators.Diagnostics.DiagnosticDescriptors; + +namespace ReactiveUI.SourceGenerators; + +/// +/// ReactiveCollectionGenerator. +/// +public sealed partial class ReactiveCollectionGenerator { - class ReactiveCollectionGenerator + private static Result? GetVariableInfo(in GeneratorAttributeSyntaxContext context, CancellationToken token) { + using var builder = ImmutableArrayBuilder.Rent(); + var symbol = context.TargetSymbol; + token.ThrowIfCancellationRequested(); + + // Skip symbols without the target attribute + if (!symbol.TryGetAttributeWithFullyQualifiedMetadataName(AttributeDefinitions.ReactiveCollectionAttributeType, out var attributeData)) + { + return default; + } + + if (symbol is not IFieldSymbol fieldSymbol) + { + return default; + } + + // Validate the target type + if (!fieldSymbol.IsTargetTypeValid()) + { + builder.Add( + InvalidReactiveObjectError, + fieldSymbol, + fieldSymbol.ContainingType, + fieldSymbol.Name); + return new(default, builder.ToImmutable()); + } + + // Get the can PropertyName member, if any + attributeData.TryGetNamedArgument("ReadOnly", out bool? isReadonly); + + // Get Inheritance value from the attribute + attributeData.TryGetNamedArgument("Inheritance", out int? inheritanceArgument); + var inheritance = inheritanceArgument switch + { + 1 => " virtual", + 2 => " override", + 3 => " new", + _ => string.Empty, + }; + + token.ThrowIfCancellationRequested(); + + attributeData.TryGetNamedArgument("UseProtected", out bool useProtected); + var useProtectedModifier = useProtected ? "protected" : "private"; + + token.ThrowIfCancellationRequested(); + + // Get the property type and name + var typeNameWithNullabilityAnnotations = fieldSymbol.Type.GetFullyQualifiedNameWithNullabilityAnnotations(); + var fieldName = fieldSymbol.Name; + var propertyName = fieldSymbol.GetGeneratedPropertyName(); + + // Check for name collisions + if (fieldName == propertyName) + { + builder.Add( + ReactivePropertyNameCollisionError, + fieldSymbol, + fieldSymbol.ContainingType, + fieldSymbol.Name); + return new(default, builder.ToImmutable()); + } + + var fieldDeclaration = (FieldDeclarationSyntax)context.TargetNode.Parent!.Parent!; + var initializer = fieldDeclaration.Declaration.Variables.FirstOrDefault()?.Initializer?.ToFullString(); + + token.ThrowIfCancellationRequested(); + + context.GetForwardedAttributes( + builder, + fieldSymbol, + fieldDeclaration.AttributeLists, + token, + out var forwardedPropertyAttributes); + + token.ThrowIfCancellationRequested(); + + // Get the nullability info for the property + fieldSymbol.GetNullabilityInfo( + context.SemanticModel, + out var isReferenceTypeOrUnconstraindTypeParameter, + out var includeMemberNotNullOnSetAccessor); + + token.ThrowIfCancellationRequested(); + + // Get the containing type info + var targetInfo = TargetInfo.From(fieldSymbol.ContainingType); + + return new( + new( + targetInfo, + typeNameWithNullabilityAnnotations, + fieldName, + propertyName, + initializer, + isReferenceTypeOrUnconstraindTypeParameter, + includeMemberNotNullOnSetAccessor, + forwardedPropertyAttributes, + isReadonly == false ? string.Empty : "readonly", + useProtectedModifier, + inheritance), + builder.ToImmutable()); + } + + private static string GenerateSource(string containingTypeName, string containingNamespace, string containingClassVisibility, string containingType, ReactiveCollectionFieldInfo[] properties) + { + // Get Parent class details from properties.ParentInfo + var (parentClassDeclarationsString, closingBrackets) = TargetInfo.GenerateParentClassDeclarations([.. properties.Select(p => p.TargetInfo.ParentInfo)]); + + var classes = GenerateClassWithProperties(containingTypeName, containingNamespace, containingClassVisibility, containingType, properties); + + return $$""" +// +using ReactiveUI; + +#pragma warning disable +#nullable enable +namespace {{containingNamespace}} +{ + {{parentClassDeclarationsString}}{{classes}}{{closingBrackets}} +} +#nullable restore +#pragma warning restore +"""; + } + + /// + /// Generates the source code. + /// + /// The contain type name. + /// The containing namespace. + /// The containing class visibility. + /// The containing type. + /// The properties. + /// The value. + private static string GenerateClassWithProperties(string containingTypeName, string containingNamespace, string containingClassVisibility, string containingType, ReactiveCollectionFieldInfo[] properties) + { + // Includes 2 tabs from the property declarations so no need to add them here. + var propertyDeclarations = string.Join("\n", properties.Select(GetPropertySyntax)); + + return +$$""" + + {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} + { + [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] +{{propertyDeclarations}} + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + private static global::System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged(IReactiveObject @this, string propName)=> (_, _) => @this.RaisePropertyChanged(propName); + } +"""; + } + + private static string GetPropertySyntax(ReactiveCollectionFieldInfo propertyInfo) + { + var propertyAttributes = string.Join("\n ", AttributeDefinitions.ExcludeFromCodeCoverage.Concat(propertyInfo.ForwardedAttributes)); + + return $$""" + /// + {{propertyAttributes}} + public {{propertyInfo.TypeNameWithNullabilityAnnotations}} {{propertyInfo.PropertyName}} + { + get => {{propertyInfo.FieldName}}; + set + { + if (value == null) + { + {{propertyInfo.PropertyName}}.CollectionChanged -= CollectionChanged(this, nameof({{propertyInfo.PropertyName}})); + } + + {{propertyInfo.FieldName}} = value; + this.RaisePropertyChanged(nameof({{propertyInfo.PropertyName}})); + + if ({{propertyInfo.FieldName}} != null) + { + // Remove the old handler if it exists + {{propertyInfo.PropertyName}}.CollectionChanged -= CollectionChanged(this, nameof({{propertyInfo.PropertyName}})); + + {{propertyInfo.PropertyName}}.CollectionChanged += CollectionChanged(this, nameof({{propertyInfo.PropertyName}})); + } + } + } +"""; } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs index 4fa58fec..51149052 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.cs @@ -19,6 +19,9 @@ namespace ReactiveUI.SourceGenerators; [Generator(LanguageNames.CSharp)] public sealed partial class ReactiveCollectionGenerator : IIncrementalGenerator { + internal static readonly string GeneratorName = typeof(ReactiveCollectionGenerator).FullName!; + internal static readonly string GeneratorVersion = typeof(ReactiveCollectionGenerator).Assembly.GetName().Version.ToString(); + /// public void Initialize(IncrementalGeneratorInitializationContext context) { @@ -33,51 +36,50 @@ public void Initialize(IncrementalGeneratorInitializationContext context) private static void RunReactiveCollectionFromField(IncrementalGeneratorInitializationContext context) { - ////// Gather info for all annotated variable with at least one attribute. - ////var propertyInfo = - //// context.SyntaxProvider - //// .ForAttributeWithMetadataName( - //// AttributeDefinitions.ReactiveAttributeType, - //// static (node, _) => node is VariableDeclaratorSyntax { Parent: VariableDeclarationSyntax { Parent: FieldDeclarationSyntax { Parent: ClassDeclarationSyntax or RecordDeclarationSyntax, AttributeLists.Count: > 0 } } }, - //// static (context, token) => GetVariableInfo(context, token)) - //// .Where(x => x != null) - //// .Select((x, _) => x!) - //// .Collect(); + var propertyInfo = + context.SyntaxProvider + .ForAttributeWithMetadataName( + AttributeDefinitions.ReactiveCollectionAttributeType, + static (node, _) => node is VariableDeclaratorSyntax { Parent: VariableDeclarationSyntax { Parent: FieldDeclarationSyntax { Parent: ClassDeclarationSyntax or RecordDeclarationSyntax, AttributeLists.Count: > 0 } } }, + static (context, token) => GetVariableInfo(context, token)) + .Where(x => x != null) + .Select((x, _) => x!) + .Collect(); - ////// Generate the requested properties - ////context.RegisterSourceOutput(propertyInfo, static (context, input) => - ////{ - //// foreach (var diagnostic in input.SelectMany(static x => x.Errors)) - //// { - //// // Output the diagnostics - //// context.ReportDiagnostic(diagnostic.ToDiagnostic()); - //// } + // Generate the requested properties and methods + context.RegisterSourceOutput(propertyInfo, static (context, input) => + { + foreach (var diagnostic in input.SelectMany(static x => x.Errors)) + { + // Output the diagnostics + context.ReportDiagnostic(diagnostic.ToDiagnostic()); + } - //// // Gather all the properties that are valid and group them by the target information. - //// var groupedPropertyInfo = input - //// .Where(static x => x.Value != null) - //// .Select(static x => x.Value!).GroupBy( - //// static info => (info.TargetInfo.FileHintName, info.TargetInfo.TargetName, info.TargetInfo.TargetNamespace, info.TargetInfo.TargetVisibility, info.TargetInfo.TargetType), - //// static info => info) - //// .ToImmutableArray(); + // Gather all the properties that are valid and group them by the target information. + var groupedPropertyInfo = input + .Where(static x => x.Value != null) + .Select(static x => x.Value!).GroupBy( + static info => (info.TargetInfo.FileHintName, info.TargetInfo.TargetName, info.TargetInfo.TargetNamespace, info.TargetInfo.TargetVisibility, info.TargetInfo.TargetType), + static info => info) + .ToImmutableArray(); - //// if (groupedPropertyInfo.Length == 0) - //// { - //// return; - //// } + if (groupedPropertyInfo.Length == 0) + { + return; + } - //// foreach (var grouping in groupedPropertyInfo) - //// { - //// var items = grouping.ToImmutableArray(); + foreach (var grouping in groupedPropertyInfo) + { + var items = grouping.ToImmutableArray(); - //// if (items.Length == 0) - //// { - //// continue; - //// } + if (items.Length == 0) + { + continue; + } - //// var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, [.. grouping]); - //// context.AddSource($"{grouping.Key.FileHintName}.Properties.g.cs", source); - //// } - ////}); + var source = GenerateSource(grouping.Key.TargetName, grouping.Key.TargetNamespace, grouping.Key.TargetVisibility, grouping.Key.TargetType, [.. grouping]); + context.AddSource($"{grouping.Key.FileHintName}.ReactiveCollections.g.cs", source); + } + }); } } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index b23cd34e..b1db437e 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -160,9 +160,7 @@ private static string GenerateClassWithCommands(string containingTypeName, strin return $$""" -/// - /// Partial class for the {{containingTypeName}} which contains ReactiveUI ReactiveCommand initialization. - /// + {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} { [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems index 0b6ebe4e..dad13ba9 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveUI.SourceGenerators.Roslyn.projitems @@ -61,6 +61,9 @@ + + + From 043ed47f59be20a6aedb4fe35946268882321d9c Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 19 Jul 2025 12:53:18 +0100 Subject: [PATCH 3/3] Revert tests --- ...BindableDerivedListAttribute.g.verified.cs | 1 - ...Generators.IViewForAttribute.g.verified.cs | 10 +++---- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...estVM.ObservableAsProperties.g.verified.cs | 1 - ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...ableAsPropertyFromObservable.g.verified.cs | 2 -- ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...estVM.ObservableAsProperties.g.verified.cs | 1 - ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...nner1.ObservableAsProperties.g.verified.cs | 1 - ...nner3.ObservableAsProperties.g.verified.cs | 1 - ...nner2.ObservableAsProperties.g.verified.cs | 1 - ...estVM.ObservableAsProperties.g.verified.cs | 1 - ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...estVM.ObservableAsProperties.g.verified.cs | 1 - ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...estVM.ObservableAsProperties.g.verified.cs | 1 - ...bservableAsPropertyAttribute.g.verified.cs | 1 - ...estVM.ObservableAsProperties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...tes#TestNs.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...ies#TestNs.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...lue#TestNs.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...ess#TestNs.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...nce#TestNs.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...ss#TestNs1.TestVM.Properties.g.verified.cs | 1 - ...ss#TestNs2.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...nit#TestNs.TestVM.Properties.g.verified.cs | 1 - ...Generators.ReactiveAttribute.g.verified.cs | 1 - ...3+TestInnerClass1.Properties.g.verified.cs | 2 -- ...2+TestInnerClass3.Properties.g.verified.cs | 2 -- ...3+TestInnerClass2.Properties.g.verified.cs | 2 -- ...s1.TestViewModel3.Properties.g.verified.cs | 2 -- ...ors.ReactiveCommandAttribute.g.verified.cs | 1 - ...ors.ReactiveCommandAttribute.g.verified.cs | 1 - ...ors.ReactiveCommandAttribute.g.verified.cs | 1 - ...ors.ReactiveCommandAttribute.g.verified.cs | 1 - ...ors.ReactiveCommandAttribute.g.verified.cs | 1 - ...ors.ReactiveCommandAttribute.g.verified.cs | 1 - ....ReactiveCollectionAttribute.g.verified.cs | 6 ++-- .../TestHelper.cs | 2 +- .../AttributeDefinitions.cs | 28 ------------------- .../Models/ReactiveCollectionFieldInfo.cs | 5 +--- .../ReactiveCollectionGenerator.Execute.cs | 23 +-------------- 70 files changed, 9 insertions(+), 145 deletions(-) diff --git a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs index a7db7b58..5b500015 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/DERIVEDLIST/BindableDerivedListGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.BindableDerivedListAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] internal sealed class BindableDerivedListAttribute : global::System.Attribute; #nullable restore diff --git a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs index ed18620e..0ad03a75 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/IVIEWFOR/IViewForGeneratorTests.FromIViewFor#ReactiveUI.SourceGenerators.IViewForAttribute.g.verified.cs @@ -4,8 +4,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System; - // #pragma warning disable #nullable enable @@ -19,8 +17,8 @@ namespace ReactiveUI.SourceGenerators; /// Initializes a new instance of the class. /// /// Type of the view model. -[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute : Attribute; +[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +internal sealed class IViewForAttribute : global::System.Attribute; /// /// IViewForAttribute. @@ -30,7 +28,7 @@ internal sealed class IViewForAttribute : Attribute; /// Initializes a new instance of the class. /// /// Type of the view model. -[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -internal sealed class IViewForAttribute(string? viewModelType) : Attribute; +[global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +internal sealed class IViewForAttribute(string? viewModelType) : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 91eb2e4c..318d2020 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -11,7 +11,6 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _testPropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index a7e73461..3c24f8cd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethods#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,11 +17,9 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test2PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test2Property { get => _test2Property = _test2PropertyHelper?.Value ?? _test2Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index d644408e..177122c7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableMethodsWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,11 +17,9 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test3PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test3Property { get => _test3Property = _test3PropertyHelper?.Value ?? _test3Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 25a469f7..e0b9a239 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservableProp#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,11 +17,9 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test1PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test1Property { get => _test1Property = _test1PropertyHelper?.Value ?? _test1Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs index cab9906e..dca36436 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner1.ObservableAsPropertyFromObservable.g.verified.cs @@ -19,11 +19,9 @@ public partial class TestVMInner1 private ReactiveUI.ObservableAsPropertyHelper? _testIn1PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestIn1Property { get => _testIn1Property = _testIn1PropertyHelper?.Value ?? _testIn1Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs index 6aa7aa10..3c245835 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsPropertyFromObservable.g.verified.cs @@ -21,11 +21,9 @@ public partial class TestVMInner3 private ReactiveUI.ObservableAsPropertyHelper? _testIn3PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestIn3Property { get => _testIn3Property = _testIn3PropertyHelper?.Value ?? _testIn3Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs index 79c85e34..b1258225 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM+TestVMInner2.ObservableAsPropertyFromObservable.g.verified.cs @@ -19,11 +19,9 @@ public partial class TestVMInner2 private ReactiveUI.ObservableAsPropertyHelper? _testIn2PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestIn2Property { get => _testIn2Property = _testIn2PropertyHelper?.Value ?? _testIn2Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 25a469f7..e0b9a239 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropNestedClasses#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,11 +17,9 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test1PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test1Property { get => _test1Property = _test1PropertyHelper?.Value ?? _test1Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 6d900e59..7b27e440 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttribute#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,13 +17,11 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test5PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] public int Test5Property { get => _test5Property = _test5PropertyHelper?.Value ?? _test5Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 512ea29e..117817bd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeNullableRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,13 +17,11 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test7PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] public object? Test7Property { get => _test7Property = (_test7PropertyHelper == null ? _test7Property : _test7PropertyHelper.Value); } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 2fc0e10d..af726740 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithAttributeRef#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,13 +17,11 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test6PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] public object Test6Property { get => _test6Property = _test6PropertyHelper?.Value ?? _test6Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 7622e5a6..bd0fb8a3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromObservablePropertiesWithName#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,11 +17,9 @@ public partial class TestVM private ReactiveUI.ObservableAsPropertyHelper? _test4PropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test4Property { get => _test4Property = _test4PropertyHelper?.Value ?? _test4Property; } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs index 2f528345..4befe88e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPFromObservableGeneratorTests.FromPartialProperty#TestNs.TestVM.ObservableAsPropertyFromObservable.g.verified.cs @@ -17,12 +17,10 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _testPropertyHelper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] public partial double? TestProperty { get => _testProperty = (_testPropertyHelper == null ? _testProperty : _testPropertyHelper.Value); } - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] protected void InitializeOAPH() { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index af7b13fa..23682fad 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -11,7 +11,6 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _test1Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test1 { get => _test1 = _test1Helper?.Value ?? _test1; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs index 863dcf65..5221cb69 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner1.ObservableAsProperties.g.verified.cs @@ -13,7 +13,6 @@ public partial class TestVMInner1 private readonly ReactiveUI.ObservableAsPropertyHelper _testIn1Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestIn1 { get => _testIn1 = _testIn1Helper?.Value ?? _testIn1; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs index 695d49ef..190f193e 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2+TestVMInner3.ObservableAsProperties.g.verified.cs @@ -15,7 +15,6 @@ public partial class TestVMInner3 private readonly ReactiveUI.ObservableAsPropertyHelper _testIn3Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestIn3 { get => _testIn3 = _testIn3Helper?.Value ?? _testIn3; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs index e28b9188..d8747a92 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM+TestVMInner2.ObservableAsProperties.g.verified.cs @@ -13,7 +13,6 @@ public partial class TestVMInner2 private readonly ReactiveUI.ObservableAsPropertyHelper _testIn2Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestIn2 { get => _testIn2 = _testIn2Helper?.Value ?? _testIn2; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 8403e4f7..2897a9b2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.FromFieldNestedClass#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -11,7 +11,6 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _test2Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test2 { get => _test2 = _test2Helper?.Value ?? _test2; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index a46e1748..e96b9824 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NamedFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -11,7 +11,6 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _test4Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test4 { get => _test4 = _test4Helper?.Value ?? _test4; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 42ffb9e4..3b2b7bcb 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromField#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -11,7 +11,6 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _test3Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test3 { get => _test3 = _test3Helper?.Value ?? _test3; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs index ffb1bb2c..650a0135 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ObservableAsPropertyAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property | global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ObservableAsPropertyAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs index 2a86c0b6..548e82d7 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/OAPH/OAPGeneratorTests.NonReadOnlyFromFieldProtected#TestNs.TestVM.ObservableAsProperties.g.verified.cs @@ -11,7 +11,6 @@ public partial class TestVM private readonly ReactiveUI.ObservableAsPropertyHelper _test5Helper; /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test5 { get => _test5 = _test5Helper?.Value ?? _test5; } } diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePartialProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePartialProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePartialProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePartialProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs index 07461e06..cd0ffd2a 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#TestNs.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs index 53498784..49b034f3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#TestNs.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test1 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs index 16fc6c0f..283ab8dd 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesCalledValue#TestNs.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string Value { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs index 8974dfc9..89940cb2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#TestNs.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int Test2 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs index 3038732c..92267be5 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#TestNs.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs index 7cbdb7cd..0e7ba6b3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs1.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs index bd60e9ad..f27308ee 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#TestNs2.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.Runtime.Serialization.DataMemberAttribute()] [global::System.Text.Json.Serialization.JsonIncludeAttribute()] diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs index 9c1547bd..f1b9a0ee 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithInit#TestNs.TestVM.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestVM { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public string MustBeSet { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs index 13a21658..d4c80bd2 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs index 14674401..f716a5c8 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs @@ -14,7 +14,6 @@ public partial class TestInnerClass1 { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestInner1 { @@ -24,7 +23,6 @@ public int TestInner1 } /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestInner11 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs index 70ed9ddb..21bede28 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs @@ -16,7 +16,6 @@ public partial class TestInnerClass3 { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestInner3 { @@ -26,7 +25,6 @@ public int TestInner3 } /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestInner33 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs index 047ac454..ba38f3a3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs @@ -14,7 +14,6 @@ public partial class TestInnerClass2 { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestInner2 { @@ -24,7 +23,6 @@ public int TestInner2 } /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public int TestInner22 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs index 9cfc1120..898c290f 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs @@ -12,7 +12,6 @@ public partial class TestViewModel3 { /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public float TestVM3Property { @@ -22,7 +21,6 @@ public float TestVM3Property } /// - [global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveGenerator", "2.3.0.0")] [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public float TestVM3Property2 { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs index 392c75cd..5009b3af 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReativeCommandAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveCommandAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs index 392c75cd..5009b3af 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveAsyncCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReativeCommandAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveCommandAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs index 392c75cd..5009b3af 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommand#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReativeCommandAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveCommandAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithNestedClasses#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithNestedClasses#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs index 392c75cd..5009b3af 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithNestedClasses#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithNestedClasses#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReativeCommandAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveCommandAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithOutputScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithOutputScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs index 392c75cd..5009b3af 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithOutputScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithOutputScheduler#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReativeCommandAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveCommandAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs index 392c75cd..5009b3af 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithParameter#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -13,7 +13,6 @@ namespace ReactiveUI.SourceGenerators; /// ReativeCommandAttribute. /// /// -[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.ReactiveCommandGenerator", "1.1.0.0")] [global::System.AttributeUsage(global::System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class ReactiveCommandAttribute : global::System.Attribute { diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs index 845853f5..eeef9358 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECOLL/ReactiveCollectionGeneratorTests.FromReactiveCollectionField#ReactiveUI.SourceGenerators.ReactiveCollectionAttribute.g.verified.cs @@ -4,8 +4,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System; - // #pragma warning disable #nullable enable @@ -15,7 +13,7 @@ namespace ReactiveUI.SourceGenerators; /// ReactiveAttribute. /// /// -[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : Attribute; +[global::System.AttributeUsage(global::System.AttributeTargets.Field | global::System.AttributeTargets.Property, AllowMultiple = false, Inherited = false)] +internal sealed class ReactiveCollectionAttribute : global::System.Attribute; #nullable restore #pragma warning restore \ No newline at end of file diff --git a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs index 4073d53c..395c7be3 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/TestHelper.cs @@ -237,5 +237,5 @@ public SettingsTask RunGeneratorAndCheck( return VerifyGenerator(driver.RunGenerators(compilation)); } - private SettingsTask VerifyGenerator(GeneratorDriver driver) => Verify(driver).UseDirectory(VerifiedFilePath()); ////.ScrubLinesContaining("[global::System.CodeDom.Compiler.GeneratedCode(\""); + private SettingsTask VerifyGenerator(GeneratorDriver driver) => Verify(driver).UseDirectory(VerifiedFilePath()).ScrubLinesContaining("[global::System.CodeDom.Compiler.GeneratedCode(\""); } diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs index dd56c378..950d6c32 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/AttributeDefinitions.cs @@ -464,34 +464,6 @@ internal sealed class ReactiveCollectionAttribute : global::System.Attribute; #nullable restore #pragma warning restore """; - - - - public const string ReactiveCollectionAttributeType = "ReactiveUI.SourceGenerators.ReactiveCollectionAttribute"; - - public static string ReactiveCollectionAttribute => $$""" -// Copyright (c) {{DateTime.Now.Year}} .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -using System; - -// -#pragma warning disable -#nullable enable -namespace ReactiveUI.SourceGenerators; - -/// -/// ReactiveAttribute. -/// -/// -[global::System.CodeDom.Compiler.GeneratedCode("{{ReactiveGenerator.GeneratorName}}", "{{ReactiveGenerator.GeneratorVersion}}")] -[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] -internal sealed class ReactiveCollectionAttribute : Attribute; -#nullable restore -#pragma warning restore -"""; } #pragma warning restore diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs index 321251de..28cbc66a 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/Models/ReactiveCollectionFieldInfo.cs @@ -19,7 +19,4 @@ internal sealed record ReactiveCollectionFieldInfo( string? Initializer, bool IsReferenceTypeOrUnconstrainedTypeParameter, bool IncludeMemberNotNullOnSetAccessor, - EquatableArray ForwardedAttributes, - string IsReadOnly, - string AccessModifier, - string Inheritance); + EquatableArray ForwardedAttributes); diff --git a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs index 56ea6629..b6dd406b 100644 --- a/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators.Roslyn/ReactiveCollection/ReactiveCollectionGenerator.Execute.cs @@ -51,24 +51,6 @@ public sealed partial class ReactiveCollectionGenerator return new(default, builder.ToImmutable()); } - // Get the can PropertyName member, if any - attributeData.TryGetNamedArgument("ReadOnly", out bool? isReadonly); - - // Get Inheritance value from the attribute - attributeData.TryGetNamedArgument("Inheritance", out int? inheritanceArgument); - var inheritance = inheritanceArgument switch - { - 1 => " virtual", - 2 => " override", - 3 => " new", - _ => string.Empty, - }; - - token.ThrowIfCancellationRequested(); - - attributeData.TryGetNamedArgument("UseProtected", out bool useProtected); - var useProtectedModifier = useProtected ? "protected" : "private"; - token.ThrowIfCancellationRequested(); // Get the property type and name @@ -121,10 +103,7 @@ public sealed partial class ReactiveCollectionGenerator initializer, isReferenceTypeOrUnconstraindTypeParameter, includeMemberNotNullOnSetAccessor, - forwardedPropertyAttributes, - isReadonly == false ? string.Empty : "readonly", - useProtectedModifier, - inheritance), + forwardedPropertyAttributes), builder.ToImmutable()); }