-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for generating factory methods for bound generic types
Changed test framework to xunit Updated SPP Replaced Nullable and IsExternalInit with Polysharp
- Loading branch information
Showing
30 changed files
with
249 additions
and
102 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
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
28 changes: 28 additions & 0 deletions
28
...erifyGeneratedSources#Sundew.DiscriminatedUnions.Tester.DoubleError.generated.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,28 @@ | ||
//HintName: Sundew.DiscriminatedUnions.Tester.DoubleError.generated.cs | ||
#nullable enable | ||
|
||
namespace Sundew.DiscriminatedUnions.Tester | ||
{ | ||
#pragma warning disable SA1601 | ||
[global::System.Diagnostics.DebuggerNonUserCode] | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Sundew.DiscriminateUnions.Generator", "5.1.0.0")] | ||
public partial record DoubleError | ||
#pragma warning restore SA1601 | ||
{ | ||
/// <summary> | ||
/// Gets the OutOfRangeError case. | ||
/// </summary> | ||
/// <returns>The OutOfRangeError.</returns> | ||
[Sundew.DiscriminatedUnions.CaseType(typeof(global::Sundew.DiscriminatedUnions.Tester.DoubleError.OutOfRangeError))] | ||
public static global::Sundew.DiscriminatedUnions.Tester.DoubleError _OutOfRangeError { get; } | ||
= new global::Sundew.DiscriminatedUnions.Tester.DoubleError.OutOfRangeError(); | ||
|
||
/// <summary> | ||
/// Gets the RoundingError case. | ||
/// </summary> | ||
/// <returns>The RoundingError.</returns> | ||
[Sundew.DiscriminatedUnions.CaseType(typeof(global::Sundew.DiscriminatedUnions.Tester.DoubleError.RoundingError))] | ||
public static global::Sundew.DiscriminatedUnions.Tester.DoubleError _RoundingError { get; } | ||
= new global::Sundew.DiscriminatedUnions.Tester.DoubleError.RoundingError(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ifyGeneratedSources#Sundew.DiscriminatedUnions.Tester.Input{TError}.generated.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,30 @@ | ||
//HintName: Sundew.DiscriminatedUnions.Tester.Input{TError}.generated.cs | ||
#nullable enable | ||
|
||
namespace Sundew.DiscriminatedUnions.Tester | ||
{ | ||
#pragma warning disable SA1601 | ||
[global::System.Diagnostics.DebuggerNonUserCode] | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Sundew.DiscriminateUnions.Generator", "5.1.0.0")] | ||
public partial record Input<TError> | ||
#pragma warning restore SA1601 | ||
{ | ||
/// <summary> | ||
/// Factory method for the DoubleInput case. | ||
/// </summary> | ||
/// <param name="value">The value.</param> | ||
/// <returns>A new DoubleInput.</returns> | ||
[Sundew.DiscriminatedUnions.CaseType(typeof(global::Sundew.DiscriminatedUnions.Tester.DoubleInput))] | ||
public static global::Sundew.DiscriminatedUnions.Tester.Input<global::Sundew.DiscriminatedUnions.Tester.DoubleError> DoubleInput(double value) | ||
=> new global::Sundew.DiscriminatedUnions.Tester.DoubleInput(value); | ||
|
||
/// <summary> | ||
/// Factory method for the IntInput case. | ||
/// </summary> | ||
/// <param name="value">The value.</param> | ||
/// <returns>A new IntInput.</returns> | ||
[Sundew.DiscriminatedUnions.CaseType(typeof(global::Sundew.DiscriminatedUnions.Tester.IntInput))] | ||
public static global::Sundew.DiscriminatedUnions.Tester.Input<global::Sundew.DiscriminatedUnions.Tester.IntError> IntInput(int value) | ||
=> new global::Sundew.DiscriminatedUnions.Tester.IntInput(value); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...e.VerifyGeneratedSources#Sundew.DiscriminatedUnions.Tester.IntError.generated.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,20 @@ | ||
//HintName: Sundew.DiscriminatedUnions.Tester.IntError.generated.cs | ||
#nullable enable | ||
|
||
namespace Sundew.DiscriminatedUnions.Tester | ||
{ | ||
#pragma warning disable SA1601 | ||
[global::System.Diagnostics.DebuggerNonUserCode] | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Sundew.DiscriminateUnions.Generator", "5.1.0.0")] | ||
public partial record IntError | ||
#pragma warning restore SA1601 | ||
{ | ||
/// <summary> | ||
/// Gets the OutOfRangeError case. | ||
/// </summary> | ||
/// <returns>The OutOfRangeError.</returns> | ||
[Sundew.DiscriminatedUnions.CaseType(typeof(global::Sundew.DiscriminatedUnions.Tester.IntError.OutOfRangeError))] | ||
public static global::Sundew.DiscriminatedUnions.Tester.IntError _OutOfRangeError { get; } | ||
= new global::Sundew.DiscriminatedUnions.Tester.IntError.OutOfRangeError(); | ||
} | ||
} |
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.