-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature overridable Inheritance property (#123)
* support overridable property * Update to use enum, fix tests --------- Co-authored-by: Chris Pulman <[email protected]>
- Loading branch information
1 parent
954ab78
commit 9c1feac
Showing
15 changed files
with
239 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...thAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//HintName: ReactiveUI.SourceGenerators.AccessModifier.g.cs | ||
// Copyright (c) 2024 .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 |
35 changes: 35 additions & 0 deletions
35
...ttributesAccessAndInheritance#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//HintName: ReactiveUI.SourceGenerators.ReactiveAttribute.g.cs | ||
// Copyright (c) 2024 .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 |
23 changes: 23 additions & 0 deletions
23
....FromReactivePropertiesWithAttributesAccessAndInheritance#TestVM.Properties.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//HintName: TestVM.Properties.g.cs | ||
// <auto-generated/> | ||
using ReactiveUI; | ||
|
||
#pragma warning disable | ||
#nullable enable | ||
|
||
namespace TestNs | ||
{ | ||
/// <summary> | ||
/// Partial class for the TestVM which contains ReactiveUI Reactive property initialization. | ||
/// </summary> | ||
public partial class TestVM | ||
{ | ||
/// <inheritdoc cref="_name"/> | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
[global::System.Runtime.Serialization.DataMemberAttribute()] | ||
[global::System.Text.Json.Serialization.JsonIncludeAttribute()] | ||
public string? Name { get => _name; set => this.RaiseAndSetIfChanged(ref _name, value); } | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.