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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 7e579df..d2a8739 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ObservableAsPropertyAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1756eef..3fe74d1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 3fde86e..d2024dc 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 4af2052..3946232 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,7 +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#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1756eef..3fe74d1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 3fde86e..d2024dc 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 5f1211e..3b48333 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,7 +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#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1756eef..3fe74d1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 3fde86e..d2024dc 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 4705ef2..94971df 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,7 +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#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1756eef..3fe74d1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 3fde86e..d2024dc 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 30c620f..00d6b21 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,7 +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#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs index 1756eef..3fe74d1 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 3fde86e..d2024dc 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 4c939ee..02aa8f9 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,7 +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 f5b1066..eea6ffc 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,7 +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.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs new file mode 100644 index 0000000..3fe74d1 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: ReactiveUI.SourceGenerators.AccessModifier.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. + +// +#pragma warning disable +#nullable enable +namespace ReactiveUI.SourceGenerators; + +/// +/// AccessModifier. +/// +internal enum AccessModifier +{ + Public, + Protected, + Internal, + Private, + InternalProtected, + PrivateProtected, +} + +/// +/// InheritanceModifier. +/// +internal enum InheritanceModifier +{ + None, + Virtual, + Override, + New, +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 new file mode 100644 index 0000000..d2024dc --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs @@ -0,0 +1,35 @@ +//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.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 ReactiveAttribute : Attribute +{ + /// + /// Gets the AccessModifier of the set property. + /// + /// + /// The AccessModifier of the set property. + /// + public AccessModifier SetModifier { get; init; } + + /// + /// Gets the InheritanceModifier of the property. + /// + public InheritanceModifier Inheritance { get; init; } +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 new file mode 100644 index 0000000..0ba3a48 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass1.Properties.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: TestNs1.TestViewModel3+TestInnerClass1.Properties.g.cs +// +using ReactiveUI; + +#pragma warning disable +#nullable enable + +namespace TestNs1 +{ + public partial class TestViewModel3 +{ +/// + /// Partial class for the TestInnerClass1 which contains ReactiveUI Reactive property initialization. + /// + public partial class TestInnerClass1 + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner1 + { + get => _testInner1; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner1")] + set => this.RaiseAndSetIfChanged(ref _testInner1, value); + } + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner11 + { + get => _testInner11; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner11")] + set => this.RaiseAndSetIfChanged(ref _testInner11, value); + } + } +} + +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 new file mode 100644 index 0000000..7351928 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.cs +// +using ReactiveUI; + +#pragma warning disable +#nullable enable + +namespace TestNs1 +{ + public partial class TestViewModel3 +{ +public partial class TestInnerClass2 +{ +/// + /// Partial class for the TestInnerClass3 which contains ReactiveUI Reactive property initialization. + /// + public partial class TestInnerClass3 + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner3 + { + get => _testInner3; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner3")] + set => this.RaiseAndSetIfChanged(ref _testInner3, value); + } + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner33 + { + get => _testInner33; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner33")] + set => this.RaiseAndSetIfChanged(ref _testInner33, value); + } + } +} +} + +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 new file mode 100644 index 0000000..0fb3d63 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3+TestInnerClass2.Properties.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: TestNs1.TestViewModel3+TestInnerClass2.Properties.g.cs +// +using ReactiveUI; + +#pragma warning disable +#nullable enable + +namespace TestNs1 +{ + public partial class TestViewModel3 +{ +/// + /// Partial class for the TestInnerClass2 which contains ReactiveUI Reactive property initialization. + /// + public partial class TestInnerClass2 + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner2 + { + get => _testInner2; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner2")] + set => this.RaiseAndSetIfChanged(ref _testInner2, value); + } + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public int TestInner22 + { + get => _testInner22; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner22")] + set => this.RaiseAndSetIfChanged(ref _testInner22, value); + } + } +} + +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 new file mode 100644 index 0000000..4cbdff3 --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithNestedClass#TestNs1.TestViewModel3.Properties.g.verified.cs @@ -0,0 +1,35 @@ +//HintName: TestNs1.TestViewModel3.Properties.g.cs +// +using ReactiveUI; + +#pragma warning disable +#nullable enable + +namespace TestNs1 +{ + /// + /// Partial class for the TestViewModel3 which contains ReactiveUI Reactive property initialization. + /// + public partial class TestViewModel3 + { + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public float TestVM3Property + { + get => _testVM3Property; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testVM3Property")] + set => this.RaiseAndSetIfChanged(ref _testVM3Property, value); + } + + /// + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + public float TestVM3Property2 + { + get => _testVM3Property2; + [global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testVM3Property2")] + set => this.RaiseAndSetIfChanged(ref _testVM3Property2, value); + } + } +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 0f291a7..92df71c 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 0f291a7..92df71c 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 0f291a7..92df71c 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. 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 new file mode 100644 index 0000000..92df71c --- /dev/null +++ b/src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD/ReactiveCMDGeneratorTests.FromReactiveCommandWithNestedClasses#ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.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; + +/// +/// ReativeCommandAttribute. +/// +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] +internal sealed class ReactiveCommandAttribute : Attribute +{ + /// + /// Gets the can execute method or property. + /// + /// + /// The name of the CanExecute Observable of bool. + /// + public string? CanExecute { get; init; } +} +#nullable restore +#pragma warning restore \ No newline at end of file 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 0f291a7..92df71c 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 @@ -1,5 +1,5 @@ //HintName: ReactiveUI.SourceGenerators.ReactiveCommandAttribute.g.cs -// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. +// 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. diff --git a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs index 4d51d79..4331301 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveCMDGeneratorTests.cs @@ -133,4 +133,63 @@ private async Task Test3(string baseString) // Act: Initialize the helper and run the generator. Assert: Verify the generated code. return TestHelper.TestPass(sourceCode); } + + /// + /// Froms the reactive command with nested classes. + /// + /// A task to monitor the async. + [Fact] + public Task FromReactiveCommandWithNestedClasses() + { + // Arrange: Setup the source code that matches the generator input expectations. + const string sourceCode = """ + using System; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + using System.Reactive.Linq; + using System.Threading.Tasks; + + namespace TestNs; + + /// + /// TestViewModel3. + /// + public partial class TestViewModel3 : ReactiveObject + { + [ReactiveCommand] + private int Test1() => 10; + + /// + /// TestInnerClass. + /// + public partial class TestInnerClass1 : ReactiveObject + { + [ReactiveCommand] + private int TestI1() => 10; + } + + /// + /// TestInnerClass. + /// + public partial class TestInnerClass2 : ReactiveObject + { + [ReactiveCommand] + private int TestI2() => 10; + + /// + /// TestInnerClass4. + /// + /// + public partial class TestInnerClass3 : ReactiveObject + { + [ReactiveCommand] + private int TestI3() => 10; + } + } + } + """; + + // 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/ReactiveGeneratorTests.cs b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveGeneratorTests.cs index 33f72a2..bd113f4 100644 --- a/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveGeneratorTests.cs +++ b/src/ReactiveUI.SourceGenerator.Tests/UnitTests/ReactiveGeneratorTests.cs @@ -76,7 +76,7 @@ public partial class TestVM : ReactiveObject public Task FromReactiveProperiesWithAttributes() { // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = @" + const string sourceCode = """ using System; using System.Runtime.Serialization; using System.Text.Json.Serialization; @@ -93,7 +93,7 @@ public partial class TestVM : ReactiveObject [Reactive] private int _test3 = 10; } - "; + """; // Act: Initialize the helper and run the generator. Assert: Verify the generated code. return TestHelper.TestPass(sourceCode); @@ -107,7 +107,7 @@ public partial class TestVM : ReactiveObject public Task FromReactivePropertiesWithAttributesAccessAndInheritance() { // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = @" + const string sourceCode = """ using System; using System.Runtime.Serialization; using System.Text.Json.Serialization; @@ -124,7 +124,7 @@ public partial class TestVM : ReactiveObject [Reactive(Inheritance = InheritanceModifier.Virtual, SetModifier = AccessModifier.Protected)] private string? _name; } - "; + """; // Act: Initialize the helper and run the generator. Assert: Verify the generated code. return TestHelper.TestPass(sourceCode); @@ -138,7 +138,7 @@ public partial class TestVM : ReactiveObject public Task FromReactivePropertiesWithIdenticalClass() { // Arrange: Setup the source code that matches the generator input expectations. - const string sourceCode = @" + const string sourceCode = """ using System; using System.Runtime.Serialization; using System.Text.Json.Serialization; @@ -167,7 +167,80 @@ public partial class TestVM : ReactiveObject private string? _name; } } - "; + """; + + // Act: Initialize the helper and run the generator. Assert: Verify the generated code. + return TestHelper.TestPass(sourceCode); + } + + /// + /// Froms the reactive properties with nested class. + /// + /// A task to monitor the async. + [Fact] + public Task FromReactivePropertiesWithNestedClass() + { + // Arrange: Setup the source code that matches the generator input expectations. + const string sourceCode = """ + using System; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + using ReactiveUI; + using ReactiveUI.SourceGenerators; + using System.Reactive.Linq; + + namespace TestNs1 + { + /// + /// TestViewModel3. + /// + public partial class TestViewModel3 : ReactiveObject + { + [Reactive] + private float _testVM3Property; + + [Reactive] + private float _testVM3Property2; + + /// + /// TestInnerClass. + /// + public partial class TestInnerClass1 : ReactiveObject + { + [Reactive] + private int _testInner1; + + [Reactive] + private int _testInner11; + } + + /// + /// TestInnerClass. + /// + public partial class TestInnerClass2 : ReactiveObject + { + [Reactive] + private int _testInner2; + + [Reactive] + private int _testInner22; + + /// + /// TestInnerClass4. + /// + /// + public partial class TestInnerClass3 : ReactiveObject + { + [Reactive] + private int _testInner3; + + [Reactive] + private int _testInner33; + } + } + } + } + """; // Act: Initialize the helper and run the generator. Assert: Verify the generated code. return TestHelper.TestPass(sourceCode); diff --git a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel3.cs b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel3.cs index 007b9b3..d9c4d73 100644 --- a/src/ReactiveUI.SourceGenerators.Execute/TestViewModel3.cs +++ b/src/ReactiveUI.SourceGenerators.Execute/TestViewModel3.cs @@ -19,6 +19,9 @@ public partial class TestViewModel3 : ReactiveObject [Reactive] private float _testVM3Property2; + [ReactiveCommand] + private int Test1() => 10; + /// /// TestInnerClass. /// @@ -29,6 +32,9 @@ public partial class TestInnerClass1 : ReactiveObject [Reactive] private int _testInner11; + + [ReactiveCommand] + private int TestI1() => 10; } /// @@ -42,6 +48,9 @@ public partial class TestInnerClass2 : ReactiveObject [Reactive] private int _testInner22; + [ReactiveCommand] + private int TestI2() => 10; + /// /// TestInnerClass4. /// @@ -53,6 +62,9 @@ public partial class TestInnerClass3 : ReactiveObject [Reactive] private int _testInner33; + + [ReactiveCommand] + private int TestI3() => 10; } } } diff --git a/src/ReactiveUI.SourceGenerators/Core/Models/TargetInfo.cs b/src/ReactiveUI.SourceGenerators/Core/Models/TargetInfo.cs index c8f5e50..b703c19 100644 --- a/src/ReactiveUI.SourceGenerators/Core/Models/TargetInfo.cs +++ b/src/ReactiveUI.SourceGenerators/Core/Models/TargetInfo.cs @@ -42,7 +42,7 @@ public static TargetInfo From(INamedTypeSymbol namedTypeSymbol) parentInfo); } - public static void GetParentClasses(ref List parentClassDeclarations, TargetInfo? targetInfo) + public static void GetParentClasses(List parentClassDeclarations, TargetInfo? targetInfo) { if (targetInfo is not null) { @@ -57,12 +57,12 @@ public static void GetParentClasses(ref List parentClassDeclarations, Ta if (targetInfo.ParentInfo is not null) { // Recursively get the parent classes - GetParentClasses(ref parentClassDeclarations, targetInfo.ParentInfo); + GetParentClasses(parentClassDeclarations, targetInfo.ParentInfo); } } } - public static string GenerateParentClassDeclarations(ref List parentClassDeclarations) + public static string GenerateParentClassDeclarations(List parentClassDeclarations) { // Reverse the list to get the parent classes in the correct order parentClassDeclarations.Reverse(); diff --git a/src/ReactiveUI.SourceGenerators/Reactive/ReactiveGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators/Reactive/ReactiveGenerator.Execute.cs index 620ecfa..9163c6e 100644 --- a/src/ReactiveUI.SourceGenerators/Reactive/ReactiveGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators/Reactive/ReactiveGenerator.Execute.cs @@ -238,11 +238,11 @@ private static string GenerateSource(string containingTypeName, string containin var parentClassDeclarations = new List(); foreach (var property in properties) { - TargetInfo.GetParentClasses(ref parentClassDeclarations, property.TargetInfo.ParentInfo); + TargetInfo.GetParentClasses(parentClassDeclarations, property.TargetInfo.ParentInfo); } // Generate the parent class declarations - var parentClassDeclarationsString = TargetInfo.GenerateParentClassDeclarations(ref parentClassDeclarations); + var parentClassDeclarationsString = TargetInfo.GenerateParentClassDeclarations(parentClassDeclarations); var classes = GenerateClassWithProperties(containingTypeName, containingNamespace, containingClassVisibility, containingType, properties); @@ -282,7 +282,7 @@ private static string GenerateClassWithProperties(string containingTypeName, str return $$""" - /// +/// /// Partial class for the {{containingTypeName}} which contains ReactiveUI Reactive property initialization. /// {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} diff --git a/src/ReactiveUI.SourceGenerators/ReactiveCommand/ReactiveCommandGenerator.Execute.cs b/src/ReactiveUI.SourceGenerators/ReactiveCommand/ReactiveCommandGenerator.Execute.cs index ae3f064..db791a2 100644 --- a/src/ReactiveUI.SourceGenerators/ReactiveCommand/ReactiveCommandGenerator.Execute.cs +++ b/src/ReactiveUI.SourceGenerators/ReactiveCommand/ReactiveCommandGenerator.Execute.cs @@ -3,6 +3,7 @@ // 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.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -107,8 +108,21 @@ public partial class ReactiveCommandGenerator private static string GenerateSource(string containingTypeName, string containingNamespace, string containingClassVisibility, string containingType, CommandInfo[] commands) { - // Generate all member declarations for the current type - var propertyDeclarations = string.Join("\n\r", commands.Select(GetCommandSyntax)); + // Get Parent class details from properties.ParentInfo + var parentClassDeclarations = new List(); + foreach (var command in commands) + { + TargetInfo.GetParentClasses(parentClassDeclarations, command.TargetInfo.ParentInfo); + } + + // Generate the parent class declarations + var parentClassDeclarationsString = TargetInfo.GenerateParentClassDeclarations(parentClassDeclarations); + + var classes = GenerateClassWithCommands(containingTypeName, containingNamespace, containingClassVisibility, containingType, commands); + + // Create closing brackets for parent classes + var closingBrackets = TargetInfo.GenerateClosingBrackets(parentClassDeclarations.Count); + return $$""" // @@ -118,17 +132,37 @@ private static string GenerateSource(string containingTypeName, string containin 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 commands. + /// The value. + private static string GenerateClassWithCommands(string containingTypeName, string containingNamespace, string containingClassVisibility, string containingType, CommandInfo[] commands) + { + // Includes 2 tabs from the property declarations so no need to add them here. + var commandDeclarations = string.Join("\n\r", commands.Select(GetCommandSyntax)); + + return +$$""" +/// /// Partial class for the {{containingTypeName}} which contains ReactiveUI ReactiveCommand initialization. /// {{containingClassVisibility}} partial {{containingType}} {{containingTypeName}} { [global::System.CodeDom.Compiler.GeneratedCode("{{GeneratorName}}", "{{GeneratorVersion}}")] -{{propertyDeclarations}} +{{commandDeclarations}} } -} -#nullable restore -#pragma warning restore """; }