-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Match component properties as case insensitive (#10657)
* Add tests * Match component properties as case insensitive * Allow mapped code to differ in case * Update new baselines * Update pre-existing baselines * Add more tests * Match bind attributes case insensitive too * Update baselines * Test EditorRequired with different casing * Use CaseSensitive property during bind matching * Improve loop efficiency
- Loading branch information
Showing
54 changed files
with
1,365 additions
and
21 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
11 changes: 8 additions & 3 deletions
11
...DesignTimeCodeGenerationTest/Component_MatchingIsCaseSensitive/TestComponent.mappings.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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
Source Location: (77:2,43 [4] x:\dir\subdir\Test\TestComponent.cshtml) | ||
Source Location: (60:2,26 [1] x:\dir\subdir\Test\TestComponent.cshtml) | ||
|1| | ||
Generated Location: (1459:39,26 [1] ) | ||
|1| | ||
|
||
Source Location: (77:2,43 [4] x:\dir\subdir\Test\TestComponent.cshtml) | ||
|true| | ||
Generated Location: (1501:40,43 [4] ) | ||
Generated Location: (1767:48,43 [4] ) | ||
|true| | ||
|
||
Source Location: (63:2,29 [12] x:\dir\subdir\Test\TestComponent.cshtml) | ||
|BoolProperty| | ||
Generated Location: (1929:53,29 [12] ) | ||
Generated Location: (2195:61,29 [12] ) | ||
|BoolProperty| | ||
|
50 changes: 50 additions & 0 deletions
50
...rationTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.codegen.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,50 @@ | ||
// <auto-generated/> | ||
#pragma warning disable 1591 | ||
namespace Test | ||
{ | ||
#line default | ||
using global::System; | ||
using global::System.Collections.Generic; | ||
using global::System.Linq; | ||
using global::System.Threading.Tasks; | ||
using global::Microsoft.AspNetCore.Components; | ||
#line default | ||
#line hidden | ||
#nullable restore | ||
public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase | ||
#nullable disable | ||
{ | ||
#pragma warning disable 219 | ||
private void __RazorDirectiveTokenHelpers__() { | ||
} | ||
#pragma warning restore 219 | ||
#pragma warning disable 0414 | ||
private static object __o = null; | ||
#pragma warning restore 0414 | ||
#pragma warning disable 1998 | ||
protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) | ||
{ | ||
__o = global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.String>( | ||
#nullable restore | ||
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
new MyClass() | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
); | ||
__builder.AddAttribute(-1, "ChildContent", (global::Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => { | ||
} | ||
)); | ||
#nullable restore | ||
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
__o = typeof(global::Test.MyComponent); | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
} | ||
#pragma warning restore 1998 | ||
} | ||
} | ||
#pragma warning restore 1591 |
20 changes: 20 additions & 0 deletions
20
...GenerationTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.ir.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,20 @@ | ||
Document - | ||
NamespaceDeclaration - - Test | ||
UsingDirective - (3:1,1 [20] ) - global::System | ||
UsingDirective - (26:2,1 [40] ) - global::System.Collections.Generic | ||
UsingDirective - (69:3,1 [25] ) - global::System.Linq | ||
UsingDirective - (97:4,1 [36] ) - global::System.Threading.Tasks | ||
UsingDirective - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components | ||
ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - | ||
DesignTimeDirective - | ||
CSharpCode - | ||
IntermediateToken - - CSharp - #pragma warning disable 0414 | ||
CSharpCode - | ||
IntermediateToken - - CSharp - private static object __o = null; | ||
CSharpCode - | ||
IntermediateToken - - CSharp - #pragma warning restore 0414 | ||
MethodDeclaration - - protected override - void - BuildRenderTree | ||
Component - (0:0,0 [46] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent | ||
ComponentAttribute - (26:0,26 [16] x:\dir\subdir\Test\TestComponent.cshtml) - PlaceHolder - Placeholder - AttributeStructure.DoubleQuotes | ||
CSharpExpression - (28:0,28 [13] x:\dir\subdir\Test\TestComponent.cshtml) | ||
LazyIntermediateToken - (28:0,28 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - new MyClass() |
5 changes: 5 additions & 0 deletions
5
...tionTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.mappings.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,5 @@ | ||
Source Location: (28:0,28 [13] x:\dir\subdir\Test\TestComponent.cshtml) | ||
|new MyClass()| | ||
Generated Location: (1138:29,28 [13] ) | ||
|new MyClass()| | ||
|
Oops, something went wrong.