Skip to content

Commit 1e9c0f0

Browse files
N. Taylor Mullenajaybhargavb
N. Taylor Mullen
authored andcommitted
Add Blazor partial class support in Visual Studio. (dotnet/razor#1182)
- No longer mark declaration files as single file generators. Prior to this we relied on SingleFileGenerators to dynamically update the declaration files when .razor files changed. However, to make partial classes work we can no longer depend on declaration files being available because their existence causes us to have to mangle class names for opened documents; otherwise you get two files with same name and result in ambiguous definition errors. - Stopped including declaration files as part of the users compilation. This was intended to make the design time experience operate more similar to how Blazor apps function at runtime (directly access each component instead of their declarations). We now rely on the background code generation effort built from the find all references work to supply users with strongly typed component names. - Stop mangling class names for Visual Studio. Razor.VSCode has its own set of configurations which i'm not addressing as part of this changeset. - Start generating components with the partial modifier to their class name to enable partial class support. - Updated existing tests to expect partial modifier. aspnet/AspNetCoredotnet/aspnetcore-tooling#5487\n\nCommit migrated from dotnet/razor@73858cd
1 parent 3dcc779 commit 1e9c0f0

File tree

998 files changed

+1220
-1237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

998 files changed

+1220
-1237
lines changed

src/Razor/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent_DesignTime.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace __GeneratedComponent
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
11+
public partial class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent_DesignTime.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (51:2,1 [17] ) - System.Linq
66
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
77
UsingDirective - (102:4,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
8+
ClassDeclaration - - public partial - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
99
DesignTimeDirective -
1010
DirectiveToken - (12:0,12 [11] BasicComponent.cshtml) - IDisposable
1111
CSharpCode -

src/Razor/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent_DesignTime.mappings.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
Source Location: (12:0,12 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
22
|IDisposable|
3-
Generated Location: (641:17,0 [11] )
3+
Generated Location: (649:17,0 [11] )
44
|IDisposable|
55

66
Source Location: (38:1,13 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
77
|this.ToString()|
8-
Generated Location: (1240:35,13 [15] )
8+
Generated Location: (1248:35,13 [15] )
99
|this.ToString()|
1010

1111
Source Location: (79:3,5 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
1212
|string.Format("{0}", "Hello")|
13-
Generated Location: (1437:43,6 [29] )
13+
Generated Location: (1445:43,6 [29] )
1414
|string.Format("{0}", "Hello")|
1515

1616
Source Location: (132:6,12 [37] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
1717
|
1818
void IDisposable.Dispose(){ }
1919
|
20-
Generated Location: (1689:52,12 [37] )
20+
Generated Location: (1697:52,12 [37] )
2121
|
2222
void IDisposable.Dispose(){ }
2323
|

src/Razor/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent_Runtime.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace __GeneratedComponent
99
using System.Linq;
1010
using System.Threading.Tasks;
1111
using Microsoft.AspNetCore.Components;
12-
public class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
12+
public partial class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
1313
{
1414
#pragma warning disable 1998
1515
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)

src/Razor/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent_Runtime.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (51:2,1 [19] ) - System.Linq
66
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
77
UsingDirective - (102:4,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
8+
ClassDeclaration - - public partial - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
99
MethodDeclaration - - protected override - void - BuildRenderTree
1010
MarkupElement - (25:1,0 [91] BasicComponent.cshtml) - div
1111
HtmlAttribute - (29:1,4 [25] BasicComponent.cshtml) - class=" - "

src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDocumentClassifierPass.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ protected override void OnDocumentStructureCreated(
8181
@class.ClassName = computedClass;
8282
@class.Modifiers.Clear();
8383
@class.Modifiers.Add("public");
84+
@class.Modifiers.Add("partial");
8485

8586
if (FileKinds.IsComponentImport(codeDocument.GetFileKind()))
8687
{

src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentDocumentClassifierPassTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void ComponentDocumentClassifierPass_SetsClass()
8585

8686
// Assert
8787
Assert.Equal($"{ComponentsApi.ComponentBase.FullTypeName}", visitor.Class.BaseType);
88-
Assert.Equal(new[] { "public", }, visitor.Class.Modifiers);
88+
Assert.Equal(new[] { "public", "partial" }, visitor.Class.Modifiers);
8989
Assert.Equal("Test", visitor.Class.ClassName);
9090
}
9191

src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace Test
121121
using System.Linq;
122122
using System.Threading.Tasks;
123123
using Microsoft.AspNetCore.Components;
124-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
124+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
125125
{
126126
#pragma warning disable 1998
127127
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Test
2121
#line default
2222
#line hidden
2323
#nullable disable
24-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
24+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
2525
{
2626
#pragma warning disable 219
2727
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Document -
66
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
77
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
88
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
9-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
9+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
1010
DesignTimeDirective -
1111
CSharpCode -
1212
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Generated Location: (436:18,0 [41] )
1010

1111
Source Location: (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml)
1212
|async (e) => await Task.Delay(10)|
13-
Generated Location: (1282:38,19 [33] )
13+
Generated Location: (1290:38,19 [33] )
1414
|async (e) => await Task.Delay(10)|
1515

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Test
2121
#line default
2222
#line hidden
2323
#nullable disable
24-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
24+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
2525
{
2626
#pragma warning disable 219
2727
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Document -
66
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
77
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
88
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
9-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
9+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
1010
DesignTimeDirective -
1111
CSharpCode -
1212
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Generated Location: (436:18,0 [41] )
1010

1111
Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
1212
|OnClick|
13-
Generated Location: (1280:38,17 [7] )
13+
Generated Location: (1288:38,17 [7] )
1414
|OnClick|
1515

1616
Source Location: (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
@@ -20,7 +20,7 @@ Source Location: (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
2020
return Task.CompletedTask;
2121
}
2222
|
23-
Generated Location: (1481:48,7 [89] )
23+
Generated Location: (1489:48,7 [89] )
2424
|
2525
Task OnClick(MouseEventArgs e)
2626
{

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Test
2121
#line default
2222
#line hidden
2323
#nullable disable
24-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
24+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
2525
{
2626
#pragma warning disable 219
2727
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Document -
66
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
77
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
88
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
9-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
9+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
1010
DesignTimeDirective -
1111
CSharpCode -
1212
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Generated Location: (436:18,0 [41] )
1010

1111
Source Location: (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml)
1212
|async () => await Task.Delay(10)|
13-
Generated Location: (1282:38,19 [32] )
13+
Generated Location: (1290:38,19 [32] )
1414
|async () => await Task.Delay(10)|
1515

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Test
2121
#line default
2222
#line hidden
2323
#nullable disable
24-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
24+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
2525
{
2626
#pragma warning disable 219
2727
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Document -
66
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
77
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
88
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
9-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
9+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
1010
DesignTimeDirective -
1111
CSharpCode -
1212
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Generated Location: (436:18,0 [41] )
1010

1111
Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
1212
|OnClick|
13-
Generated Location: (1280:38,17 [7] )
13+
Generated Location: (1288:38,17 [7] )
1414
|OnClick|
1515

1616
Source Location: (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
@@ -20,7 +20,7 @@ Source Location: (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
2020
return Task.CompletedTask;
2121
}
2222
|
23-
Generated Location: (1481:48,7 [73] )
23+
Generated Location: (1489:48,7 [73] )
2424
|
2525
Task OnClick()
2626
{

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Test
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
11+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (53:3,1 [17] ) - System.Linq
66
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
77
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
8+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
99
DesignTimeDirective -
1010
CSharpCode -
1111
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
22
|ParentValue|
3-
Generated Location: (978:25,26 [11] )
3+
Generated Location: (986:25,26 [11] )
44
|ParentValue|
55

66
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
77
|
88
public int ParentValue { get; set; } = 42;
99
|
10-
Generated Location: (2059:48,7 [50] )
10+
Generated Location: (2067:48,7 [50] )
1111
|
1212
public int ParentValue { get; set; } = 42;
1313
|

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Test
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
11+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (53:3,1 [17] ) - System.Linq
66
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
77
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
8+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
99
DesignTimeDirective -
1010
CSharpCode -
1111
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml)
22
|ParentValue|
3-
Generated Location: (969:25,30 [11] )
3+
Generated Location: (977:25,30 [11] )
44
|ParentValue|
55

66
Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml)
77
|
88
public DateTime ParentValue { get; set; } = DateTime.Now;
99
|
10-
Generated Location: (1579:43,7 [65] )
10+
Generated Location: (1587:43,7 [65] )
1111
|
1212
public DateTime ParentValue { get; set; } = DateTime.Now;
1313
|

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Test
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
11+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (53:3,1 [17] ) - System.Linq
66
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
77
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
8+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
99
DesignTimeDirective -
1010
CSharpCode -
1111
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
22
|ParentValue|
3-
Generated Location: (978:25,26 [11] )
3+
Generated Location: (986:25,26 [11] )
44
|ParentValue|
55

66
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
77
|
88
public int ParentValue { get; set; } = 42;
99
|
10-
Generated Location: (1883:47,7 [50] )
10+
Generated Location: (1891:47,7 [50] )
1111
|
1212
public int ParentValue { get; set; } = 42;
1313
|

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Test
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
11+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (53:3,1 [17] ) - System.Linq
66
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
77
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
8+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
99
DesignTimeDirective -
1010
CSharpCode -
1111
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
22
|ParentValue|
3-
Generated Location: (978:25,26 [11] )
3+
Generated Location: (986:25,26 [11] )
44
|ParentValue|
55

66
Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
77
|
88
public string ParentValue { get; set; } = "42";
99
|
10-
Generated Location: (1883:47,7 [55] )
10+
Generated Location: (1891:47,7 [55] )
1111
|
1212
public string ParentValue { get; set; } = "42";
1313
|

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Test
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
11+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Document -
55
UsingDirective - (53:3,1 [17] ) - System.Linq
66
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
77
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
8-
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
8+
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
99
DesignTimeDirective -
1010
CSharpCode -
1111
IntermediateToken - - CSharp - #pragma warning disable 0414

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
22
|ParentValue|
3-
Generated Location: (978:25,26 [11] )
3+
Generated Location: (986:25,26 [11] )
44
|ParentValue|
55

66
Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
77
|
88
public int ParentValue { get; set; } = 42;
99
|
10-
Generated Location: (1586:47,7 [50] )
10+
Generated Location: (1594:47,7 [50] )
1111
|
1212
public int ParentValue { get; set; } = 42;
1313
|

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Test
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Components;
11-
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
11+
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
1212
{
1313
#pragma warning disable 219
1414
private void __RazorDirectiveTokenHelpers__() {

0 commit comments

Comments
 (0)