diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs
index 486f821dbe..77bd6c9ed3 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs
@@ -83,6 +83,7 @@ namespace Test
// We're looking for VS crash issues. Meaning if the parser returns
// diagnostics we don't want to throw.
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@functions {
public string page { get; set; } = ""text"";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs
index 895e84e9c5..c10ecd7ccc 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs
@@ -1181,6 +1181,7 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
@@ -1210,6 +1211,7 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
@@ -1240,6 +1242,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
@@ -1258,6 +1261,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
@@ -1996,20 +2000,22 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
"));
// Act
var generated = CompileToCSharp(@"
-(this, Increment))""/>
+@using Microsoft.AspNetCore.Components.Web
+(this, Increment))""/>
@code {
private int counter;
@@ -2173,13 +2179,14 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
"));
@@ -2208,24 +2215,26 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
"));
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
}");
@@ -2243,13 +2252,14 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
"));
@@ -2279,24 +2289,26 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
"));
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
@@ -2315,24 +2327,26 @@ namespace Test
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
"));
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
}");
@@ -2398,7 +2412,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
- public Action OnClick { get; set; }
+ public Action OnClick { get; set; }
}
}
"));
@@ -2440,10 +2454,11 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
}");
// Assert
@@ -2465,7 +2480,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
- public Action OnClick { get; set; }
+ public Action OnClick { get; set; }
}
}
"));
@@ -2476,7 +2491,7 @@ namespace Test
@code {
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
}");
@@ -2494,6 +2509,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
");
// Assert
@@ -2509,6 +2525,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
{ }"" />");
// Assert
@@ -2524,6 +2541,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
{ }"" />");
// Assert
@@ -2539,6 +2557,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
void OnClick() {
@@ -2558,9 +2577,10 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
}");
@@ -2577,9 +2597,10 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
}");
@@ -2597,6 +2618,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
@using System.Threading.Tasks
+@using Microsoft.AspNetCore.Components.Web
@code {
Task OnClick()
@@ -2619,9 +2641,10 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
@using System.Threading.Tasks
+@using Microsoft.AspNetCore.Components.Web
@code {
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
@@ -2641,6 +2664,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
@using System.Threading.Tasks
+@using Microsoft.AspNetCore.Components.Web
await Task.Delay(10))"" />
");
@@ -2658,6 +2682,7 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
@using System.Threading.Tasks
+@using Microsoft.AspNetCore.Components.Web
await Task.Delay(10))"" />
");
@@ -2689,9 +2714,10 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
}");
@@ -2708,9 +2734,10 @@ namespace Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
}");
@@ -4551,6 +4578,7 @@ namespace New.Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
");
@@ -4591,6 +4619,7 @@ namespace New.Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@@ -4615,6 +4644,7 @@ namespace New.Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@@ -4638,6 +4668,7 @@ namespace New.Test
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
{}"">
@@ -5011,11 +5042,12 @@ Welcome to your new app.
// Act
var generated = CompileToCSharp(@"
+@using Microsoft.AspNetCore.Components.Web
@code {
public string ParentBgColor { get; set; } = ""#FFFFFF"";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs
index e9b8583cd4..b441a86f38 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs
@@ -156,7 +156,7 @@ namespace Test
public class BaseClass : IComponent
{
- public void Configure(RenderHandle renderHandle)
+ public void Attach(RenderHandle renderHandle)
{
}
@@ -164,7 +164,7 @@ namespace Test
{
}
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
throw new System.NotImplementedException();
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs
index 111cd7978e..b7e968f74a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs
@@ -126,12 +126,12 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
[Parameter]
public RenderFragment Body { get; set; }
- public void Configure(RenderHandle renderHandle)
+ public void Attach(RenderHandle renderHandle)
{
throw new NotImplementedException();
}
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
throw new NotImplementedException();
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
index 923f53aa34..dee5f78f1f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -26,9 +33,9 @@ using System.Threading.Tasks;
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
async (e) => await Task.Delay(10)
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt
index 544e34faff..0a5c9e6973 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -16,11 +17,13 @@ Document -
MethodDeclaration - - protected override - void - BuildRenderTree
HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (31:1,0 [57] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (75:2,0 [57] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (50:1,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10)
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10)
IntermediateToken - - CSharp - )
- HtmlContent - (88:1,57 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (88:1,57 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (132:2,57 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (132:2,57 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt
index b9c3ad0c68..9886669a0c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt
@@ -3,8 +3,13 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (285:11,0 [28] )
|using System.Threading.Tasks|
-Source Location: (50:1,19 [33] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (436:18,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml)
|async (e) => await Task.Delay(10)|
-Generated Location: (1116:31,19 [33] )
+Generated Location: (1282:38,19 [33] )
|async (e) => await Task.Delay(10)|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs
index 7cb838c658..bc969c8af6 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -26,9 +33,9 @@ using System.Threading.Tasks;
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -38,9 +45,9 @@ using System.Threading.Tasks;
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt
index d104d57b31..0417372324 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -16,13 +17,15 @@ Document -
MethodDeclaration - - protected override - void - BuildRenderTree
HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (75:2,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(UIMouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n
+ HtmlContent - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(MouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt
index 019d1a5033..1b311ffac3 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt
@@ -3,21 +3,26 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (285:11,0 [28] )
|using System.Threading.Tasks|
-Source Location: (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (436:18,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (1114:31,17 [7] )
+Generated Location: (1280:38,17 [7] )
|OnClick|
-Source Location: (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
|
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
|
-Generated Location: (1315:41,7 [91] )
+Generated Location: (1481:48,7 [89] )
|
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs
index 4f94884c3c..8d02e2b54c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -26,9 +33,9 @@ using System.Threading.Tasks;
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
async () => await Task.Delay(10)
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt
index f5666d5321..bb7807ad5f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -16,11 +17,13 @@ Document -
MethodDeclaration - - protected override - void - BuildRenderTree
HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (31:1,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (75:2,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (50:1,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10)
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10)
IntermediateToken - - CSharp - )
- HtmlContent - (87:1,56 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (87:1,56 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (131:2,56 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (131:2,56 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt
index 85bcb66ba4..f8399b23fe 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt
@@ -3,8 +3,13 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (285:11,0 [28] )
|using System.Threading.Tasks|
-Source Location: (50:1,19 [32] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (436:18,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml)
|async () => await Task.Delay(10)|
-Generated Location: (1116:31,19 [32] )
+Generated Location: (1282:38,19 [32] )
|async () => await Task.Delay(10)|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs
index 0497f44ac4..6193a76695 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -26,9 +33,9 @@ using System.Threading.Tasks;
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -38,7 +45,7 @@ using System.Threading.Tasks;
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
Task OnClick()
{
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt
index 531cbcd767..e2eabc9498 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -16,13 +17,15 @@ Document -
MethodDeclaration - - protected override - void - BuildRenderTree
HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (73:1,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (75:2,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n
+ HtmlContent - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt
index a5deb24ba1..03be8bfadf 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt
@@ -3,19 +3,24 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (285:11,0 [28] )
|using System.Threading.Tasks|
-Source Location: (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (436:18,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (1114:31,17 [7] )
+Generated Location: (1280:38,17 [7] )
|OnClick|
-Source Location: (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
|
Task OnClick()
{
return Task.CompletedTask;
}
|
-Generated Location: (1315:41,7 [73] )
+Generated Location: (1481:48,7 [73] )
|
Task OnClick()
{
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs
index afb7769b91..16eb333f1b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __o =
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Enabled
@@ -28,8 +28,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- );
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Enabled = __value, Enabled);
+ ;
}
#pragma warning restore 1998
#nullable restore
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt
index 05148553b7..1566cc4b13 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt
@@ -15,19 +15,12 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [16] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Html - checkbox
- HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - checked=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (22:0,22 [17] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (31:0,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Enabled
- IntermediateToken - - CSharp - )
- HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Enabled = __value,
- IntermediateToken - - CSharp - Enabled
- IntermediateToken - - CSharp - )
HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
CSharpCode - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml)
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt
index ca548a7cfe..8aa24d9f91 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt
@@ -1,13 +1,13 @@
Source Location: (31:0,31 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|Enabled|
-Generated Location: (953:25,31 [7] )
+Generated Location: (895:25,31 [7] )
|Enabled|
Source Location: (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml)
|
public bool Enabled { get; set; }
|
-Generated Location: (1286:36,7 [41] )
+Generated Location: (1095:35,7 [41] )
|
public bool Enabled { get; set; }
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs
index ebaa5698f5..f1402c510f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -22,7 +29,7 @@ namespace Test
{
__o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
#line default
@@ -33,7 +40,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt
index 9b157d9f6e..ad7a8b56eb 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,21 +15,23 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (58:1,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
+ IntermediateToken - (59:1,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
IntermediateToken - - CSharp - , format:
IntermediateToken - - CSharp - "MM/dd"
IntermediateToken - - CSharp - )
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
+ HtmlAttribute - (58:1,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
IntermediateToken - - CSharp - CurrentDate
IntermediateToken - - CSharp - , format: "MM/dd"
IntermediateToken - - CSharp - )
- HtmlContent - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (82:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (82:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
+ HtmlContent - (117:1,73 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (117:1,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt
index 34b78741d0..afd07bee75 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt
@@ -1,13 +1,18 @@
-Source Location: (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (59:1,15 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CurrentDate|
-Generated Location: (937:25,15 [11] )
+Generated Location: (1101:32,15 [11] )
|CurrentDate|
-Source Location: (82:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
-Generated Location: (1316:36,7 [77] )
+Generated Location: (1480:43,7 [77] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs
index 88df4b2931..2c81c2ab06 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __o =
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
@@ -28,7 +28,8 @@ namespace Test
#line default
#line hidden
#nullable disable
- , format:
+ ;
+ __o =
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Format
@@ -36,8 +37,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- );
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, format: Format);
+ ;
}
#pragma warning restore 1998
#nullable restore
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt
index 0b39357e3b..a36619c209 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt
@@ -15,22 +15,15 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [64] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [12] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (18:0,18 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format:
+ HtmlAttribute - (39:0,39 [23] x:\dir\subdir\Test\TestComponent.cshtml) - @bind:format=" - "
+ CSharpExpressionAttributeValue - (54:0,54 [7] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (55:0,55 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Format
- IntermediateToken - - CSharp - )
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
- IntermediateToken - - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format: Format
- IntermediateToken - - CSharp - )
HtmlContent - (64:0,64 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (64:0,64 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
CSharpCode - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml)
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt
index a90f46fda1..da2906c913 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
Source Location: (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CurrentDate|
-Generated Location: (949:25,27 [11] )
+Generated Location: (891:25,27 [11] )
|CurrentDate|
Source Location: (55:0,55 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Format|
-Generated Location: (1161:33,55 [6] )
+Generated Location: (1114:34,55 [6] )
|Format|
Source Location: (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml)
@@ -14,7 +14,7 @@ Source Location: (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml)
public string Format { get; set; } = "MM/dd/yyyy";
|
-Generated Location: (1517:44,7 [135] )
+Generated Location: (1313:44,7 [135] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs
index f71815f894..0a5479cea8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __o =
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
@@ -28,8 +28,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- , format: "MM/dd/yyyy");
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, format: "MM/dd/yyyy");
+ ;
}
#pragma warning restore 1998
#nullable restore
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt
index e00832392c..76cd88c845 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt
@@ -15,22 +15,15 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [67] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [12] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (18:0,18 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format:
- IntermediateToken - - CSharp - "MM/dd/yyyy"
- IntermediateToken - - CSharp - )
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
- IntermediateToken - - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format: "MM/dd/yyyy"
- IntermediateToken - - CSharp - )
+ HtmlAttribute - (39:0,39 [26] x:\dir\subdir\Test\TestComponent.cshtml) - @bind:format=" - "
+ HtmlAttributeValue - (54:0,54 [10] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (54:0,54 [10] x:\dir\subdir\Test\TestComponent.cshtml) - Html - MM/dd/yyyy
HtmlContent - (67:0,67 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (67:0,67 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
CSharpCode - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt
index 6e175bf68d..70ce319ca6 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt
@@ -1,13 +1,13 @@
Source Location: (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CurrentDate|
-Generated Location: (949:25,27 [11] )
+Generated Location: (891:25,27 [11] )
|CurrentDate|
Source Location: (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
-Generated Location: (1338:36,7 [77] )
+Generated Location: (1095:35,7 [77] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs
index 8bb172e78b..4bec837daf 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __o =
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
ParentValue
@@ -28,8 +28,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- );
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue);
+ ;
}
#pragma warning restore 1998
#nullable restore
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt
index c957b3db86..ed0c4bfc67 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt
@@ -15,19 +15,12 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [12] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (18:0,18 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
- IntermediateToken - - CSharp - )
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value,
- IntermediateToken - - CSharp - ParentValue
- IntermediateToken - - CSharp - )
HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
CSharpCode - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt
index 4eb477f456..8138e0a4d2 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt
@@ -1,13 +1,13 @@
Source Location: (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|ParentValue|
-Generated Location: (949:25,27 [11] )
+Generated Location: (891:25,27 [11] )
|ParentValue|
Source Location: (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
public int ParentValue { get; set; } = 42;
|
-Generated Location: (1294:36,7 [50] )
+Generated Location: (1095:35,7 [50] )
|
public int ParentValue { get; set; } = 42;
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs
index f883f7afd9..e88bce3b6e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -22,7 +29,7 @@ namespace Test
{
__o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
#line default
@@ -33,7 +40,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt
index 7093da7936..7d31616d54 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,21 +15,23 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [63] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (20:0,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [63] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (64:1,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
+ IntermediateToken - (65:1,21 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
IntermediateToken - - CSharp - , format:
IntermediateToken - - CSharp - "MM/dd"
IntermediateToken - - CSharp - )
- HtmlAttribute - (20:0,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
+ HtmlAttribute - (64:1,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
IntermediateToken - - CSharp - CurrentDate
IntermediateToken - - CSharp - , format: "MM/dd"
IntermediateToken - - CSharp - )
- HtmlContent - (63:0,63 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (63:0,63 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (72:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (72:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
+ HtmlContent - (107:1,63 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (107:1,63 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt
index 3bcfc76cdf..01aae5776f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt
@@ -1,13 +1,18 @@
-Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (65:1,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CurrentDate|
-Generated Location: (943:25,21 [11] )
+Generated Location: (1107:32,21 [11] )
|CurrentDate|
-Source Location: (72:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
-Generated Location: (1322:36,7 [77] )
+Generated Location: (1486:43,7 [77] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs
index a0f1f280f0..29c1053e5e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __o =
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
ParentValue
@@ -28,8 +28,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- );
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue);
+ ;
}
#pragma warning restore 1998
#nullable restore
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt
index 93c9467f1a..ad76db6807 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt
@@ -15,16 +15,9 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (6:0,6 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
- IntermediateToken - - CSharp - )
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value,
- IntermediateToken - - CSharp - ParentValue
- IntermediateToken - - CSharp - )
HtmlContent - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
CSharpCode - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt
index f6c8f0bf36..876a9ff033 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt
@@ -1,13 +1,13 @@
Source Location: (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|ParentValue|
-Generated Location: (937:25,15 [11] )
+Generated Location: (879:25,15 [11] )
|ParentValue|
Source Location: (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
public int ParentValue { get; set; } = 42;
|
-Generated Location: (1282:36,7 [50] )
+Generated Location: (1083:35,7 [50] )
|
public int ParentValue { get; set; } = 42;
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs
index b1dfdbee8f..ae88864dc8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = new System.Action(
+ __o = new System.Action(
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
@@ -45,7 +45,7 @@ __o = typeof(MyComponent);
#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt
index 6541f42012..fcae53e045 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt
@@ -20,5 +20,5 @@ Document -
IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
HtmlContent - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
- CSharpCode - (46:2,7 [100] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [100] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(UIEventArgs e) {\n counter++;\n }\n
+ CSharpCode - (46:2,7 [98] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (46:2,7 [98] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(EventArgs e) {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
index 12601265bb..b003737829 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
@@ -1,19 +1,19 @@
Source Location: (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Increment|
-Generated Location: (950:25,23 [9] )
+Generated Location: (923:25,23 [9] )
|Increment|
-Source Location: (46:2,7 [100] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (46:2,7 [98] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
|
-Generated Location: (1456:45,7 [100] )
+Generated Location: (1429:45,7 [98] )
|
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
index 30c2e33e4a..4978aae651 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = new System.Action(
+ __o = new System.Action(
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
e => { Increment(); }
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
index 1af432007d..b7c197ca34 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
@@ -1,6 +1,6 @@
Source Location: (24:0,24 [21] x:\dir\subdir\Test\TestComponent.cshtml)
|e => { Increment(); }|
-Generated Location: (951:25,24 [21] )
+Generated Location: (924:25,24 [21] )
|e => { Increment(); }|
Source Location: (60:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
@@ -10,7 +10,7 @@ Source Location: (60:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
counter++;
}
|
-Generated Location: (1469:45,7 [87] )
+Generated Location: (1442:45,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs
index f6933a3843..ed63574005 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -33,7 +40,7 @@ namespace Test
}
));
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
__o = typeof(DynamicElement);
#line default
@@ -42,9 +49,9 @@ __o = typeof(DynamicElement);
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
#line default
#line hidden
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt
index d7a54982db..2ff059cf3f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,13 +15,15 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [37] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement
- ComponentAttribute - (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ Component - (44:1,0 [37] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement
+ ComponentAttribute - (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes
CSharpExpression -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (37:0,37 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:0,37 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
- CSharpCode - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n
+ HtmlContent - (81:1,37 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:1,37 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
+ CSharpCode - (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt
index 72848bac9f..5cb8bc4a78 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt
@@ -1,14 +1,19 @@
-Source Location: (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (1007:25,26 [7] )
+Generated Location: (1173:32,26 [7] )
|OnClick|
-Source Location: (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml)
|
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
|
-Generated Location: (1514:45,7 [62] )
+Generated Location: (1680:52,7 [60] )
|
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs
index bcdaaceb08..8ea8d9783a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs
@@ -20,15 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
-#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
- () => Increment()
-
-#line default
-#line hidden
-#nullable disable
- );
+ __o = "";
__builder.AddAttribute(-1, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => {
}
));
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt
index 651d67138d..be32db415c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt
@@ -15,11 +15,9 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes
- CSharpExpression -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => Increment()
- IntermediateToken - - CSharp - )
+ ComponentAttribute - - @onclick - AttributeStructure.DoubleQuotes
+ HtmlContent - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml) - Html - () => Increment()
HtmlContent - (43:0,43 [4] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (43:0,43 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
CSharpCode - (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
index 4a28e67157..53f3c595e4 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
@@ -1,8 +1,3 @@
-Source Location: (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml)
-|() => Increment()|
-Generated Location: (1004:25,23 [17] )
-|() => Increment()|
-
Source Location: (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
@@ -10,7 +5,7 @@ Source Location: (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
counter++;
}
|
-Generated Location: (1518:45,7 [87] )
+Generated Location: (1226:37,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs
index cc9599e104..4917950d58 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -22,7 +29,7 @@ namespace Test
{
__o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
text
#line default
@@ -33,7 +40,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 5 "x:\dir\subdir\Test\TestComponent.cshtml"
private string text = "hi";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt
index 02b5d2763b..1a102a5457 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'Value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'Value' is used by the '@bind' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,3): Error RZ10008: The attribute 'Value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'Value' is used by the '@bind' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt
index e6acb85f74..2e45fac267 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,31 +15,33 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
HtmlAttribute - - type=" - "
- HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
+ HtmlAttributeValue - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
HtmlAttribute - - Value=" - "
- HtmlAttributeValue - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlAttributeValue - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
+ IntermediateToken - (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
IntermediateToken - - CSharp - )
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value,
IntermediateToken - - CSharp - text
IntermediateToken - - CSharp - )
- HtmlContent - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (69:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (69:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (119:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (119:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
+ HtmlContent - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (113:3,6 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (113:3,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (163:6,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (163:6,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt
index 7262a51e39..08e0539814 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt
@@ -1,13 +1,18 @@
-Source Location: (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|text|
-Generated Location: (962:25,40 [4] )
+Generated Location: (1126:32,40 [4] )
|text|
-Source Location: (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
|
private string text = "hi";
|
-Generated Location: (1291:36,12 [35] )
+Generated Location: (1455:43,12 [35] )
|
private string text = "hi";
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs
index e8d5d697b3..b9ce8a2d6e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
() => {}
#line default
@@ -31,7 +38,7 @@ namespace Test
);
__o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
text
#line default
@@ -42,7 +49,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 5 "x:\dir\subdir\Test\TestComponent.cshtml"
private string text = "hi";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt
index ed7f0b9a9c..7ce167ce3b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,80): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the '@bind-value' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,80): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the '@bind-value' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt
index c8b2872737..1ee533154c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,33 +15,35 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [112] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [95] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [112] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [95] x:\dir\subdir\Test\TestComponent.cshtml) - input
HtmlAttribute - - type=" - "
- HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (86:1,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
+ HtmlAttributeValue - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
+ HtmlAttribute - (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (86:1,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
IntermediateToken - - CSharp - )
- HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlAttribute - (85:2,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (42:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
+ IntermediateToken - (86:2,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
IntermediateToken - - CSharp - )
- HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
+ HtmlAttribute - (85:2,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value,
IntermediateToken - - CSharp - text
IntermediateToken - - CSharp - )
- HtmlContent - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (112:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (112:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (162:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (162:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
+ HtmlContent - (148:2,97 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (148:2,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (156:3,6 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (156:3,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (206:6,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (206:6,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt
index 7e3beb221b..90f5409f7a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt
@@ -1,18 +1,23 @@
-Source Location: (86:1,79 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|() => {}|
-Generated Location: (1061:25,79 [8] )
+Generated Location: (1223:32,79 [8] )
|() => {}|
-Source Location: (42:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (86:2,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|text|
-Generated Location: (1320:34,35 [4] )
+Generated Location: (1482:41,35 [4] )
|text|
-Source Location: (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
|
private string text = "hi";
|
-Generated Location: (1649:45,12 [35] )
+Generated Location: (1811:52,12 [35] )
|
private string text = "hi";
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs
index cc9599e104..4917950d58 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -22,7 +29,7 @@ namespace Test
{
__o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
text
#line default
@@ -33,7 +40,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 5 "x:\dir\subdir\Test\TestComponent.cshtml"
private string text = "hi";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt
index 87b660b463..360fcb1f95 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the '@bind' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the '@bind' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt
index 723920a879..09596c8cea 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,31 +15,33 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
HtmlAttribute - - type=" - "
- HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
+ HtmlAttributeValue - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
HtmlAttribute - - value=" - "
- HtmlAttributeValue - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlAttributeValue - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
+ IntermediateToken - (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
IntermediateToken - - CSharp - )
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value,
IntermediateToken - - CSharp - text
IntermediateToken - - CSharp - )
- HtmlContent - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (69:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (69:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (119:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (119:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
+ HtmlContent - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (113:3,6 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (113:3,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (163:6,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (163:6,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt
index 7262a51e39..08e0539814 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt
@@ -1,13 +1,18 @@
-Source Location: (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|text|
-Generated Location: (962:25,40 [4] )
+Generated Location: (1126:32,40 [4] )
|text|
-Source Location: (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
|
private string text = "hi";
|
-Generated Location: (1291:36,12 [35] )
+Generated Location: (1455:43,12 [35] )
|
private string text = "hi";
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs
index 5959396c75..b562fbe334 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
() => {}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt
index adbe7b6d1b..bbf80721b9 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the '@onclick' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,3): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the '@onclick' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt
index 657771dad7..4bd48b0978 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,19 +15,21 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [118] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [101] x:\dir\subdir\Test\TestComponent.cshtml) - a
- HtmlContent - (49:1,42 [57] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (49:1,42 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate!
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [118] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [101] x:\dir\subdir\Test\TestComponent.cshtml) - a
+ HtmlContent - (93:2,42 [57] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (93:2,42 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate!
HtmlAttribute - - onclick=" - "
- HtmlAttributeValue - (21:1,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (21:1,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - test()
- HtmlAttribute - (39:1,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlAttributeValue - (65:2,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (65:2,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - test()
+ HtmlAttribute - (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (39:1,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
IntermediateToken - - CSharp - )
- HtmlContent - (110:1,103 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (110:1,103 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (154:2,103 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (154:2,103 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt
index 6c41f0d357..eb4ba33b69 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt
@@ -1,5 +1,10 @@
-Source Location: (39:1,32 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|() => {}|
-Generated Location: (1013:25,32 [8] )
+Generated Location: (1179:32,32 [8] )
|() => {}|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs
index 613b9c90be..c652f866cb 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,10 +27,10 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
- EventCallback.Factory.Create(this, Increment)
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+ EventCallback.Factory.Create(this, Increment)
#line default
#line hidden
@@ -33,7 +40,7 @@ namespace Test
}
));
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
__o = typeof(MyComponent);
#line default
@@ -42,7 +49,7 @@ __o = typeof(MyComponent);
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt
index b5c8912a82..de66db16f7 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,11 +15,13 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [91] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [66] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [65] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (24:0,24 [63] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - EventCallback.Factory.Create(this, Increment)
- HtmlContent - (91:0,91 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (91:0,91 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
- CSharpCode - (102:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (102:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment() {\n counter++;\n }\n
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ Component - (44:1,0 [89] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [64] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [63] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (68:1,24 [61] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - EventCallback.Factory.Create(this, Increment)
+ HtmlContent - (133:1,89 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (133:1,89 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
+ CSharpCode - (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment() {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt
index f1bbda428f..b6cb825cb3 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt
@@ -1,16 +1,21 @@
-Source Location: (24:0,24 [63] x:\dir\subdir\Test\TestComponent.cshtml)
-|EventCallback.Factory.Create(this, Increment)|
-Generated Location: (1176:25,24 [63] )
-|EventCallback.Factory.Create(this, Increment)|
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
-Source Location: (102:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (68:1,24 [61] x:\dir\subdir\Test\TestComponent.cshtml)
+|EventCallback.Factory.Create(this, Increment)|
+Generated Location: (1344:32,24 [61] )
+|EventCallback.Factory.Create(this, Increment)|
+
+Source Location: (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
private void Increment() {
counter++;
}
|
-Generated Location: (1737:45,7 [87] )
+Generated Location: (1903:52,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs
index cb5bbaf9e8..5353f83ed0 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
index 6785ec354b..e3038b601c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
@@ -1,6 +1,6 @@
Source Location: (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Increment|
-Generated Location: (1175:25,23 [9] )
+Generated Location: (1179:25,23 [9] )
|Increment|
Source Location: (46:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
@@ -10,7 +10,7 @@ Source Location: (46:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
counter++;
}
|
-Generated Location: (1682:45,7 [87] )
+Generated Location: (1686:45,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs
index 1993bb3081..563d1df5ee 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
#line default
@@ -33,7 +40,7 @@ namespace Test
}
));
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
__o = typeof(MyComponent);
#line default
@@ -42,10 +49,10 @@ __o = typeof(MyComponent);
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt
index e53ed45aae..c379757ede 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,11 +15,13 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- HtmlContent - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
- CSharpCode - (46:2,7 [105] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [105] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(UIMouseEventArgs e) {\n counter++;\n }\n
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ Component - (44:1,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
+ HtmlContent - (79:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (79:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
+ CSharpCode - (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(MouseEventArgs e) {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt
index eeb8da148b..2a590e855a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt
@@ -1,19 +1,24 @@
-Source Location: (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Increment|
-Generated Location: (1175:25,23 [9] )
+Generated Location: (1343:32,23 [9] )
|Increment|
-Source Location: (46:2,7 [105] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
|
-Generated Location: (1682:45,7 [105] )
+Generated Location: (1850:52,7 [103] )
|
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs
index a8937ccdd8..5e157d0d73 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
#line default
@@ -33,7 +40,7 @@ namespace Test
}
));
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
__o = typeof(MyComponent);
#line default
@@ -42,10 +49,10 @@ __o = typeof(MyComponent);
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt
index cdbe950c2e..76cc892f7e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,11 +15,13 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- HtmlContent - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
- CSharpCode - (46:2,7 [141] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [141] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private Task Increment(UIMouseEventArgs e) {\n counter++;\n return Task.CompletedTask;\n }\n
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ Component - (44:1,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
+ HtmlContent - (79:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (79:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
+ CSharpCode - (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private Task Increment(MouseEventArgs e) {\n counter++;\n return Task.CompletedTask;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt
index 293a85f387..7c07f01dbd 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt
@@ -1,20 +1,25 @@
-Source Location: (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Increment|
-Generated Location: (1175:25,23 [9] )
+Generated Location: (1343:32,23 [9] )
|Increment|
-Source Location: (46:2,7 [141] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
|
-Generated Location: (1682:45,7 [141] )
+Generated Location: (1850:52,7 [139] )
|
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs
index e146803ca1..7ab0627213 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs
@@ -20,7 +20,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
index 1cf26fd915..080d884d11 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
@@ -1,6 +1,6 @@
Source Location: (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Increment|
-Generated Location: (1175:25,23 [9] )
+Generated Location: (1179:25,23 [9] )
|Increment|
Source Location: (46:2,7 [123] x:\dir\subdir\Test\TestComponent.cshtml)
@@ -11,7 +11,7 @@ Source Location: (46:2,7 [123] x:\dir\subdir\Test\TestComponent.cshtml)
return Task.CompletedTask;
}
|
-Generated Location: (1682:45,7 [123] )
+Generated Location: (1686:45,7 [123] )
|
private int counter;
private Task Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs
index 402b5e2577..735010701d 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
#line default
@@ -33,7 +40,7 @@ namespace Test
}
));
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
__o = typeof(MyComponent);
#line default
@@ -42,10 +49,10 @@ __o = typeof(MyComponent);
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt
index e90ef0ae9c..0b15039c86 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,11 +15,13 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- HtmlContent - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
- CSharpCode - (46:2,7 [106] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [106] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(UIChangeEventArgs e) {\n counter++;\n }\n
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ Component - (44:1,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
+ HtmlContent - (79:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (79:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
+ CSharpCode - (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(ChangeEventArgs e) {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt
index 6be3c367a3..88d9713f37 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt
@@ -1,19 +1,24 @@
-Source Location: (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Increment|
-Generated Location: (1175:25,23 [9] )
+Generated Location: (1343:32,23 [9] )
|Increment|
-Source Location: (46:2,7 [106] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
|
-Generated Location: (1682:45,7 [106] )
+Generated Location: (1850:52,7 [104] )
|
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs
index 42cde47e64..27e6eac9ef 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -23,9 +30,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt
index 94d094aba5..fbaff0b86a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,11 +15,13 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (6:0,6 [19] x:\dir\subdir\Test\TestComponent.cshtml) - @onCLICK=" - "
- HtmlAttributeValue - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - OnClick
- HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (50:1,6 [19] x:\dir\subdir\Test\TestComponent.cshtml) - @onCLICK=" - "
+ HtmlAttributeValue - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - OnClick
+ HtmlContent - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(MouseEventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt
index 42198cd134..01d1037d52 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt
@@ -1,11 +1,16 @@
-Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
-Generated Location: (900:26,7 [49] )
+Generated Location: (1064:33,7 [47] )
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs
index 5a369347e3..faf02f910b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -32,9 +39,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt
index 5e4c6c8261..edc13cae62 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,13 +15,15 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIEventArgs e) {\n }\n
+ HtmlContent - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(EventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt
index 004a4b3064..4f132ed602 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt
@@ -1,16 +1,21 @@
-Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (998:25,17 [7] )
+Generated Location: (1164:32,17 [7] )
|OnClick|
-Source Location: (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
|
-Generated Location: (1199:35,7 [44] )
+Generated Location: (1365:42,7 [42] )
|
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs
index df2ee06b5f..dc964e9b85 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -32,9 +39,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt
index e7f312ba86..0e1b27d1b9 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,13 +15,15 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n
+ HtmlContent - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(MouseEventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt
index 12c73d9850..49ef3dcaf6 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt
@@ -1,16 +1,21 @@
-Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (998:25,17 [7] )
+Generated Location: (1164:32,17 [7] )
|OnClick|
-Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
-Generated Location: (1199:35,7 [49] )
+Generated Location: (1365:42,7 [47] )
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs
index cacf184f71..fca5207019 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
x => { }
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt
index e1a6a47c3d..d619245f3d 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,9 +15,11 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { }
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { }
IntermediateToken - - CSharp - )
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt
index 0b0c2d59a7..2f3e5bc613 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt
@@ -1,5 +1,10 @@
-Source Location: (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|x => { }|
-Generated Location: (998:25,17 [8] )
+Generated Location: (1164:32,17 [8] )
|x => { }|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs
index df2ee06b5f..dc964e9b85 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -32,9 +39,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt
index e7f312ba86..0e1b27d1b9 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,13 +15,15 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n
+ HtmlContent - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(MouseEventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt
index 12c73d9850..49ef3dcaf6 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt
@@ -1,16 +1,21 @@
-Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (998:25,17 [7] )
+Generated Location: (1164:32,17 [7] )
|OnClick|
-Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
-Generated Location: (1199:35,7 [49] )
+Generated Location: (1365:42,7 [47] )
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs
index cacf184f71..cf7458ed0c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs
@@ -20,15 +20,6 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
-#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
- x => { }
-
-#line default
-#line hidden
-#nullable disable
- );
}
#pragma warning restore 1998
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt
index e1a6a47c3d..fec5cfbd8f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt
@@ -15,8 +15,12 @@ Document -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { }
- IntermediateToken - - CSharp - )
+ HtmlAttribute - (6:0,6 [20] x:\dir\subdir\Test\TestComponent.cshtml) - @onclick=" - "
+ HtmlAttributeValue - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - x
+ HtmlAttributeValue - (18:0,18 [3] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (19:0,19 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - =>
+ HtmlAttributeValue - (21:0,21 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (22:0,22 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - {
+ HtmlAttributeValue - (23:0,23 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (24:0,24 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - }
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt
deleted file mode 100644
index 0b0c2d59a7..0000000000
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Source Location: (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml)
-|x => { }|
-Generated Location: (998:25,17 [8] )
-|x => { }|
-
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs
index 09c791040d..3a696287ad 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -32,7 +39,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
void OnClick() {
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt
index 9fff4a39b7..b60c32ad09 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,13 +15,15 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n
+ HtmlContent - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (72:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt
index 6277f4b8b0..2af1a8b06e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt
@@ -1,14 +1,19 @@
-Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
-Generated Location: (998:25,17 [7] )
+Generated Location: (1164:32,17 [7] )
|OnClick|
-Source Location: (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
|
void OnClick() {
}
|
-Generated Location: (1199:35,7 [31] )
+Generated Location: (1365:42,7 [31] )
|
void OnClick() {
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs
index 0470de96c4..7a6d81473c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
() => { }
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt
index 234a1523df..f7262ee345 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,9 +15,11 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { }
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { }
IntermediateToken - - CSharp - )
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt
index e847cd4baf..52a10228c8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt
@@ -1,5 +1,10 @@
-Source Location: (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
-Generated Location: (998:25,17 [9] )
+Generated Location: (1164:32,17 [9] )
|() => { }|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs
index cf7458ed0c..df0c79a6cb 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt
index f32c4c6f73..5191583e87 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,7 +15,9 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [23] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (6:0,6 [14] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
- HtmlAttributeValue - (16:0,16 [3] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (16:0,16 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - foo
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [23] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (50:1,6 [14] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlAttributeValue - (60:1,16 [3] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (60:1,16 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - foo
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.mappings.txt
new file mode 100644
index 0000000000..7df0b6a556
--- /dev/null
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs
index 6d0d7b4270..2683f01037 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 219
@@ -20,9 +27,9 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnComponentHover
#line default
@@ -31,7 +38,7 @@ namespace Test
);
__o =
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
ParentBgColor
#line default
@@ -41,11 +48,11 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
public string ParentBgColor { get; set; } = "#FFFFFF";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt
index 041a016b22..50d3feedf1 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [17] ) - System.Linq
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
DesignTimeDirective -
CSharpCode -
@@ -14,22 +15,24 @@ Document -
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - p
- HtmlAttribute - (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - "
+ HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (44:1,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - p
+ HtmlAttribute - (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover
IntermediateToken - - CSharp - )
HtmlAttribute - - style=" - "
- HtmlAttributeValue - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background:
- CSharpExpressionAttributeValue - (53:0,53 [15] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor
- HtmlAttributeValue - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ;
- HtmlContent - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- HtmlContent - (215:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (215:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(UIMouseEventArgs e)\n {\n }\n
+ HtmlAttributeValue - (86:1,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (86:1,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background:
+ CSharpExpressionAttributeValue - (97:1,53 [15] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (99:1,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor
+ HtmlAttributeValue - (112:1,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (112:1,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ;
+ HtmlContent - (117:1,73 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (117:1,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (257:8,1 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (257:8,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(MouseEventArgs e)\n {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt
index a8eca1cffb..14fb1bf510 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt
@@ -1,26 +1,31 @@
-Source Location: (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [41] x:\dir\subdir\Test\TestComponent.cshtml)
+|using Microsoft.AspNetCore.Components.Web|
+Generated Location: (320:12,0 [41] )
+|using Microsoft.AspNetCore.Components.Web|
+
+Source Location: (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml)
|OnComponentHover|
-Generated Location: (998:25,17 [16] )
+Generated Location: (1164:32,17 [16] )
|OnComponentHover|
-Source Location: (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (99:1,55 [13] x:\dir\subdir\Test\TestComponent.cshtml)
|ParentBgColor|
-Generated Location: (1227:34,55 [13] )
+Generated Location: (1393:41,55 [13] )
|ParentBgColor|
-Source Location: (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml)
|
public string ParentBgColor { get; set; } = "#FFFFFF";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
|
-Generated Location: (1433:44,7 [132] )
+Generated Location: (1599:51,7 [130] )
|
public string ParentBgColor { get; set; } = "#FFFFFF";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
index ef6da3215c..cae7bb3d7f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -20,9 +27,9 @@ using System.Threading.Tasks;
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
async (e) => await Task.Delay(10)
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt
index 4e09b37aa8..5212899dfb 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (31:1,0 [57] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (75:2,0 [57] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (50:1,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10)
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10)
IntermediateToken - - CSharp - )
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs
index cbedf87f52..c28606eb3b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -20,9 +27,9 @@ using System.Threading.Tasks;
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -33,9 +40,9 @@ using System.Threading.Tasks;
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt
index 9506593db1..2f95161f9b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (75:2,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(UIMouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n
+ CSharpCode - (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(MouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt
index 7e21507a0f..4a18dbb4bc 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt
@@ -1,13 +1,13 @@
-Source Location: (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
|
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
|
-Generated Location: (1166:36,7 [91] )
+Generated Location: (1332:43,7 [89] )
|
- Task OnClick(UIMouseEventArgs e)
+ Task OnClick(MouseEventArgs e)
{
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs
index 78afedb132..6d7dd7383d 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -20,9 +27,9 @@ using System.Threading.Tasks;
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
async () => await Task.Delay(10)
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt
index 6bd28357c8..b624135b5a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (31:1,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (75:2,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (50:1,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10)
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10)
IntermediateToken - - CSharp - )
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs
index 6ae61c727e..44c19bd800 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs
@@ -11,6 +11,13 @@ namespace Test
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
using System.Threading.Tasks;
+#line default
+#line hidden
+#nullable disable
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
#line default
#line hidden
#nullable disable
@@ -20,9 +27,9 @@ using System.Threading.Tasks;
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -33,7 +40,7 @@ using System.Threading.Tasks;
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
Task OnClick()
{
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt
index ffc83adba1..a8fa8d0cef 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
+ UsingDirective - (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (75:2,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n
+ CSharpCode - (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt
index a41ae9f1a1..4a12aaef2c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
-Source Location: (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
|
Task OnClick()
{
return Task.CompletedTask;
}
|
-Generated Location: (1166:36,7 [73] )
+Generated Location: (1332:43,7 [73] )
|
Task OnClick()
{
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs
index 2541094ca1..ea0bccd577 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs
@@ -15,7 +15,7 @@ namespace Test
{
__builder.OpenElement(0, "input");
__builder.AddAttribute(1, "type", "checkbox");
- __builder.AddAttribute(2, "checked", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __builder.AddAttribute(2, "@bind",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Enabled
@@ -23,9 +23,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- ));
- __builder.AddAttribute(3, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Enabled = __value, Enabled));
- __builder.SetUpdatesAttributeName("checked");
+ );
__builder.CloseElement();
}
#pragma warning restore 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt
index 89234d1345..54ca46159a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt
@@ -8,18 +8,11 @@ Document -
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [16] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Html - checkbox
- HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - checked=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (22:0,22 [17] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (31:0,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Enabled
- IntermediateToken - - CSharp - )
- HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Enabled = __value,
- IntermediateToken - - CSharp - Enabled
- IntermediateToken - - CSharp - )
CSharpCode - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public bool Enabled { get; set; }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt
index 1222e91fab..6739e0a671 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt
@@ -2,7 +2,7 @@ Source Location: (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml)
|
public bool Enabled { get; set; }
|
-Generated Location: (1289:33,7 [41] )
+Generated Location: (1004:31,7 [41] )
|
public bool Enabled { get; set; }
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs
index f1a508dfba..18a5f2ac4e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -16,7 +23,7 @@ namespace Test
__builder.OpenElement(0, "input");
__builder.AddAttribute(1, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
#line default
@@ -29,7 +36,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt
index 1074182376..57708b0f47 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.ir.txt
@@ -5,21 +5,22 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ MarkupElement - (44:1,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (58:1,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
+ IntermediateToken - (59:1,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
IntermediateToken - - CSharp - , format:
IntermediateToken - - CSharp - "MM/dd"
IntermediateToken - - CSharp - )
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
+ HtmlAttribute - (58:1,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
IntermediateToken - - CSharp - CurrentDate
IntermediateToken - - CSharp - , format: "MM/dd"
IntermediateToken - - CSharp - )
- CSharpCode - (82:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (82:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
+ CSharpCode - (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt
index 45630affba..4365e3b700 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt
@@ -1,8 +1,8 @@
-Source Location: (82:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
-Generated Location: (1254:32,7 [77] )
+Generated Location: (1418:39,7 [77] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs
index e5001a53a8..a0830475fe 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs
@@ -15,7 +15,7 @@ namespace Test
{
__builder.OpenElement(0, "input");
__builder.AddAttribute(1, "type", "text");
- __builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __builder.AddAttribute(2, "@bind",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
@@ -23,7 +23,8 @@ namespace Test
#line default
#line hidden
#nullable disable
- , format:
+ );
+ __builder.AddAttribute(3, "@bind:format",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Format
@@ -31,9 +32,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- ));
- __builder.AddAttribute(3, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, format: Format));
- __builder.SetUpdatesAttributeName("value");
+ );
__builder.CloseElement();
}
#pragma warning restore 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt
index 2a4c0c7d9e..a3c058d33d 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt
@@ -8,21 +8,14 @@ Document -
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [64] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [12] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (18:0,18 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format:
+ HtmlAttribute - (39:0,39 [23] x:\dir\subdir\Test\TestComponent.cshtml) - @bind:format=" - "
+ CSharpExpressionAttributeValue - (54:0,54 [7] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (55:0,55 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Format
- IntermediateToken - - CSharp - )
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
- IntermediateToken - - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format: Format
- IntermediateToken - - CSharp - )
CSharpCode - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n\n public string Format { get; set; } = "MM/dd/yyyy";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt
index 7c238de261..7bd777765f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt
@@ -4,7 +4,7 @@ Source Location: (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml)
public string Format { get; set; } = "MM/dd/yyyy";
|
-Generated Location: (1512:41,7 [135] )
+Generated Location: (1255:40,7 [135] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs
index f5ca651db2..199b63b554 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs
@@ -15,7 +15,7 @@ namespace Test
{
__builder.OpenElement(0, "input");
__builder.AddAttribute(1, "type", "text");
- __builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __builder.AddAttribute(2, "@bind",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
@@ -23,9 +23,8 @@ namespace Test
#line default
#line hidden
#nullable disable
- , format: "MM/dd/yyyy"));
- __builder.AddAttribute(3, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, format: "MM/dd/yyyy"));
- __builder.SetUpdatesAttributeName("value");
+ );
+ __builder.AddAttribute(3, "@bind:format", "MM/dd/yyyy");
__builder.CloseElement();
}
#pragma warning restore 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt
index 10d2a58ffe..49c7895135 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt
@@ -8,21 +8,14 @@ Document -
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [67] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [12] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (18:0,18 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format:
- IntermediateToken - - CSharp - "MM/dd/yyyy"
- IntermediateToken - - CSharp - )
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
- IntermediateToken - - CSharp - CurrentDate
- IntermediateToken - - CSharp - , format: "MM/dd/yyyy"
- IntermediateToken - - CSharp - )
+ HtmlAttribute - (39:0,39 [26] x:\dir\subdir\Test\TestComponent.cshtml) - @bind:format=" - "
+ HtmlAttributeValue - (54:0,54 [10] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (54:0,54 [10] x:\dir\subdir\Test\TestComponent.cshtml) - Html - MM/dd/yyyy
CSharpCode - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt
index c9ee946efc..92e6044f5a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt
@@ -2,7 +2,7 @@ Source Location: (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
-Generated Location: (1333:33,7 [77] )
+Generated Location: (1070:32,7 [77] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs
index 6a8df83973..074bbe215b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs
@@ -15,7 +15,7 @@ namespace Test
{
__builder.OpenElement(0, "input");
__builder.AddAttribute(1, "type", "text");
- __builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __builder.AddAttribute(2, "@bind",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
ParentValue
@@ -23,9 +23,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- ));
- __builder.AddAttribute(3, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue));
- __builder.SetUpdatesAttributeName("value");
+ );
__builder.CloseElement();
}
#pragma warning restore 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt
index 28c6e60c01..d57debb71c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt
@@ -8,18 +8,11 @@ Document -
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - - type=" - "
+ HtmlAttribute - (6:0,6 [12] x:\dir\subdir\Test\TestComponent.cshtml) - type=" - "
HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (18:0,18 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
- IntermediateToken - - CSharp - )
- HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value,
- IntermediateToken - - CSharp - ParentValue
- IntermediateToken - - CSharp - )
CSharpCode - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt
index df9ef70cde..0225956d1b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt
@@ -2,7 +2,7 @@ Source Location: (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
public int ParentValue { get; set; } = 42;
|
-Generated Location: (1289:33,7 [50] )
+Generated Location: (1000:31,7 [50] )
|
public int ParentValue { get; set; } = 42;
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs
index 834b00f6c7..df95b116e7 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -16,7 +23,7 @@ namespace Test
__builder.OpenElement(0, "input");
__builder.AddAttribute(1, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
CurrentDate
#line default
@@ -29,7 +36,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt
index f38b81a9ce..e0f607d294 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.ir.txt
@@ -5,21 +5,22 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [63] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (20:0,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ MarkupElement - (44:1,0 [63] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (64:1,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
+ IntermediateToken - (65:1,21 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate
IntermediateToken - - CSharp - , format:
IntermediateToken - - CSharp - "MM/dd"
IntermediateToken - - CSharp - )
- HtmlAttribute - (20:0,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
+ HtmlAttribute - (64:1,20 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value,
IntermediateToken - - CSharp - CurrentDate
IntermediateToken - - CSharp - , format: "MM/dd"
IntermediateToken - - CSharp - )
- CSharpCode - (72:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (72:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
+ CSharpCode - (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt
index e621c140a2..dbcde9630c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt
@@ -1,8 +1,8 @@
-Source Location: (72:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
-Generated Location: (1261:32,7 [77] )
+Generated Location: (1425:39,7 [77] )
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs
index f33c8ef27c..cf6fd8e483 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs
@@ -14,7 +14,7 @@ namespace Test
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ __builder.AddAttribute(1, "@bind",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
ParentValue
@@ -22,9 +22,7 @@ namespace Test
#line default
#line hidden
#nullable disable
- ));
- __builder.AddAttribute(2, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue));
- __builder.SetUpdatesAttributeName("value");
+ );
__builder.CloseElement();
}
#pragma warning restore 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt
index 06c4759182..ba4dc458d2 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt
@@ -8,15 +8,8 @@ Document -
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupElement - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
+ HtmlAttribute - (6:0,6 [21] x:\dir\subdir\Test\TestComponent.cshtml) - @bind=" - "
+ CSharpExpressionAttributeValue - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) -
IntermediateToken - (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
- IntermediateToken - - CSharp - )
- HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value,
- IntermediateToken - - CSharp - ParentValue
- IntermediateToken - - CSharp - )
CSharpCode - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt
index 63481733de..1e47ca487c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt
@@ -2,7 +2,7 @@ Source Location: (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
public int ParentValue { get; set; } = 42;
|
-Generated Location: (1221:32,7 [50] )
+Generated Location: (932:30,7 [50] )
|
public int ParentValue { get; set; } = 42;
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs
index 60e82434d0..262067aae3 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs
@@ -14,7 +14,7 @@ namespace Test
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", new System.Action(
+ __builder.AddAttribute(1, "OnClick", new System.Action(
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
@@ -30,7 +30,7 @@ namespace Test
#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt
index fa48814866..53553b531f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt
@@ -11,5 +11,5 @@ Document -
ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- CSharpCode - (46:2,7 [100] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [100] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(UIEventArgs e) {\n counter++;\n }\n
+ CSharpCode - (46:2,7 [98] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (46:2,7 [98] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(EventArgs e) {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
index 347d2fd0a5..76cc1ff2ed 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
@@ -1,14 +1,14 @@
-Source Location: (46:2,7 [100] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (46:2,7 [98] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
|
-Generated Location: (1017:30,7 [100] )
+Generated Location: (990:30,7 [98] )
|
private int counter;
- private void Increment(UIEventArgs e) {
+ private void Increment(EventArgs e) {
counter++;
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
index 949fa9edd1..5a2d41b691 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs
@@ -14,7 +14,7 @@ namespace Test
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", new System.Action(
+ __builder.AddAttribute(1, "OnClick", new System.Action(
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
e => { Increment(); }
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
index 745b870673..1b3db951f6 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
@@ -5,7 +5,7 @@ Source Location: (60:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
counter++;
}
|
-Generated Location: (1030:30,7 [87] )
+Generated Location: (1003:30,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs
index 1cc2197614..4c71667162 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -27,9 +34,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
#line default
#line hidden
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt
index e432d4d02c..87601b15c2 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [37] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement
- ComponentAttribute - (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes
+ Component - (44:1,0 [37] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement
+ ComponentAttribute - (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes
CSharpExpression -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n
+ CSharpCode - (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt
index 5cd296bcf7..34ad66eeca 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt
@@ -1,9 +1,9 @@
-Source Location: (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml)
|
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
|
-Generated Location: (1075:30,7 [62] )
+Generated Location: (1241:37,7 [60] )
|
- private Action OnClick { get; set; }
+ private Action OnClick { get; set; }
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs
index 8bc122e22e..8632fa0885 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.codegen.cs
@@ -14,15 +14,7 @@ namespace Test
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
-#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
- () => Increment()
-
-#line default
-#line hidden
-#nullable disable
- ));
+ __builder.AddAttribute(1, "@onclick", "() => Increment()");
__builder.CloseComponent();
}
#pragma warning restore 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt
index b92548c14d..1c8f441484 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.ir.txt
@@ -8,10 +8,8 @@ Document -
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes
- CSharpExpression -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => Increment()
- IntermediateToken - - CSharp - )
+ ComponentAttribute - - @onclick - AttributeStructure.DoubleQuotes
+ HtmlContent - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (23:0,23 [17] x:\dir\subdir\Test\TestComponent.cshtml) - Html - () => Increment()
CSharpCode - (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
IntermediateToken - (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment() {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
index 15d2cfcd80..9fac1cac91 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
@@ -5,7 +5,7 @@ Source Location: (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
counter++;
}
|
-Generated Location: (1079:30,7 [87] )
+Generated Location: (805:22,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs
index 84e4c4e33a..7691ac3161 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -20,7 +27,7 @@ namespace Test
__builder.AddAttribute(4, "Value", "17");
__builder.AddAttribute(5, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
text
#line default
@@ -35,7 +42,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 5 "x:\dir\subdir\Test\TestComponent.cshtml"
private string text = "hi";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt
index 02b5d2763b..1a102a5457 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'Value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'Value' is used by the '@bind' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,3): Error RZ10008: The attribute 'Value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'Value' is used by the '@bind' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt
index e576ff6450..1783e5ad1b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.ir.txt
@@ -5,29 +5,30 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ MarkupElement - (44:1,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
HtmlAttribute - - type=" - "
- HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
+ HtmlAttributeValue - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
HtmlAttribute - - Value=" - "
- HtmlAttributeValue - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlAttributeValue - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
+ IntermediateToken - (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
IntermediateToken - - CSharp - )
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value,
IntermediateToken - - CSharp - text
IntermediateToken - - CSharp - )
- HtmlContent - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
+ HtmlContent - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt
index 1131d4aec6..ed71312a8a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt
@@ -1,8 +1,8 @@
-Source Location: (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
|
private string text = "hi";
|
-Generated Location: (1532:38,12 [35] )
+Generated Location: (1696:45,12 [35] )
|
private string text = "hi";
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs
index 0a08de4245..f98698a73e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -17,9 +24,9 @@ namespace Test
__builder.AddMarkupContent(1, "\r\n ");
__builder.OpenElement(2, "input");
__builder.AddAttribute(3, "type", "text");
- __builder.AddAttribute(4, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(4, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
() => {}
#line default
@@ -28,7 +35,7 @@ namespace Test
));
__builder.AddAttribute(5, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
text
#line default
@@ -43,7 +50,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 5 "x:\dir\subdir\Test\TestComponent.cshtml"
private string text = "hi";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt
index ed7f0b9a9c..7ce167ce3b 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,80): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the '@bind-value' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,80): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the '@bind-value' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt
index 5fabd9fb16..34a92ffb58 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt
@@ -5,31 +5,32 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [112] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [95] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ MarkupElement - (44:1,0 [112] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [95] x:\dir\subdir\Test\TestComponent.cshtml) - input
HtmlAttribute - - type=" - "
- HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
- HtmlAttribute - (86:1,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
+ HtmlAttributeValue - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
+ HtmlAttribute - (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (86:1,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
IntermediateToken - - CSharp - )
- HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlAttribute - (85:2,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (42:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
+ IntermediateToken - (86:2,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
IntermediateToken - - CSharp - )
- HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
+ HtmlAttribute - (85:2,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value,
IntermediateToken - - CSharp - text
IntermediateToken - - CSharp - )
- HtmlContent - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
+ HtmlContent - (148:2,97 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (148:2,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt
index 0da513786a..a530cf8a2f 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt
@@ -1,8 +1,8 @@
-Source Location: (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
|
private string text = "hi";
|
-Generated Location: (1866:46,12 [35] )
+Generated Location: (2028:53,12 [35] )
|
private string text = "hi";
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs
index b8c9293933..0aba3aeb2a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -20,7 +27,7 @@ namespace Test
__builder.AddAttribute(4, "value", "17");
__builder.AddAttribute(5, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
text
#line default
@@ -35,7 +42,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 5 "x:\dir\subdir\Test\TestComponent.cshtml"
private string text = "hi";
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt
index 87b660b463..360fcb1f95 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the '@bind' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the '@bind' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt
index aecb5d607d..2e1fc7edd2 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt
@@ -5,29 +5,30 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ MarkupElement - (44:1,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input
HtmlAttribute - - type=" - "
- HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
+ HtmlAttributeValue - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (66:2,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text
HtmlAttribute - - value=" - "
- HtmlAttributeValue - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
+ HtmlAttributeValue - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (79:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindConverter.FormatValue(
- IntermediateToken - (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
+ IntermediateToken - (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text
IntermediateToken - - CSharp - )
- HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
+ HtmlAttribute - (90:2,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - "
CSharpExpressionAttributeValue - -
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value,
IntermediateToken - - CSharp - text
IntermediateToken - - CSharp - )
- HtmlContent - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- CSharpCode - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
+ HtmlContent - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (105:2,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ CSharpCode - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt
index 1131d4aec6..ed71312a8a 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt
@@ -1,8 +1,8 @@
-Source Location: (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml)
|
private string text = "hi";
|
-Generated Location: (1532:38,12 [35] )
+Generated Location: (1696:45,12 [35] )
|
private string text = "hi";
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs
index 736e64d96a..871f214c17 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -17,9 +24,9 @@ namespace Test
__builder.AddMarkupContent(1, "\r\n ");
__builder.OpenElement(2, "a");
__builder.AddAttribute(3, "onclick", "test()");
- __builder.AddAttribute(4, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(4, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
() => {}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt
index adbe7b6d1b..bbf80721b9 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt
@@ -1 +1 @@
-x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the '@onclick' directive attribute.
+x:\dir\subdir\Test\TestComponent.cshtml(3,3): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the '@onclick' directive attribute.
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt
index 45ace5fb3a..e970d831de 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt
@@ -5,21 +5,22 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [118] x:\dir\subdir\Test\TestComponent.cshtml) - div
- HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
- MarkupElement - (9:1,2 [101] x:\dir\subdir\Test\TestComponent.cshtml) - a
- HtmlContent - (49:1,42 [57] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (49:1,42 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate!
+ MarkupElement - (44:1,0 [118] x:\dir\subdir\Test\TestComponent.cshtml) - div
+ HtmlContent - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (49:1,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ MarkupElement - (53:2,2 [101] x:\dir\subdir\Test\TestComponent.cshtml) - a
+ HtmlContent - (93:2,42 [57] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (93:2,42 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate!
HtmlAttribute - - onclick=" - "
- HtmlAttributeValue - (21:1,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (21:1,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - test()
- HtmlAttribute - (39:1,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ HtmlAttributeValue - (65:2,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (65:2,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - test()
+ HtmlAttribute - (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (39:1,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {}
IntermediateToken - - CSharp - )
- HtmlContent - (110:1,103 [2] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (110:1,103 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
+ HtmlContent - (154:2,103 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (154:2,103 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs
index aea4039807..d447b3ee04 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs
@@ -8,16 +8,23 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
- EventCallback.Factory.Create(this, Increment)
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+ EventCallback.Factory.Create(this, Increment)
#line default
#line hidden
@@ -27,7 +34,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt
index e1362a1622..f0d049c4f8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [91] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [66] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [65] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (24:0,24 [63] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - EventCallback.Factory.Create(this, Increment)
- CSharpCode - (102:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (102:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment() {\n counter++;\n }\n
+ Component - (44:1,0 [89] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [64] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [63] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (68:1,24 [61] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - EventCallback.Factory.Create(this, Increment)
+ CSharpCode - (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment() {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt
index 6a700f10c8..822be515cc 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
-Source Location: (102:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
private void Increment() {
counter++;
}
|
-Generated Location: (1298:30,7 [87] )
+Generated Location: (1464:37,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs
index a423dfa1b5..42651329f0 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs
@@ -14,7 +14,7 @@ namespace Test
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
index eaf562b672..f164a922a0 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
@@ -5,7 +5,7 @@ Source Location: (46:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
counter++;
}
|
-Generated Location: (1243:30,7 [87] )
+Generated Location: (1247:30,7 [87] )
|
private int counter;
private void Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs
index 3540fb6d95..2c62367bf9 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
#line default
@@ -27,10 +34,10 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt
index 16b93e72b8..5ad9c376ce 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- CSharpCode - (46:2,7 [105] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [105] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(UIMouseEventArgs e) {\n counter++;\n }\n
+ Component - (44:1,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
+ CSharpCode - (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(MouseEventArgs e) {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt
index 2a62756e27..bdbc4237e2 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt
@@ -1,14 +1,14 @@
-Source Location: (46:2,7 [105] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
|
-Generated Location: (1243:30,7 [105] )
+Generated Location: (1411:37,7 [103] )
|
private int counter;
- private void Increment(UIMouseEventArgs e) {
+ private void Increment(MouseEventArgs e) {
counter++;
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs
index 8d79605427..2843ecb025 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
#line default
@@ -27,10 +34,10 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt
index 99c95e6564..b0afa992ef 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- CSharpCode - (46:2,7 [141] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [141] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private Task Increment(UIMouseEventArgs e) {\n counter++;\n return Task.CompletedTask;\n }\n
+ Component - (44:1,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
+ CSharpCode - (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private Task Increment(MouseEventArgs e) {\n counter++;\n return Task.CompletedTask;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt
index 790b9be8a2..ee6caa7849 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt
@@ -1,15 +1,15 @@
-Source Location: (46:2,7 [141] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
|
-Generated Location: (1243:30,7 [141] )
+Generated Location: (1411:37,7 [139] )
|
private int counter;
- private Task Increment(UIMouseEventArgs e) {
+ private Task Increment(MouseEventArgs e) {
counter++;
return Task.CompletedTask;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs
index 4aeef8e446..fc735d5239 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs
@@ -14,7 +14,7 @@ namespace Test
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
index e1fb9986e6..4a9fe1a151 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
@@ -6,7 +6,7 @@ Source Location: (46:2,7 [123] x:\dir\subdir\Test\TestComponent.cshtml)
return Task.CompletedTask;
}
|
-Generated Location: (1243:30,7 [123] )
+Generated Location: (1247:30,7 [123] )
|
private int counter;
private Task Increment() {
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs
index ef79810505..71d147c025 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent(0);
- __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "OnClick", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck>(Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
Increment
#line default
@@ -27,10 +34,10 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 4 "x:\dir\subdir\Test\TestComponent.cshtml"
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt
index e453150540..d8aa7e8884 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
- ComponentAttribute - (22:0,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
- CSharpExpression - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (23:0,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
- CSharpCode - (46:2,7 [106] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (46:2,7 [106] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(UIChangeEventArgs e) {\n counter++;\n }\n
+ Component - (44:1,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
+ ComponentAttribute - (66:1,22 [10] x:\dir\subdir\Test\TestComponent.cshtml) - OnClick - AttributeStructure.DoubleQuotes
+ CSharpExpression - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Increment
+ CSharpCode - (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private int counter;\n private void Increment(ChangeEventArgs e) {\n counter++;\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt
index a8f670e7fc..4fbbc124ec 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt
@@ -1,14 +1,14 @@
-Source Location: (46:2,7 [106] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
|
-Generated Location: (1243:30,7 [106] )
+Generated Location: (1411:37,7 [104] )
|
private int counter;
- private void Increment(UIChangeEventArgs e) {
+ private void Increment(ChangeEventArgs e) {
counter++;
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs
index 5467376a30..8a2bc393a8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
@@ -17,9 +24,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt
index 33c36944db..e746f62e6e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.ir.txt
@@ -5,8 +5,9 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupBlock - -
- CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n
+ CSharpCode - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(MouseEventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt
index b7884360e6..5f82913831 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
-Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
-Generated Location: (708:20,7 [49] )
+Generated Location: (872:27,7 [47] )
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs
index cdf780c44a..467d90e842 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -27,9 +34,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt
index aed450fd43..11cc765bcb 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIEventArgs e) {\n }\n
+ CSharpCode - (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(EventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt
index 0596bca6c3..14cead9ce8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
-Source Location: (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
|
-Generated Location: (1050:30,7 [44] )
+Generated Location: (1216:37,7 [42] )
|
- void OnClick(UIEventArgs e) {
+ void OnClick(EventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs
index 90e9186fb7..7b486b43c4 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -27,9 +34,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt
index 9211a9e5a1..59ab34f294 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n
+ CSharpCode - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(MouseEventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt
index 704483c5c6..d9c7271f33 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
-Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
-Generated Location: (1050:30,7 [49] )
+Generated Location: (1216:37,7 [47] )
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs
index 2c665782af..becce32d67 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
x => { }
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt
index ee30388162..5a3e44bafc 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (44:1,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { }
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { }
IntermediateToken - - CSharp - )
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs
index 90e9186fb7..7b486b43c4 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -27,9 +34,9 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt
index 9211a9e5a1..59ab34f294 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n
+ CSharpCode - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(MouseEventArgs e) {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt
index 704483c5c6..d9c7271f33 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt
@@ -1,11 +1,11 @@
-Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml)
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
-Generated Location: (1050:30,7 [49] )
+Generated Location: (1216:37,7 [47] )
|
- void OnClick(UIMouseEventArgs e) {
+ void OnClick(MouseEventArgs e) {
}
|
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs
index 2c665782af..1c5c56c3ae 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs
@@ -13,17 +13,7 @@ namespace Test
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
- __builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
-#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
- x => { }
-
-#line default
-#line hidden
-#nullable disable
- ));
- __builder.CloseElement();
+ __builder.AddMarkupContent(0, " { }\">");
}
#pragma warning restore 1998
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt
index ee30388162..2a7da659fc 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt
@@ -7,9 +7,4 @@ Document -
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
- CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { }
- IntermediateToken - - CSharp - )
+ MarkupBlock - - { }">
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs
index a339aab373..696b79bd9c 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnClick
#line default
@@ -27,7 +34,7 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
void OnClick() {
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt
index 9cd8015de0..d59c47cb75 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt
@@ -5,13 +5,14 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (44:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick
IntermediateToken - - CSharp - )
- CSharpCode - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n
+ CSharpCode - (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt
index bae27b996d..4c8c812648 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt
@@ -1,9 +1,9 @@
-Source Location: (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml)
|
void OnClick() {
}
|
-Generated Location: (1050:30,7 [31] )
+Generated Location: (1216:37,7 [31] )
|
void OnClick() {
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs
index 9d3dc19487..fc44e9f1af 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "input");
- __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
() => { }
#line default
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt
index 857b8fbca4..cfddff9ca0 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt
@@ -5,11 +5,12 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input
- HtmlAttribute - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
+ MarkupElement - (44:1,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input
+ HtmlAttribute - (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { }
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { }
IntermediateToken - - CSharp - )
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs
index 93e723cf92..a33be57a79 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs
@@ -8,6 +8,13 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt
index 4b4f7fc2f1..70a0037442 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt
@@ -5,6 +5,7 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
MarkupBlock - -
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs
index 07f1e78773..4cd1eef10e 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs
@@ -8,15 +8,22 @@ namespace Test
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+using Microsoft.AspNetCore.Components.Web;
+
+#line default
+#line hidden
+#nullable disable
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
{
#pragma warning disable 1998
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenElement(0, "p");
- __builder.AddAttribute(1, "onmouseover", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ __builder.AddAttribute(1, "onmouseover", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
OnComponentHover
#line default
@@ -25,7 +32,7 @@ namespace Test
));
__builder.AddAttribute(2, "style", "background:" + " " + (
#nullable restore
-#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
ParentBgColor
#line default
@@ -36,11 +43,11 @@ namespace Test
}
#pragma warning restore 1998
#nullable restore
-#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
public string ParentBgColor { get; set; } = "#FFFFFF";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt
index e7ce186d9a..a6bf10b6f8 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt
@@ -5,20 +5,21 @@ Document -
UsingDirective - (53:3,1 [19] ) - System.Linq
UsingDirective - (73:4,1 [30] ) - System.Threading.Tasks
UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components
+ UsingDirective - (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
MethodDeclaration - - protected override - void - BuildRenderTree
- MarkupElement - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - p
- HtmlAttribute - (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - "
+ MarkupElement - (44:1,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - p
+ HtmlAttribute - (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - "
CSharpExpressionAttributeValue - -
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
- IntermediateToken - (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this,
+ IntermediateToken - (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover
IntermediateToken - - CSharp - )
HtmlAttribute - - style=" - "
- HtmlAttributeValue - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background:
- CSharpExpressionAttributeValue - (53:0,53 [15] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor
- HtmlAttributeValue - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) -
- IntermediateToken - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ;
- CSharpCode - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(UIMouseEventArgs e)\n {\n }\n
+ HtmlAttributeValue - (86:1,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (86:1,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background:
+ CSharpExpressionAttributeValue - (97:1,53 [15] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (99:1,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor
+ HtmlAttributeValue - (112:1,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) -
+ IntermediateToken - (112:1,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ;
+ CSharpCode - (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(MouseEventArgs e)\n {\n }\n
diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt
index 955dc1f6a6..f8582a7315 100644
--- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt
+++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt
@@ -1,16 +1,16 @@
-Source Location: (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml)
|
public string ParentBgColor { get; set; } = "#FFFFFF";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
|
-Generated Location: (1344:39,7 [132] )
+Generated Location: (1510:46,7 [130] )
|
public string ParentBgColor { get; set; } = "#FFFFFF";
- public void OnComponentHover(UIMouseEventArgs e)
+ public void OnComponentHover(MouseEventArgs e)
{
}
|
diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BaseTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BaseTagHelperDescriptorProviderTest.cs
index 117d9c0c34..bd19fc23cb 100644
--- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BaseTagHelperDescriptorProviderTest.cs
+++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BaseTagHelperDescriptorProviderTest.cs
@@ -31,13 +31,15 @@ namespace Microsoft.CodeAnalysis.Razor
// don't want to update the tests when that happens.
protected static TagHelperDescriptor[] ExcludeBuiltInComponents(TagHelperDescriptorProviderContext context)
{
- return context.Results
+ var results =
+ context.Results
+ .Where(c => c.AssemblyName != "Microsoft.AspNetCore.Razor.Test.ComponentShim")
+ .Where(c => !c.DisplayName.StartsWith("Microsoft.AspNetCore.Components.Web"))
.Where(c => c.GetTypeName() != "Microsoft.AspNetCore.Components.Bind")
- .Where(c => c.GetTypeName() != "Microsoft.AspNetCore.Components.BindAttributes")
- .Where(c => c.GetTypeName() != "Microsoft.AspNetCore.Components.EventHandlers")
- .Where(c => !c.GetTypeName().StartsWith("Microsoft.AspNetCore.Components.Routing"))
.OrderBy(c => c.Name)
.ToArray();
+
+ return results;
}
protected static TagHelperDescriptor[] AssertAndExcludeFullyQualifiedNameMatchComponents(
diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs
index 89b42a0ae3..f097b079f7 100644
--- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs
+++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs
@@ -24,9 +24,9 @@ namespace Test
{
public class MyComponent : IComponent
{
- public void Configure(RenderHandle renderHandle) { }
+ public void Attach(RenderHandle renderHandle) { }
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
return Task.CompletedTask;
}
@@ -149,9 +149,9 @@ namespace Test
{
public class MyComponent : IComponent
{
- public void Configure(RenderHandle renderHandle) { }
+ public void Attach(RenderHandle renderHandle) { }
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
return Task.CompletedTask;
}
@@ -271,9 +271,9 @@ namespace Test
{
public class MyComponent : IComponent
{
- public void Configure(RenderHandle renderHandle) { }
+ public void Attach(RenderHandle renderHandle) { }
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
return Task.CompletedTask;
}
@@ -523,7 +523,7 @@ using Microsoft.AspNetCore.Components;
namespace Test
{
- [BindInputElement(null, null, ""myprop"", ""myevent"")]
+ [BindInputElement(null, null, ""myprop"", ""myevent"", false, null)]
public class BindAttributes
{
}
@@ -579,7 +579,7 @@ using Microsoft.AspNetCore.Components;
namespace Test
{
- [BindInputElement(""checkbox"", null, ""myprop"", ""myevent"")]
+ [BindInputElement(""checkbox"", null, ""myprop"", ""myevent"", false, null)]
public class BindAttributes
{
}
@@ -647,7 +647,7 @@ using Microsoft.AspNetCore.Components;
namespace Test
{
- [BindInputElement(""checkbox"", ""somevalue"", ""myprop"", ""myevent"")]
+ [BindInputElement(""checkbox"", ""somevalue"", ""myprop"", ""myevent"", false, null)]
public class BindAttributes
{
}
diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/ComponentTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/ComponentTagHelperDescriptorProviderTest.cs
index 42461de24c..28d2986df6 100644
--- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/ComponentTagHelperDescriptorProviderTest.cs
+++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/ComponentTagHelperDescriptorProviderTest.cs
@@ -23,9 +23,9 @@ namespace Test
{
public class MyComponent : IComponent
{
- public void Configure(RenderHandle renderHandle) { }
+ public void Attach(RenderHandle renderHandle) { }
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
return Task.CompletedTask;
}
@@ -145,9 +145,9 @@ namespace Test
{
public class MyComponent : IComponent
{
- public void Configure(RenderHandle renderHandle) { }
+ public void Attach(RenderHandle renderHandle) { }
- public Task SetParametersAsync(ParameterCollection parameters)
+ public Task SetParametersAsync(ParameterView parameters)
{
return Task.CompletedTask;
}
@@ -578,7 +578,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
- public Action OnClick { get; set; }
+ public Action OnClick { get; set; }
}
}
@@ -604,7 +604,7 @@ namespace Test
var attribute = Assert.Single(component.BoundAttributes);
Assert.Equal("OnClick", attribute.Name);
- Assert.Equal("System.Action", attribute.TypeName);
+ Assert.Equal("System.Action", attribute.TypeName);
Assert.False(attribute.HasIndexer);
Assert.False(attribute.IsBooleanProperty);
@@ -733,6 +733,7 @@ namespace Test
// Arrange
var compilation = BaseCompilation.AddSyntaxTrees(Parse(@"
+using System;
using Microsoft.AspNetCore.Components;
namespace Test
@@ -740,7 +741,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
- public EventCallback OnClick { get; set; }
+ public EventCallback OnClick { get; set; }
}
}
@@ -769,7 +770,7 @@ namespace Test
a =>
{
Assert.Equal("OnClick", a.Name);
- Assert.Equal("Microsoft.AspNetCore.Components.EventCallback", a.TypeName);
+ Assert.Equal("Microsoft.AspNetCore.Components.EventCallback", a.TypeName);
Assert.False(a.HasIndexer);
Assert.False(a.IsBooleanProperty);
Assert.False(a.IsEnum);
diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs
index 673ad67050..f242f4995d 100644
--- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs
+++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs
@@ -18,10 +18,11 @@ namespace Microsoft.CodeAnalysis.Razor
var compilation = BaseCompilation.AddSyntaxTrees(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
namespace Test
{
- [EventHandler(""onclick"", typeof(Action))]
+ [EventHandler(""onclick"", typeof(Action))]
public class EventHandlers
{
}
@@ -61,7 +62,7 @@ namespace Test
Assert.Equal(
"Sets the '@onclick' attribute to the provided string or delegate value. " +
- "A delegate value should be of type 'System.Action'.",
+ "A delegate value should be of type 'System.Action'.",
item.Documentation);
// These are all trivially derived from the assembly/namespace/type name
@@ -107,15 +108,15 @@ namespace Test
Assert.Equal(
"Sets the '@onclick' attribute to the provided string or delegate value. " +
- "A delegate value should be of type 'System.Action'.",
+ "A delegate value should be of type 'System.Action'.",
attribute.Documentation);
Assert.Equal("@onclick", attribute.Name);
Assert.Equal("onclick", attribute.GetPropertyName());
- Assert.Equal("Microsoft.AspNetCore.Components.EventCallback> Test.EventHandlers.onclick", attribute.DisplayName);
+ Assert.Equal("Microsoft.AspNetCore.Components.EventCallback> Test.EventHandlers.onclick", attribute.DisplayName);
// Defined from the property type
- Assert.Equal("Microsoft.AspNetCore.Components.EventCallback>", attribute.TypeName);
+ Assert.Equal("Microsoft.AspNetCore.Components.EventCallback>", attribute.TypeName);
Assert.False(attribute.IsStringProperty);
Assert.False(attribute.IsBooleanProperty);
Assert.False(attribute.IsEnum);
diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs
new file mode 100644
index 0000000000..4674ff0fb4
--- /dev/null
+++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs
@@ -0,0 +1,75 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.AspNetCore.Components.Forms
+{
+ public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase
+ {
+ public DataAnnotationsValidator() { }
+ protected override void OnInitialized() { }
+ }
+ public sealed partial class EditContext
+ {
+ public EditContext(object model) { }
+ public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public event System.EventHandler OnFieldChanged { add { } remove { } }
+ public event System.EventHandler