Skip to content

Commit 7ea6761

Browse files
authored
Add Required Init For Reactive Property (#157)
Closes #134
1 parent 45490dc commit 7ea6761

File tree

21 files changed

+201
-12
lines changed

21 files changed

+201
-12
lines changed

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal enum AccessModifier
2020
Private,
2121
InternalProtected,
2222
PrivateProtected,
23+
Init,
2324
}
2425

2526
/// <summary>

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperiesWithAttributes#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ internal sealed class ReactiveAttribute : Attribute
3030
/// Gets the InheritanceModifier of the property.
3131
/// </sumary>
3232
public InheritanceModifier Inheritance { get; init; }
33+
34+
/// <summary>
35+
/// Use Required attribute to indicate that the property is required.
36+
/// </summary>
37+
public bool UseRequired { get; init; }
3338
}
3439
#nullable restore
3540
#pragma warning restore

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal enum AccessModifier
2020
Private,
2121
InternalProtected,
2222
PrivateProtected,
23+
Init,
2324
}
2425

2526
/// <summary>

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactiveProperties#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ internal sealed class ReactiveAttribute : Attribute
3030
/// Gets the InheritanceModifier of the property.
3131
/// </sumary>
3232
public InheritanceModifier Inheritance { get; init; }
33+
34+
/// <summary>
35+
/// Use Required attribute to indicate that the property is required.
36+
/// </summary>
37+
public bool UseRequired { get; init; }
3338
}
3439
#nullable restore
3540
#pragma warning restore

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal enum AccessModifier
2020
Private,
2121
InternalProtected,
2222
PrivateProtected,
23+
Init,
2324
}
2425

2526
/// <summary>

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAccess#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ internal sealed class ReactiveAttribute : Attribute
3030
/// Gets the InheritanceModifier of the property.
3131
/// </sumary>
3232
public InheritanceModifier Inheritance { get; init; }
33+
34+
/// <summary>
35+
/// Use Required attribute to indicate that the property is required.
36+
/// </summary>
37+
public bool UseRequired { get; init; }
3338
}
3439
#nullable restore
3540
#pragma warning restore

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal enum AccessModifier
2020
Private,
2121
InternalProtected,
2222
PrivateProtected,
23+
Init,
2324
}
2425

2526
/// <summary>

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithAttributesAccessAndInheritance#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ internal sealed class ReactiveAttribute : Attribute
3030
/// Gets the InheritanceModifier of the property.
3131
/// </sumary>
3232
public InheritanceModifier Inheritance { get; init; }
33+
34+
/// <summary>
35+
/// Use Required attribute to indicate that the property is required.
36+
/// </summary>
37+
public bool UseRequired { get; init; }
3338
}
3439
#nullable restore
3540
#pragma warning restore

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.AccessModifier.g.verified.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal enum AccessModifier
2020
Private,
2121
InternalProtected,
2222
PrivateProtected,
23+
Init,
2324
}
2425

2526
/// <summary>

src/ReactiveUI.SourceGenerator.Tests/REACTIVE/ReactiveGeneratorTests.FromReactivePropertiesWithIdenticalClass#ReactiveUI.SourceGenerators.ReactiveAttribute.g.verified.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ internal sealed class ReactiveAttribute : Attribute
3030
/// Gets the InheritanceModifier of the property.
3131
/// </sumary>
3232
public InheritanceModifier Inheritance { get; init; }
33+
34+
/// <summary>
35+
/// Use Required attribute to indicate that the property is required.
36+
/// </summary>
37+
public bool UseRequired { get; init; }
3338
}
3439
#nullable restore
3540
#pragma warning restore

0 commit comments

Comments
 (0)