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 OnValidationRequested { add { } remove { } } + public event System.EventHandler OnValidationStateChanged { add { } remove { } } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool IsModified() { throw null; } + public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public bool IsModified(System.Linq.Expressions.Expression> accessor) { throw null; } + public void MarkAsUnmodified() { } + public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyValidationStateChanged() { } + public bool Validate() { throw null; } + } + public static partial class EditContextDataAnnotationsExtensions + { + public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } + } + public sealed partial class FieldChangedEventArgs : System.EventArgs + { + public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FieldIdentifier : System.IEquatable + { + private readonly object _dummy; + public FieldIdentifier(object model, string fieldName) { throw null; } + public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + } + public sealed partial class ValidationMessageStore + { + public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } + public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } + public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } + public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } + public void Add(System.Linq.Expressions.Expression> accessor, string message) { } + public void Clear() { } + public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void Clear(System.Linq.Expressions.Expression> accessor) { } + } + public sealed partial class ValidationRequestedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; + public ValidationRequestedEventArgs() { } + } + public sealed partial class ValidationStateChangedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; + public ValidationStateChangedEventArgs() { } + } +} diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs new file mode 100644 index 0000000000..191e398a7c --- /dev/null +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs @@ -0,0 +1,420 @@ +// 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 +{ + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class BindInputElementAttribute : System.Attribute + { + public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute, bool isInvariantCulture, string format) { } + public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Format { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool IsInvariantCulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } +} +namespace Microsoft.AspNetCore.Components.Forms +{ + public static partial class EditContextFieldClassExtensions + { + public static string FieldCssClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public static string FieldCssClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } + } + public partial class EditForm : Microsoft.AspNetCore.Components.ComponentBase + { + public EditForm() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnInvalidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnValidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override void OnParametersSet() { } + } + public abstract partial class InputBase : Microsoft.AspNetCore.Components.ComponentBase + { + protected InputBase() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected string CssClass { get { throw null; } } + protected TValue CurrentValue { get { throw null; } set { } } + protected string CurrentValueAsString { get { throw null; } set { } } + protected Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback ValueChanged { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Linq.Expressions.Expression> ValueExpression { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected virtual string FormatValueAsString(TValue value) { throw null; } + public override System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + protected abstract bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage); + } + public partial class InputCheckbox : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputCheckbox() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out bool result, out string validationErrorMessage) { throw null; } + } + public partial class InputDate : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputDate() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override string FormatValueAsString(TValue value) { throw null; } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) { throw null; } + } + public partial class InputNumber : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputNumber() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override string FormatValueAsString(TValue value) { throw null; } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) { throw null; } + } + public partial class InputSelect : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputSelect() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) { throw null; } + } + public partial class InputText : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputText() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } + } + public partial class InputTextArea : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputTextArea() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } + } + public partial class ValidationMessage : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public ValidationMessage() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Linq.Expressions.Expression> For { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected virtual void Dispose(bool disposing) { } + protected override void OnParametersSet() { } + void System.IDisposable.Dispose() { } + } + public partial class ValidationSummary : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public ValidationSummary() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected virtual void Dispose(bool disposing) { } + protected override void OnParametersSet() { } + void System.IDisposable.Dispose() { } + } +} +namespace Microsoft.AspNetCore.Components.RenderTree +{ + public sealed partial class WebEventDescriptor + { + public WebEventDescriptor() { } + public int BrowserRendererId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo EventFieldInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public ulong EventHandlerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } +} +namespace Microsoft.AspNetCore.Components.Routing +{ + public partial class NavLink : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public NavLink() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ActiveClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected string CssClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + public void Dispose() { } + protected override void OnInitialized() { } + protected override void OnParametersSet() { } + } + public enum NavLinkMatch + { + Prefix = 0, + All = 1, + } +} +namespace Microsoft.AspNetCore.Components.Web +{ + [Microsoft.AspNetCore.Components.BindElementAttribute("select", null, "value", "onchange")] + [Microsoft.AspNetCore.Components.BindElementAttribute("textarea", null, "value", "onchange")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("checkbox", null, "checked", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("date", "value", "value", "onchange", true, "yyyy-MM-dd")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("date", null, "value", "onchange", true, "yyyy-MM-dd")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("number", "value", "value", "onchange", true, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("number", null, "value", "onchange", true, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("text", null, "value", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, "value", "value", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, null, "value", "onchange", false, null)] + public static partial class BindAttributes + { + } + public partial class ClipboardEventArgs : System.EventArgs + { + public ClipboardEventArgs() { } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class DataTransfer + { + public DataTransfer() { } + public string DropEffect { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EffectAllowed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string[] Files { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.Web.DataTransferItem[] Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string[] Types { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class DataTransferItem + { + public DataTransferItem() { } + public string Kind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class DragEventArgs : Microsoft.AspNetCore.Components.Web.MouseEventArgs + { + public DragEventArgs() { } + public Microsoft.AspNetCore.Components.Web.DataTransfer DataTransfer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class ErrorEventArgs : System.EventArgs + { + public ErrorEventArgs() { } + public int Colno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Filename { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int Lineno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Message { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onabort", typeof(Microsoft.AspNetCore.Components.Web.ProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforeactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecopy", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecut", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforedeactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforepaste", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onblur", typeof(Microsoft.AspNetCore.Components.Web.FocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplay", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplaythrough", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onchange", typeof(Microsoft.AspNetCore.Components.ChangeEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onclick", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncontextmenu", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncopy", typeof(Microsoft.AspNetCore.Components.Web.ClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncuechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncut", typeof(Microsoft.AspNetCore.Components.Web.ClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondblclick", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondeactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrag", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragend", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragenter", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragleave", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragover", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragstart", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrop", typeof(Microsoft.AspNetCore.Components.Web.DragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondurationchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onemptied", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onended", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onerror", typeof(Microsoft.AspNetCore.Components.Web.ErrorEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocus", typeof(Microsoft.AspNetCore.Components.Web.FocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusin", typeof(Microsoft.AspNetCore.Components.Web.FocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusout", typeof(Microsoft.AspNetCore.Components.Web.FocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenerror", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ongotpointercapture", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninput", typeof(Microsoft.AspNetCore.Components.ChangeEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninvalid", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeydown", typeof(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeypress", typeof(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeyup", typeof(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onload", typeof(Microsoft.AspNetCore.Components.Web.ProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadeddata", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadedmetadata", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadend", typeof(Microsoft.AspNetCore.Components.Web.ProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadstart", typeof(Microsoft.AspNetCore.Components.Web.ProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onlostpointercapture", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousedown", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousemove", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseout", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseover", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseup", typeof(Microsoft.AspNetCore.Components.Web.MouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousewheel", typeof(Microsoft.AspNetCore.Components.Web.WheelEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpaste", typeof(Microsoft.AspNetCore.Components.Web.ClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpause", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplay", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplaying", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointercancel", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerdown", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerenter", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerleave", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockerror", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointermove", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerout", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerover", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerup", typeof(Microsoft.AspNetCore.Components.Web.PointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onprogress", typeof(Microsoft.AspNetCore.Components.Web.ProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onratechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreadystatechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreset", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onscroll", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeked", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeking", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselect", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectionchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectstart", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstalled", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstop", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsubmit", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsuspend", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeout", typeof(Microsoft.AspNetCore.Components.Web.ProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeupdate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchcancel", typeof(Microsoft.AspNetCore.Components.Web.TouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchend", typeof(Microsoft.AspNetCore.Components.Web.TouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchenter", typeof(Microsoft.AspNetCore.Components.Web.TouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchleave", typeof(Microsoft.AspNetCore.Components.Web.TouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchmove", typeof(Microsoft.AspNetCore.Components.Web.TouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchstart", typeof(Microsoft.AspNetCore.Components.Web.TouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onvolumechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwaiting", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwheel", typeof(Microsoft.AspNetCore.Components.Web.WheelEventArgs))] + public static partial class EventHandlers + { + } + public partial class FocusEventArgs : System.EventArgs + { + public FocusEventArgs() { } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class KeyboardEventArgs : System.EventArgs + { + public KeyboardEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Code { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool Repeat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class MouseEventArgs : System.EventArgs + { + public MouseEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Button { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Buttons { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class PointerEventArgs : Microsoft.AspNetCore.Components.Web.MouseEventArgs + { + public PointerEventArgs() { } + public float Height { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool IsPrimary { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long PointerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string PointerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Pressure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float TiltX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float TiltY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Width { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class ProgressEventArgs : System.EventArgs + { + public ProgressEventArgs() { } + public bool LengthComputable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Loaded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Total { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class TouchEventArgs : System.EventArgs + { + public TouchEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.Web.TouchPoint[] ChangedTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.Web.TouchPoint[] TargetTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.Web.TouchPoint[] Touches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class TouchPoint + { + public TouchPoint() { } + public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double PageX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double PageY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public static partial class WebEventCallbackFactoryEventArgsExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + } + public partial class WheelEventArgs : Microsoft.AspNetCore.Components.Web.MouseEventArgs + { + public WheelEventArgs() { } + public long DeltaMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaZ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } +} diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs index a2763ad286..ed14f101cd 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs @@ -45,39 +45,3 @@ namespace Microsoft.AspNetCore.Components.RenderTree public override string ToString() { throw null; } } } - -namespace Microsoft.AspNetCore.Components.Routing -{ - public partial class NavLink : Microsoft.AspNetCore.Components.IComponent, System.IDisposable - { - public NavLink() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string ActiveClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } } - [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues = true)] - public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get; private set; } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public RenderFragment ChildContent { get; set; } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } } - public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } - public void Dispose() { } - public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } - } - - public partial class Router : Microsoft.AspNetCore.Components.IComponent, System.IDisposable - { - public Router() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotFoundContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } } - public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } - public void Dispose() { } - protected virtual void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder, System.Type handler, System.Collections.Generic.IDictionary parameters) { } - public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } - } -} diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.cs index d772cf7e2d..93b30fbf50 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.ComponentShim/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -3,28 +3,6 @@ namespace Microsoft.AspNetCore.Components { - public partial class AuthenticationState - { - public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { } - public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); - public abstract partial class AuthenticationStateProvider - { - protected AuthenticationStateProvider() { } - public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } } - public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); - protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } - } - [Microsoft.AspNetCore.Components.BindElementAttribute("select", null, "value", "onchange")] - [Microsoft.AspNetCore.Components.BindElementAttribute("textarea", null, "value", "onchange")] - [Microsoft.AspNetCore.Components.BindInputElementAttribute("checkbox", null, "checked", "onchange")] - [Microsoft.AspNetCore.Components.BindInputElementAttribute("text", null, "value", "onchange")] - [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, "value", "value", "onchange")] - [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, null, "value", "onchange")] - public static partial class BindAttributes - { - } public static partial class BindConverter { public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; } @@ -81,55 +59,54 @@ namespace Microsoft.AspNetCore.Components public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] - public sealed partial class BindInputElementAttribute : System.Attribute - { - public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute) { } - public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute, bool isInvariantCulture, string format) { } - public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool IsInvariantCulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Format { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class CascadingParameterAttribute : System.Attribute { public CascadingParameterAttribute() { } public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } + public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent + { + public CascadingValue() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + } + public partial class ChangeEventArgs : System.EventArgs + { + public ChangeEventArgs() { } + public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent { public ComponentBase() { } protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } protected System.Threading.Tasks.Task InvokeAsync(System.Action workItem) { throw null; } protected System.Threading.Tasks.Task InvokeAsync(System.Func workItem) { throw null; } - void Microsoft.AspNetCore.Components.IComponent.Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; } System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; } - protected virtual void OnAfterRender() { } - protected virtual System.Threading.Tasks.Task OnAfterRenderAsync() { throw null; } + protected virtual void OnAfterRender(bool firstRender) { } + protected virtual System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) { throw null; } protected virtual void OnInitialized() { } protected virtual System.Threading.Tasks.Task OnInitializedAsync() { throw null; } protected virtual void OnParametersSet() { } protected virtual System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } - public virtual System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } + public virtual System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } protected virtual bool ShouldRender() { throw null; } protected void StateHasChanged() { } } - public partial class DataTransfer - { - public DataTransfer() { } - public string DropEffect { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string EffectAllowed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string[] Files { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UIDataTransferItem[] Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string[] Types { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } public abstract partial class Dispatcher { protected Dispatcher() { } + public void AssertAccess() { } public abstract bool CheckAccess(); public static Microsoft.AspNetCore.Components.Dispatcher CreateDefault() { throw null; } public abstract System.Threading.Tasks.Task InvokeAsync(System.Action workItem); @@ -142,8 +119,8 @@ namespace Microsoft.AspNetCore.Components public readonly partial struct ElementReference { private readonly object _dummy; - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public string __internalId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public ElementReference(string id) { throw null; } + public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventCallback @@ -165,69 +142,49 @@ namespace Microsoft.AspNetCore.Components public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Action callback, T value) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Action callback, TValue value) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Func callback, T value) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Func callback, TValue value) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } - public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } - public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } - public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } - public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } } public static partial class EventCallbackFactoryBinderExtensions { - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo culture = null) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo culture = null) { throw null; } } - public static partial class EventCallbackFactoryUIEventArgsExtensions + public static partial class EventCallbackFactoryEventArgsExtensions { - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventCallbackWorkItem @@ -238,13 +195,13 @@ namespace Microsoft.AspNetCore.Components public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EventCallback + public readonly partial struct EventCallback { private readonly object _dummy; - public static readonly Microsoft.AspNetCore.Components.EventCallback Empty; + public static readonly Microsoft.AspNetCore.Components.EventCallback Empty; public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; } public bool HasDelegate { get { throw null; } } - public System.Threading.Tasks.Task InvokeAsync(T arg) { throw null; } + public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; } } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] public sealed partial class EventHandlerAttribute : System.Attribute @@ -253,108 +210,10 @@ namespace Microsoft.AspNetCore.Components public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onabort", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecopy", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecut", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforedeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforepaste", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onblur", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplay", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplaythrough", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onchange", typeof(Microsoft.AspNetCore.Components.UIChangeEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncontextmenu", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncopy", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncuechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncut", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondblclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrag", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragend", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragenter", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragleave", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragover", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragstart", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrop", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondurationchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onemptied", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onended", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onerror", typeof(Microsoft.AspNetCore.Components.UIErrorEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocus", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusin", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusout", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenerror", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ongotpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninput", typeof(Microsoft.AspNetCore.Components.UIChangeEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninvalid", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeydown", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeypress", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeyup", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onload", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadeddata", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadedmetadata", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadend", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadstart", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onlostpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousedown", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousemove", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseout", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseover", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseup", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousewheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpaste", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpause", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplay", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplaying", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointercancel", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerdown", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerenter", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerleave", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockerror", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointermove", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerout", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerover", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerup", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onprogress", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onratechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreadystatechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreset", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onscroll", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeked", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeking", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselect", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectionchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectstart", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstalled", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstop", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsubmit", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsuspend", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeout", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeupdate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchcancel", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchend", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchenter", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchleave", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchmove", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchstart", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onvolumechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwaiting", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] - public static partial class EventHandlers - { - } public partial interface IComponent { - void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle); - System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters); - } - public partial interface IComponentContext - { - bool IsConnected { get; } + void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle); + System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters); } public partial interface IHandleAfterRender { @@ -369,16 +228,6 @@ namespace Microsoft.AspNetCore.Components { public InjectAttribute() { } } - public partial interface IUriHelper - { - event System.EventHandler OnLocationChanged; - string GetAbsoluteUri(); - string GetBaseUri(); - void NavigateTo(string uri); - void NavigateTo(string uri, bool forceLoad); - System.Uri ToAbsoluteUri(string href); - string ToBaseRelativePath(string baseUri, string locationAbsolute); - } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)] public sealed partial class LayoutAttribute : System.Attribute { @@ -389,7 +238,21 @@ namespace Microsoft.AspNetCore.Components { protected LayoutComponentBase() { } [Microsoft.AspNetCore.Components.ParameterAttribute] - protected Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class LayoutView : Microsoft.AspNetCore.Components.IComponent + { + public LayoutView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Type Layout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + } + public sealed partial class LocationChangeException : System.Exception + { + public LocationChangeException(string message, System.Exception innerException) { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarkupString @@ -405,14 +268,32 @@ namespace Microsoft.AspNetCore.Components public NavigationException(string uri) { } public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Parameter + public abstract partial class NavigationManager { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected NavigationManager() { } + public string BaseUri { get { throw null; } protected set { } } + public string Uri { get { throw null; } protected set { } } + public event System.EventHandler LocationChanged { add { } remove { } } + protected virtual void EnsureInitialized() { } + protected void Initialize(string baseUri, string uri) { } + public void NavigateTo(string uri, bool forceLoad = false) { } + protected abstract void NavigateToCore(string uri, bool forceLoad); + protected void NotifyLocationChanged(bool isInterceptedLink) { } + public System.Uri ToAbsoluteUri(string relativeUri) { throw null; } + public string ToBaseRelativePath(string uri) { throw null; } + } + public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + protected OwningComponentBase() { } + protected bool IsDisposed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected System.IServiceProvider ScopedServices { get { throw null; } } + protected virtual void Dispose(bool disposing) { } + void System.IDisposable.Dispose() { } + } + public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable + { + protected OwningComponentBase() { } + protected TService Service { get { throw null; } } } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class ParameterAttribute : System.Attribute @@ -421,32 +302,38 @@ namespace Microsoft.AspNetCore.Components public bool CaptureUnmatchedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ParameterCollection + public readonly partial struct ParameterValue { private readonly object _dummy; private readonly int _dummyPrimitive; - public static Microsoft.AspNetCore.Components.ParameterCollection Empty { get { throw null; } } - public static Microsoft.AspNetCore.Components.ParameterCollection FromDictionary(System.Collections.Generic.IDictionary parameters) { throw null; } - public Microsoft.AspNetCore.Components.ParameterEnumerator GetEnumerator() { throw null; } - public T GetValueOrDefault(string parameterName) { throw null; } - public T GetValueOrDefault(string parameterName, T defaultValue) { throw null; } - public System.Collections.Generic.IReadOnlyDictionary ToDictionary() { throw null; } - public bool TryGetValue(string parameterName, out T result) { throw null; } - } - public static partial class ParameterCollectionExtensions - { - public static void SetParameterProperties(this in Microsoft.AspNetCore.Components.ParameterCollection parameterCollection, object target) { } + public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct ParameterEnumerator + public readonly partial struct ParameterView { - private object _dummy; - private int _dummyPrimitive; - public Microsoft.AspNetCore.Components.Parameter Current { get { throw null; } } - public bool MoveNext() { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public static Microsoft.AspNetCore.Components.ParameterView Empty { get { throw null; } } + public static Microsoft.AspNetCore.Components.ParameterView FromDictionary(System.Collections.Generic.IDictionary parameters) { throw null; } + public Microsoft.AspNetCore.Components.ParameterView.Enumerator GetEnumerator() { throw null; } + public TValue GetValueOrDefault(string parameterName) { throw null; } + public TValue GetValueOrDefault(string parameterName, TValue defaultValue) { throw null; } + public void SetParameterProperties(object target) { } + public System.Collections.Generic.IReadOnlyDictionary ToDictionary() { throw null; } + public bool TryGetValue(string parameterName, out TValue result) { throw null; } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct Enumerator + { + private object _dummy; + private int _dummyPrimitive; + public Microsoft.AspNetCore.Components.ParameterValue Current { get { throw null; } } + public bool MoveNext() { throw null; } + } } public delegate void RenderFragment(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder); - public delegate Microsoft.AspNetCore.Components.RenderFragment RenderFragment(T value); + public delegate Microsoft.AspNetCore.Components.RenderFragment RenderFragment(TValue value); [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RenderHandle { @@ -462,137 +349,22 @@ namespace Microsoft.AspNetCore.Components public RouteAttribute(string template) { } public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - public partial class UIChangeEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + public sealed partial class RouteData { - public UIChangeEventArgs() { } - public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public RouteData(System.Type pageType, System.Collections.Generic.IReadOnlyDictionary routeValues) { } + public System.Type PageType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary RouteValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - public partial class UIClipboardEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + public partial class RouteView : Microsoft.AspNetCore.Components.IComponent { - public UIClipboardEventArgs() { } - } - public partial class UIDataTransferItem - { - public UIDataTransferItem() { } - public string Kind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIDragEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs - { - public UIDragEventArgs() { } - public Microsoft.AspNetCore.Components.DataTransfer DataTransfer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIErrorEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIErrorEventArgs() { } - public int Colno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Filename { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int Lineno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Message { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIEventArgs - { - public static readonly Microsoft.AspNetCore.Components.UIEventArgs Empty; - public UIEventArgs() { } - public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIFocusEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIFocusEventArgs() { } - } - public partial class UIKeyboardEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIKeyboardEventArgs() { } - public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Code { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Repeat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIMouseEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIMouseEventArgs() { } - public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Button { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Buttons { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIPointerEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs - { - public UIPointerEventArgs() { } - public float Height { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool IsPrimary { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long PointerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string PointerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float Pressure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float TiltX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float TiltY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float Width { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIProgressEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIProgressEventArgs() { } - public bool LengthComputable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Loaded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Total { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UITouchEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UITouchEventArgs() { } - public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UITouchPoint[] ChangedTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UITouchPoint[] TargetTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UITouchPoint[] Touches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UITouchPoint - { - public UITouchPoint() { } - public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double PageX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double PageY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIWheelEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs - { - public UIWheelEventArgs() { } - public long DeltaMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double DeltaX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double DeltaY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double DeltaZ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public abstract partial class UriHelperBase : Microsoft.AspNetCore.Components.IUriHelper - { - protected UriHelperBase() { } - public event System.EventHandler OnLocationChanged { add { } remove { } } - protected virtual void EnsureInitialized() { } - public string GetAbsoluteUri() { throw null; } - public virtual string GetBaseUri() { throw null; } - public virtual void InitializeState(string uriAbsolute, string baseUriAbsolute) { } - public void NavigateTo(string uri) { } - public void NavigateTo(string uri, bool forceLoad) { } - protected abstract void NavigateToCore(string uri, bool forceLoad); - protected void SetAbsoluteBaseUri(string baseUri) { } - protected void SetAbsoluteUri(string uri) { } - public System.Uri ToAbsoluteUri(string href) { throw null; } - public string ToBaseRelativePath(string baseUri, string locationAbsolute) { throw null; } - protected void TriggerOnLocationChanged(bool isinterceptedLink) { } + public RouteView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Type DefaultLayout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RouteData RouteData { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + protected virtual void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } } } namespace Microsoft.AspNetCore.Components.CompilerServices @@ -604,79 +376,39 @@ namespace Microsoft.AspNetCore.Components.CompilerServices public static T TypeCheck(T value) { throw null; } } } -namespace Microsoft.AspNetCore.Components.Forms +namespace Microsoft.AspNetCore.Components.Rendering { - public sealed partial class EditContext + public sealed partial class RenderTreeBuilder : System.IDisposable { - 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 OnValidationRequested { add { } remove { } } - public event System.EventHandler OnValidationStateChanged { add { } remove { } } - public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public bool IsModified() { throw null; } - public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public void MarkAsUnmodified() { } - public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void NotifyValidationStateChanged() { } - public bool Validate() { throw null; } - } - public static partial class EditContextDataAnnotationsExtensions - { - public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } - } - public static partial class EditContextExpressionExtensions - { - public static System.Collections.Generic.IEnumerable GetValidationMessages(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } - public static bool IsModified(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } - } - public static partial class EditContextFieldClassExtensions - { - public static string FieldClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public static string FieldClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } - } - public sealed partial class FieldChangedEventArgs - { - internal FieldChangedEventArgs() { } - public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FieldIdentifier - { - private readonly object _dummy; - public FieldIdentifier(object model, string fieldName) { throw null; } - public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - } - public sealed partial class ValidationMessageStore - { - public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } - public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } - public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } - public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } - public void AddRange(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } + public RenderTreeBuilder() { } + public void AddAttribute(int sequence, in Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame frame) { } + public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) { } + public void AddAttribute(int sequence, string name, bool value) { } + public void AddAttribute(int sequence, string name, System.MulticastDelegate value) { } + public void AddAttribute(int sequence, string name, object value) { } + public void AddAttribute(int sequence, string name, string value) { } + public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) { } + public void AddComponentReferenceCapture(int sequence, System.Action componentReferenceCaptureAction) { } + public void AddContent(int sequence, Microsoft.AspNetCore.Components.MarkupString markupContent) { } + public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment) { } + public void AddContent(int sequence, object textContent) { } + public void AddContent(int sequence, string textContent) { } + public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment, TValue value) { } + public void AddElementReferenceCapture(int sequence, System.Action elementReferenceCaptureAction) { } + public void AddMarkupContent(int sequence, string markupContent) { } + public void AddMultipleAttributes(int sequence, System.Collections.Generic.IEnumerable> attributes) { } public void Clear() { } - public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - } - public static partial class ValidationMessageStoreExpressionExtensions - { - public static void Add(this Microsoft.AspNetCore.Components.Forms.ValidationMessageStore store, System.Linq.Expressions.Expression> accessor, string message) { } - public static void AddRange(this Microsoft.AspNetCore.Components.Forms.ValidationMessageStore store, System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } - public static void Clear(this Microsoft.AspNetCore.Components.Forms.ValidationMessageStore store, System.Linq.Expressions.Expression> accessor) { } - } - public sealed partial class ValidationRequestedEventArgs - { - internal ValidationRequestedEventArgs() { } - } - public sealed partial class ValidationStateChangedEventArgs - { - internal ValidationStateChangedEventArgs() { } + public void CloseComponent() { } + public void CloseElement() { } + public void CloseRegion() { } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetFrames() { throw null; } + public void OpenComponent(int sequence, System.Type componentType) { } + public void OpenComponent(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent { } + public void OpenElement(int sequence, string elementName) { } + public void OpenRegion(int sequence) { } + public void SetKey(object value) { } + public void SetUpdatesAttributeName(string updatesAttributeName) { } + void System.IDisposable.Dispose() { } } } namespace Microsoft.AspNetCore.Components.RenderTree @@ -701,7 +433,21 @@ namespace Microsoft.AspNetCore.Components.RenderTree public ArrayRange(T[] array, int count) { throw null; } public Microsoft.AspNetCore.Components.RenderTree.ArrayRange Clone() { throw null; } } - + public partial class EventFieldInfo + { + public EventFieldInfo() { } + public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RenderBatch + { + private readonly object _dummy; + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RenderTreeDiff { @@ -735,71 +481,49 @@ namespace Microsoft.AspNetCore.Components.RenderTree PermutationListEntry = 9, PermutationListEnd = 10, } - public enum RenderTreeFrameType + public enum RenderTreeFrameType : short { - None = 0, - Element = 1, - Text = 2, - Attribute = 3, - Component = 4, - Region = 5, - ElementReferenceCapture = 6, - ComponentReferenceCapture = 7, - Markup = 8, - } -} -namespace Microsoft.AspNetCore.Components.Rendering -{ - public partial class RenderTreeBuilder - { - public const string ChildContent = "ChildContent"; - public void AddAttribute(int sequence, in Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame frame) { } - public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) { } - public void AddAttribute(int sequence, string name, System.Action value) { } - public void AddAttribute(int sequence, string name, bool value) { } - public void AddAttribute(int sequence, string name, System.Func value) { } - public void AddAttribute(int sequence, string name, System.MulticastDelegate value) { } - public void AddAttribute(int sequence, string name, object value) { } - public void AddAttribute(int sequence, string name, string value) { } - public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) { } - public void AddComponentReferenceCapture(int sequence, System.Action componentReferenceCaptureAction) { } - public void AddContent(int sequence, Microsoft.AspNetCore.Components.MarkupString markupContent) { } - public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment) { } - public void AddContent(int sequence, object textContent) { } - public void AddContent(int sequence, string textContent) { } - public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment, T value) { } - public void AddElementReferenceCapture(int sequence, System.Action elementReferenceCaptureAction) { } - public void AddMarkupContent(int sequence, string markupContent) { } - public void AddMultipleAttributes(int sequence, System.Collections.Generic.IEnumerable> attributes) { } - public void Clear() { } - public void CloseComponent() { } - public void CloseElement() { } - public Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetFrames() { throw null; } - public void OpenComponent(int sequence, System.Type componentType) { } - public void OpenComponent(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent { } - public void OpenElement(int sequence, string elementName) { } - public void SetKey(object value) { } - public void SetUpdatesAttributeName(string updatesAttributeName) { } + None = (short)0, + Element = (short)1, + Text = (short)2, + Attribute = (short)3, + Component = (short)4, + Region = (short)5, + ElementReferenceCapture = (short)6, + ComponentReferenceCapture = (short)7, + Markup = (short)8, } } namespace Microsoft.AspNetCore.Components.Routing { + public partial interface IHostEnvironmentNavigationManager + { + void Initialize(string baseUri, string uri); + } public partial interface INavigationInterception { System.Threading.Tasks.Task EnableNavigationInterceptionAsync(); } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LocationChangedEventArgs + public partial class LocationChangedEventArgs : System.EventArgs { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LocationChangedEventArgs(string location, bool isNavigationIntercepted) { throw null; } + public LocationChangedEventArgs(string location, bool isNavigationIntercepted) { } public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - public enum NavLinkMatch + public partial class Router : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable { - Prefix = 0, - All = 1, + public Router() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Collections.Generic.IEnumerable AdditionalAssemblies { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Found { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + public void Dispose() { } + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } } } diff --git a/src/Razor/test/testassets/ComponentApp/Components/Pages/Counter.razor b/src/Razor/test/testassets/ComponentApp/Components/Pages/Counter.razor index e7244066a2..3e757725b6 100644 --- a/src/Razor/test/testassets/ComponentApp/Components/Pages/Counter.razor +++ b/src/Razor/test/testassets/ComponentApp/Components/Pages/Counter.razor @@ -4,7 +4,7 @@

Current count: @currentCount

- + @functions { int currentCount = 0; diff --git a/src/Razor/test/testassets/ComponentApp/Components/Shared/NavMenu.razor b/src/Razor/test/testassets/ComponentApp/Components/Shared/NavMenu.razor index 8269b96b25..a05cec10f0 100644 --- a/src/Razor/test/testassets/ComponentApp/Components/Shared/NavMenu.razor +++ b/src/Razor/test/testassets/ComponentApp/Components/Shared/NavMenu.razor @@ -1,11 +1,11 @@ -
+