Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix For ReactiveCommand With Nested Classes #155

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestNs
{
/// <summary>
/// <summary>
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestVM
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestNs
{
/// <summary>
/// <summary>
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestVM
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestNs
{
/// <summary>
/// <summary>
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestVM
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestNs
{
/// <summary>
/// <summary>
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestVM
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestNs1
{
/// <summary>
/// <summary>
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestVM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestNs2
{
/// <summary>
/// <summary>
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestVM
Expand Down
Original file line number Diff line number Diff line change
@@ -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.

// <auto-generated/>
#pragma warning disable
#nullable enable
namespace ReactiveUI.SourceGenerators;

/// <summary>
/// AccessModifier.
/// </summary>
internal enum AccessModifier
{
Public,
Protected,
Internal,
Private,
InternalProtected,
PrivateProtected,
}

/// <summary>
/// InheritanceModifier.
/// </summary>
internal enum InheritanceModifier
{
None,
Virtual,
Override,
New,
}
#nullable restore
#pragma warning restore
Original file line number Diff line number Diff line change
@@ -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;

// <auto-generated/>
#pragma warning disable
#nullable enable
namespace ReactiveUI.SourceGenerators;

/// <summary>
/// ReactiveAttribute.
/// </summary>
/// <seealso cref="Attribute" />
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
internal sealed class ReactiveAttribute : Attribute
{
/// <summary>
/// Gets the AccessModifier of the set property.
/// </summary>
/// <value>
/// The AccessModifier of the set property.
/// </value>
public AccessModifier SetModifier { get; init; }

/// <summary>
/// Gets the InheritanceModifier of the property.
/// </sumary>
public InheritanceModifier Inheritance { get; init; }
}
#nullable restore
#pragma warning restore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//HintName: TestNs1.TestViewModel3+TestInnerClass1.Properties.g.cs
// <auto-generated/>
using ReactiveUI;

#pragma warning disable
#nullable enable

namespace TestNs1
{
public partial class TestViewModel3
{
/// <summary>
/// Partial class for the TestInnerClass1 which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestInnerClass1
{
/// <inheritdoc cref="_testInner1"/>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public int TestInner1
{
get => _testInner1;
[global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner1")]
set => this.RaiseAndSetIfChanged(ref _testInner1, value);
}

/// <inheritdoc cref="_testInner11"/>
[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
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//HintName: TestNs1.TestViewModel3+TestInnerClass2+TestInnerClass3.Properties.g.cs
// <auto-generated/>
using ReactiveUI;

#pragma warning disable
#nullable enable

namespace TestNs1
{
public partial class TestViewModel3
{
public partial class TestInnerClass2
{
/// <summary>
/// Partial class for the TestInnerClass3 which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestInnerClass3
{
/// <inheritdoc cref="_testInner3"/>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public int TestInner3
{
get => _testInner3;
[global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner3")]
set => this.RaiseAndSetIfChanged(ref _testInner3, value);
}

/// <inheritdoc cref="_testInner33"/>
[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
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//HintName: TestNs1.TestViewModel3+TestInnerClass2.Properties.g.cs
// <auto-generated/>
using ReactiveUI;

#pragma warning disable
#nullable enable

namespace TestNs1
{
public partial class TestViewModel3
{
/// <summary>
/// Partial class for the TestInnerClass2 which contains ReactiveUI Reactive property initialization.
/// </summary>
public partial class TestInnerClass2
{
/// <inheritdoc cref="_testInner2"/>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public int TestInner2
{
get => _testInner2;
[global::System.Diagnostics.CodeAnalysis.MemberNotNull("_testInner2")]
set => this.RaiseAndSetIfChanged(ref _testInner2, value);
}

/// <inheritdoc cref="_testInner22"/>
[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
Loading