-
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 exclude support to the inherit generator. Fixed a bug where the…
… generator would also copy nested type declarations (#1908)
- Loading branch information
1 parent
32203f1
commit 1b484ec
Showing
12 changed files
with
363 additions
and
144 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
23 changes: 23 additions & 0 deletions
23
...ratorTests.Should_Generate_And_Ignore_Type_Declaration_Members#Input1_Request.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: Rocket.Surgery.LaunchPad.Analyzers/Rocket.Surgery.LaunchPad.Analyzers.InheritFromGenerator/Input1_Request.cs | ||
#nullable enable | ||
using System; | ||
using MediatR; | ||
using Rocket.Surgery.LaunchPad.Foundation; | ||
|
||
namespace Sample.Core.Operations.Rockets | ||
{ | ||
public static partial class CreateRocket | ||
{ | ||
[System.Runtime.CompilerServices.CompilerGenerated] | ||
public partial record Request | ||
{ | ||
public string SerialNumber { get; set; } | ||
|
||
public Request With(Model value) => this with | ||
{ | ||
SerialNumber = value.SerialNumber | ||
}; | ||
} | ||
} | ||
} | ||
#nullable restore |
6 changes: 6 additions & 0 deletions
6
...nheritFromGeneratorTests.Should_Generate_And_Ignore_Type_Declaration_Members.verified.txt
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,6 @@ | ||
{ | ||
FinalDiagnostics: [], | ||
GeneratorDiagnostics: { | ||
Rocket.Surgery.LaunchPad.Analyzers.InheritFromGenerator: [] | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...FromGeneratorTests.Should_Inherit_Using_Generic_Type_Arguments#Input1_Request.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,29 @@ | ||
//HintName: Rocket.Surgery.LaunchPad.Analyzers/Rocket.Surgery.LaunchPad.Analyzers.InheritFromGenerator/Input1_Request.cs | ||
#nullable enable | ||
using System; | ||
using MediatR; | ||
using Rocket.Surgery.LaunchPad.Foundation; | ||
|
||
namespace Sample.Core.Operations.Rockets | ||
{ | ||
public static partial class CreateRocket | ||
{ | ||
[System.Runtime.CompilerServices.CompilerGenerated] | ||
public partial record Request | ||
{ | ||
public string SerialNumber { get; set; } | ||
|
||
public Request With(Model value) => this with | ||
{ | ||
SerialNumber = value.SerialNumber | ||
}; | ||
public string OtherNumber { get; set; } | ||
|
||
public Request With(Other value) => this with | ||
{ | ||
OtherNumber = value.OtherNumber | ||
}; | ||
} | ||
} | ||
} | ||
#nullable restore |
6 changes: 6 additions & 0 deletions
6
...pshots/InheritFromGeneratorTests.Should_Inherit_Using_Generic_Type_Arguments.verified.txt
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,6 @@ | ||
{ | ||
FinalDiagnostics: [], | ||
GeneratorDiagnostics: { | ||
Rocket.Surgery.LaunchPad.Analyzers.InheritFromGenerator: [] | ||
} | ||
} |