Skip to content

Commit 7ed667a

Browse files
authored
Support enhanced line pragmas in CSHTML (#34191)
* Support enhanced line pragmas in CSHTML * Write enhanced line pragma for attribute values
1 parent bc6355d commit 7ed667a

File tree

56 files changed

+274
-258
lines changed

Some content is hidden

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

56 files changed

+274
-258
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : gl
2323
WriteLiteral("<div");
2424
EndContext();
2525
BeginWriteAttribute("class", " class=\"", 4, "\"", 28, 1);
26-
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
26+
#line (1,13)-(1,29) 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
2727
WriteAttributeValue("", 12, this.ToString(), 12, 16, false);
2828

2929
#line default
@@ -33,7 +33,7 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : gl
3333
WriteLiteral(">\r\n Hello world\r\n ");
3434
EndContext();
3535
BeginContext(54, 29, false);
36-
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
36+
#line (3,6)-(3,35) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
3737
Write(string.Format("{0}", "Hello"));
3838

3939
#line default
@@ -60,8 +60,8 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : gl
6060
#line default
6161
#line hidden
6262
BeginContext(153, 3, false);
63-
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
64-
Write(cls);
63+
#line (8,31)-(8,34) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
64+
Write(cls);
6565

6666
#line default
6767
#line hidden

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages
3535
WriteLiteral("\r\n<h1>New Customer ");
3636
EndContext();
3737
BeginContext(213, 10, false);
38-
#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml"
39-
Write(Model.Name);
38+
#line (13,19)-(13,29) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml"
39+
Write(Model.Name);
4040

4141
#line default
4242
#line hidden

src/Razor/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest.codegen.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class TestFiles_IntegrationTests_InstrumentationPassIntegrationTest_Basic
5151
EndContext();
5252
BeginContext(61, 7, false);
5353
BeginContext(61, 7, false);
54-
#line 3 "TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest.cshtml"
54+
#line (3,3)-(3,10) 6 "TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest.cshtml"
5555
Write("Hello");
5656

5757
#line default
@@ -127,7 +127,7 @@ public class TestFiles_IntegrationTests_InstrumentationPassIntegrationTest_Basic
127127
EndContext();
128128
BeginContext(217, 29, false);
129129
BeginContext(217, 29, false);
130-
#line 9 "TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest.cshtml"
130+
#line (9,2)-(9,6) 6 "TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest.cshtml"
131131
Write(Foo(item => new global::Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_template_writer) => {
132132
PushWriter(__razor_template_writer);
133133
BeginContext(222, 24, true);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : gl
2121
WriteLiteral("<div");
2222
BeginWriteAttribute("class", " class=\"", 4, "\"", 28, 1);
2323
#nullable restore
24-
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
24+
#line (1,13)-(1,29) 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
2525
WriteAttributeValue("", 12, this.ToString(), 12, 16, false);
2626

2727
#line default
@@ -30,7 +30,7 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : gl
3030
EndWriteAttribute();
3131
WriteLiteral(">\r\n Hello world\r\n ");
3232
#nullable restore
33-
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
33+
#line (3,6)-(3,35) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
3434
Write(string.Format("{0}", "Hello"));
3535

3636
#line default
@@ -57,8 +57,8 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : gl
5757
#line hidden
5858
#nullable disable
5959
#nullable restore
60-
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
61-
Write(cls);
60+
#line (8,31)-(8,34) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
61+
Write(cls);
6262

6363
#line default
6464
#line hidden

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages
3030
WriteLiteral("\r\n");
3131
WriteLiteral("\r\n<h1>New Customer ");
3232
#nullable restore
33-
#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml"
34-
Write(Model.Name);
33+
#line (13,19)-(13,29) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml"
34+
Write(Model.Name);
3535

3636
#line default
3737
#line hidden

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_test : glo
2020
{
2121
WriteLiteral("\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n <title>");
2222
#nullable restore
23-
#line 7 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml"
24-
Write(ViewData["Title"]);
23+
#line (7,13)-(7,30) 6 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml"
24+
Write(ViewData["Title"]);
2525

2626
#line default
2727
#line hidden

src/Razor/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/RuntimeNodeWriter.cs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ public override void WriteCSharpExpression(CodeRenderingContext context, CSharpE
5858
IDisposable linePragmaScope = null;
5959
if (node.Source != null)
6060
{
61-
linePragmaScope = context.CodeWriter.BuildLinePragma(node.Source.Value, context);
62-
context.CodeWriter.WritePadding(WriteCSharpExpressionMethod.Length + 1, node.Source, context);
61+
linePragmaScope = context.CodeWriter.BuildEnhancedLinePragma(node.Source.Value, context, WriteCSharpExpressionMethod.Length + 1);
62+
if (!context.Options.UseEnhancedLinePragma)
63+
{
64+
context.CodeWriter.WritePadding(WriteCSharpExpressionMethod.Length + 1, node.Source, context);
65+
}
6366
}
6467

6568
context.CodeWriter.WriteStartMethodInvocation(WriteCSharpExpressionMethod);
@@ -200,14 +203,27 @@ public override void WriteHtmlAttributeValue(CodeRenderingContext context, HtmlA
200203

201204
public override void WriteCSharpExpressionAttributeValue(CodeRenderingContext context, CSharpExpressionAttributeValueIntermediateNode node)
202205
{
203-
using (context.CodeWriter.BuildLinePragma(node.Source.Value, context))
206+
var prefixLocation = node.Source.Value.AbsoluteIndex.ToString(CultureInfo.InvariantCulture);
207+
var methodInvocationParenLength = 1;
208+
var stringLiteralQuoteLength = 2;
209+
var parameterSepLength = 2;
210+
// Offset accounts for the length of the method, its arguments, and any
211+
// additional characters like open parens and quoted strings
212+
var offsetLength = WriteAttributeValueMethod.Length
213+
+ methodInvocationParenLength
214+
+ node.Prefix.Length
215+
+ stringLiteralQuoteLength
216+
+ parameterSepLength
217+
+ prefixLocation.Length
218+
+ parameterSepLength;
219+
using (context.CodeWriter.BuildEnhancedLinePragma(node.Source.Value, context, offsetLength))
204220
{
205-
var prefixLocation = node.Source.Value.AbsoluteIndex;
221+
206222
context.CodeWriter
207223
.WriteStartMethodInvocation(WriteAttributeValueMethod)
208224
.WriteStringLiteral(node.Prefix)
209225
.WriteParameterSeparator()
210-
.Write(prefixLocation.ToString(CultureInfo.InvariantCulture))
226+
.Write(prefixLocation)
211227
.WriteParameterSeparator();
212228

213229
for (var i = 0; i < node.Children.Count; i++)

src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/LiteralRuntimeNodeWriterTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void WriteCSharpExpression_UsesWriteLiteral_WritesLinePragma_WithSource()
1717

1818
var node = new CSharpExpressionIntermediateNode()
1919
{
20-
Source = new SourceSpan("test.cshtml", 0, 0, 0, 3),
20+
Source = new SourceSpan("test.cshtml", 0, 0, 0, 3, 0, 3),
2121
};
2222
var builder = IntermediateNodeBuilder.Create(node);
2323
builder.Add(new IntermediateToken()
@@ -34,7 +34,7 @@ public void WriteCSharpExpression_UsesWriteLiteral_WritesLinePragma_WithSource()
3434
Assert.Equal(
3535
@"
3636
#nullable restore
37-
#line 1 ""test.cshtml""
37+
#line (1,1)-(1,4) 13 ""test.cshtml""
3838
WriteLiteral(i++);
3939
4040
#line default

src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void WriteCSharpExpression_WritesLinePragma_WithSource()
115115

116116
var node = new CSharpExpressionIntermediateNode()
117117
{
118-
Source = new SourceSpan("test.cshtml", 0, 0, 0, 3),
118+
Source = new SourceSpan("test.cshtml", 0, 0, 0, 3, 0, 3),
119119
};
120120
var builder = IntermediateNodeBuilder.Create(node);
121121
builder.Add(new IntermediateToken()
@@ -132,7 +132,7 @@ public void WriteCSharpExpression_WritesLinePragma_WithSource()
132132
Assert.Equal(
133133
@"
134134
#nullable restore
135-
#line 1 ""test.cshtml""
135+
#line (1,1)-(1,4) 5 ""test.cshtml""
136136
Test(i++);
137137
138138
#line default
@@ -194,7 +194,7 @@ public void WriteCSharpExpression_WithSource_WritesPadding()
194194

195195
var node = new CSharpExpressionIntermediateNode()
196196
{
197-
Source = new SourceSpan("test.cshtml", 8, 0, 8, 3),
197+
Source = new SourceSpan("test.cshtml", 8, 0, 8, 3, 0, 11),
198198
};
199199
var builder = IntermediateNodeBuilder.Create(node);
200200
builder.Add(new IntermediateToken()
@@ -217,8 +217,8 @@ public void WriteCSharpExpression_WithSource_WritesPadding()
217217
Assert.Equal(
218218
@"
219219
#nullable restore
220-
#line 1 ""test.cshtml""
221-
Test(iRender Children
220+
#line (1,9)-(1,12) 5 ""test.cshtml""
221+
Test(iRender Children
222222
++);
223223
224224
#line default
@@ -572,7 +572,7 @@ public void WriteCSharpExpressionAttributeValue_RendersCorrectly()
572572
Assert.Equal(
573573
@"
574574
#nullable restore
575-
#line 1 ""test.cshtml""
575+
#line (1,28)-(1,35) 29 ""test.cshtml""
576576
WriteAttributeValue("" "", 27, false, 28, 6, false);
577577
578578
#line default

src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/TagHelperHtmlAttributeRuntimeNodeWriterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void WriteCSharpExpressionAttributeValue_RendersCorrectly()
5656
Assert.Equal(
5757
@"
5858
#nullable restore
59-
#line 1 ""test.cshtml""
59+
#line (1,28)-(1,35) 31 ""test.cshtml""
6060
AddHtmlAttributeValue("" "", 27, false, 28, 6, false);
6161
6262
#line default

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.codegen.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ public async System.Threading.Tasks.Task ExecuteAsync()
1313
{
1414
WriteLiteral("\r\n<section>\r\n <h1>Basic Asynchronous Expression Test</h1>\r\n <p>Basic Asynchronous Expression: ");
1515
#nullable restore
16-
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
17-
Write(await Foo());
16+
#line (10,40)-(10,51) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
17+
Write(await Foo());
1818

1919
#line default
2020
#line hidden
2121
#nullable disable
2222
WriteLiteral("</p>\r\n <p>Basic Asynchronous Template: ");
2323
#nullable restore
24-
#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
25-
Write(await Foo());
24+
#line (11,39)-(11,50) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
25+
Write(await Foo());
2626

2727
#line default
2828
#line hidden
@@ -38,41 +38,41 @@ public async System.Threading.Tasks.Task ExecuteAsync()
3838
WriteLiteral("</p>\r\n <p>Basic Asynchronous Statement Nested: ");
3939
WriteLiteral(" <b>");
4040
#nullable restore
41-
#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
42-
Write(await Foo());
41+
#line (13,52)-(13,63) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
42+
Write(await Foo());
4343

4444
#line default
4545
#line hidden
4646
#nullable disable
4747
WriteLiteral("</b> ");
4848
WriteLiteral("</p>\r\n <p>Basic Incomplete Asynchronous Statement: ");
4949
#nullable restore
50-
#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
51-
Write(await);
50+
#line (14,50)-(14,55) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
51+
Write(await);
5252

5353
#line default
5454
#line hidden
5555
#nullable disable
5656
WriteLiteral("</p>\r\n</section>\r\n\r\n<section>\r\n <h1>Advanced Asynchronous Expression Test</h1>\r\n <p>Advanced Asynchronous Expression: ");
5757
#nullable restore
58-
#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
59-
Write(await Foo(1, 2));
58+
#line (19,43)-(19,58) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
59+
Write(await Foo(1, 2));
6060

6161
#line default
6262
#line hidden
6363
#nullable disable
6464
WriteLiteral("</p>\r\n <p>Advanced Asynchronous Expression Extended: ");
6565
#nullable restore
66-
#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
67-
Write(await Foo.Bar(1, 2));
66+
#line (20,52)-(20,71) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
67+
Write(await Foo.Bar(1, 2));
6868

6969
#line default
7070
#line hidden
7171
#nullable disable
7272
WriteLiteral("</p>\r\n <p>Advanced Asynchronous Template: ");
7373
#nullable restore
74-
#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
75-
Write(await Foo("bob", true));
74+
#line (21,42)-(21,64) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
75+
Write(await Foo("bob", true));
7676

7777
#line default
7878
#line hidden
@@ -96,17 +96,17 @@ await Foo.Bar(1, 2)
9696
WriteLiteral("</p>\r\n <p>Advanced Asynchronous Statement Nested: ");
9797
WriteLiteral(" <b>");
9898
#nullable restore
99-
#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
100-
Write(await Foo(boolValue: false));
99+
#line (24,55)-(24,82) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
100+
Write(await Foo(boolValue: false));
101101

102102
#line default
103103
#line hidden
104104
#nullable disable
105105
WriteLiteral("</b> ");
106106
WriteLiteral("</p>\r\n <p>Advanced Incomplete Asynchronous Statement: ");
107107
#nullable restore
108-
#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
109-
Write(await ("wrrronggg"));
108+
#line (25,53)-(25,72) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml"
109+
Write(await ("wrrronggg"));
110110

111111
#line default
112112
#line hidden

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.codegen.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public async System.Threading.Tasks.Task ExecuteAsync()
6666
BeginWriteTagHelperAttribute();
6767
WriteLiteral("2000 + ");
6868
#nullable restore
69-
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml"
70-
Write(ViewBag.DefaultInterval);
69+
#line (6,39)-(6,62) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml"
70+
Write(ViewBag.DefaultInterval);
7171

7272
#line default
7373
#line hidden

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.codegen.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public async System.Threading.Tasks.Task ExecuteAsync()
2929
#nullable disable
3030
WriteLiteral(" <p>Hello from C#, #");
3131
#nullable restore
32-
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
33-
Write(i);
32+
#line (6,26)-(6,27) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
33+
Write(i);
3434

3535
#line default
3636
#line hidden
@@ -97,8 +97,8 @@ public async System.Threading.Tasks.Task ExecuteAsync()
9797
#nullable disable
9898
WriteLiteral(" <p>Hello again from C#, #");
9999
#nullable restore
100-
#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
101-
Write(j);
100+
#line (24,32)-(24,33) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
101+
Write(j);
102102

103103
#line default
104104
#line hidden
@@ -129,8 +129,8 @@ public async System.Threading.Tasks.Task ExecuteAsync()
129129
#nullable disable
130130
WriteLiteral(" <p>Oh no! An error occurred: ");
131131
#nullable restore
132-
#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
133-
Write(ex.Message);
132+
#line (30,36)-(30,46) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
133+
Write(ex.Message);
134134

135135
#line default
136136
#line hidden
@@ -145,8 +145,8 @@ public async System.Threading.Tasks.Task ExecuteAsync()
145145
#nullable disable
146146
WriteLiteral("\r\n<p>i is now ");
147147
#nullable restore
148-
#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
149-
Write(i);
148+
#line (33,14)-(33,15) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml"
149+
Write(i);
150150

151151
#line default
152152
#line hidden

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.codegen.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ public async System.Threading.Tasks.Task ExecuteAsync()
5454
#nullable disable
5555
WriteLiteral(" <p>\r\n Here\'s a very unique number: ");
5656
#nullable restore
57-
#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml"
58-
Write(1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M);
57+
#line (24,40)-(24,102) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml"
58+
Write(1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M);
5959

6060
#line default
6161
#line hidden
6262
#nullable disable
6363
WriteLiteral("\r\n </p>\r\n\r\n <div>\r\n ");
6464
#nullable restore
65-
#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml"
66-
Write((First: "John", Last: "Doe").First);
65+
#line (28,11)-(28,45) 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml"
66+
Write((First: "John", Last: "Doe").First);
6767

6868
#line default
6969
#line hidden

0 commit comments

Comments
 (0)