-
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.
- Loading branch information
Showing
7 changed files
with
251 additions
and
1 deletion.
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
79 changes: 79 additions & 0 deletions
79
...sts/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/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,79 @@ | ||
// <auto-generated/> | ||
#pragma warning disable 1591 | ||
namespace Test | ||
{ | ||
#line hidden | ||
using global::System; | ||
using global::System.Collections.Generic; | ||
using global::System.Linq; | ||
using global::System.Threading.Tasks; | ||
using global::Microsoft.AspNetCore.Components; | ||
public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase | ||
{ | ||
#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) | ||
{ | ||
var __typeInference_CreateMyComponent_0 = global::__Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(__builder, -1, -1, | ||
#nullable restore | ||
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
Selected | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
, -1, global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::TItem[]>(this, | ||
global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => Selected = __value, Selected)), -1, () => Selected); | ||
#pragma warning disable BL0005 | ||
__typeInference_CreateMyComponent_0. | ||
#nullable restore | ||
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
Value | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
= default; | ||
#pragma warning restore BL0005 | ||
#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 | ||
#nullable restore | ||
#line 3 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
|
||
string[] Selected { get; set; } = Array.Empty<string>(); | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
} | ||
} | ||
namespace __Blazor.Test.TestComponent | ||
{ | ||
#line hidden | ||
internal static class TypeInference | ||
{ | ||
public static global::Test.MyComponent<TItem> CreateMyComponent_0<TItem>(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem[] __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback<TItem[]> __arg1, int __seq2, global::System.Linq.Expressions.Expression<global::System.Func<TItem[]>> __arg2) | ||
{ | ||
__builder.OpenComponent<global::Test.MyComponent<TItem>>(seq); | ||
__builder.AddComponentParameter(__seq0, "Value", __arg0); | ||
__builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); | ||
__builder.AddComponentParameter(__seq2, "ValueExpression", __arg2); | ||
__builder.CloseComponent(); | ||
return default; | ||
} | ||
} | ||
} | ||
#pragma warning restore 1591 |
35 changes: 35 additions & 0 deletions
35
...onTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/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,35 @@ | ||
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 [38] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent | ||
ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes | ||
CSharpExpression - | ||
LazyIntermediateToken - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Selected | ||
ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes | ||
CSharpExpression - | ||
IntermediateToken - - CSharp - global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, | ||
IntermediateToken - - CSharp - __value => Selected = __value | ||
IntermediateToken - - CSharp - , Selected) | ||
ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - ValueExpression - AttributeStructure.DoubleQuotes | ||
CSharpExpression - | ||
IntermediateToken - - CSharp - () => Selected | ||
HtmlContent - (38:0,38 [4] x:\dir\subdir\Test\TestComponent.cshtml) | ||
LazyIntermediateToken - (38:0,38 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n | ||
CSharpCode - (49:2,7 [64] x:\dir\subdir\Test\TestComponent.cshtml) | ||
LazyIntermediateToken - (49:2,7 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string[] Selected { get; set; } = Array.Empty<string>();\n | ||
NamespaceDeclaration - - __Blazor.Test.TestComponent | ||
ClassDeclaration - - internal static - TypeInference - - | ||
ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 |
19 changes: 19 additions & 0 deletions
19
...s/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/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,19 @@ | ||
Source Location: (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) | ||
|Selected| | ||
Generated Location: (1072:25,26 [8] ) | ||
|Selected| | ||
|
||
Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml) | ||
|Value| | ||
Generated Location: (1610:36,19 [5] ) | ||
|Value| | ||
|
||
Source Location: (49:2,7 [64] x:\dir\subdir\Test\TestComponent.cshtml) | ||
| | ||
string[] Selected { get; set; } = Array.Empty<string>(); | ||
| | ||
Generated Location: (2025:54,7 [64] ) | ||
| | ||
string[] Selected { get; set; } = Array.Empty<string>(); | ||
| | ||
|
52 changes: 52 additions & 0 deletions
52
...nTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/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,52 @@ | ||
// <auto-generated/> | ||
#pragma warning disable 1591 | ||
namespace Test | ||
{ | ||
#line hidden | ||
using global::System; | ||
using global::System.Collections.Generic; | ||
using global::System.Linq; | ||
using global::System.Threading.Tasks; | ||
using global::Microsoft.AspNetCore.Components; | ||
public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase | ||
{ | ||
#pragma warning disable 1998 | ||
protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) | ||
{ | ||
global::__Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(__builder, 0, 1, | ||
#nullable restore | ||
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
Selected | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
, 2, global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::TItem[]>(this, global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => Selected = __value, Selected)), 3, () => Selected); | ||
} | ||
#pragma warning restore 1998 | ||
#nullable restore | ||
#line 3 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
|
||
string[] Selected { get; set; } = Array.Empty<string>(); | ||
|
||
#line default | ||
#line hidden | ||
#nullable disable | ||
} | ||
} | ||
namespace __Blazor.Test.TestComponent | ||
{ | ||
#line hidden | ||
internal static class TypeInference | ||
{ | ||
public static void CreateMyComponent_0<TItem>(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem[] __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback<TItem[]> __arg1, int __seq2, global::System.Linq.Expressions.Expression<global::System.Func<TItem[]>> __arg2) | ||
{ | ||
__builder.OpenComponent<global::Test.MyComponent<TItem>>(seq); | ||
__builder.AddComponentParameter(__seq0, "Value", __arg0); | ||
__builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); | ||
__builder.AddComponentParameter(__seq2, "ValueExpression", __arg2); | ||
__builder.CloseComponent(); | ||
} | ||
} | ||
} | ||
#pragma warning restore 1591 |
26 changes: 26 additions & 0 deletions
26
...ationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/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,26 @@ | ||
Document - | ||
NamespaceDeclaration - - Test | ||
UsingDirective - (3:1,1 [22] ) - global::System | ||
UsingDirective - (26:2,1 [42] ) - global::System.Collections.Generic | ||
UsingDirective - (69:3,1 [27] ) - global::System.Linq | ||
UsingDirective - (97:4,1 [38] ) - global::System.Threading.Tasks | ||
UsingDirective - (136:5,1 [47] ) - global::Microsoft.AspNetCore.Components | ||
ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - | ||
MethodDeclaration - - protected override - void - BuildRenderTree | ||
Component - (0:0,0 [38] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent | ||
ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes | ||
CSharpExpression - | ||
LazyIntermediateToken - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Selected | ||
ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes | ||
CSharpExpression - | ||
IntermediateToken - - CSharp - global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, | ||
IntermediateToken - - CSharp - __value => Selected = __value | ||
IntermediateToken - - CSharp - , Selected) | ||
ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - ValueExpression - AttributeStructure.DoubleQuotes | ||
CSharpExpression - | ||
IntermediateToken - - CSharp - () => Selected | ||
CSharpCode - (49:2,7 [64] x:\dir\subdir\Test\TestComponent.cshtml) | ||
LazyIntermediateToken - (49:2,7 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string[] Selected { get; set; } = Array.Empty<string>();\n | ||
NamespaceDeclaration - - __Blazor.Test.TestComponent | ||
ClassDeclaration - - internal static - TypeInference - - | ||
ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 |
9 changes: 9 additions & 0 deletions
9
...ests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/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,9 @@ | ||
Source Location: (49:2,7 [64] x:\dir\subdir\Test\TestComponent.cshtml) | ||
| | ||
string[] Selected { get; set; } = Array.Empty<string>(); | ||
| | ||
Generated Location: (1232:28,7 [64] ) | ||
| | ||
string[] Selected { get; set; } = Array.Empty<string>(); | ||
| | ||
|