From dc76027a7affd0a9fa4bac8bbaf07ed1effdf687 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 7 Jun 2018 11:01:05 -0700 Subject: [PATCH] Generate line pragmas even for whitespace. - We need to pre-emptively generate line pragmas to handle C# scenarios which are session based. For instance, if a C# completion session starts at a location without a pragma they capture the origination point; at which point if a user keeps typing we generate a line pragma drastically changing where the copmletion started resulting in a broken C# completion experience. - Updated test files to reflect new behavior. #2299 --- .../CodeGeneration/DesignTimeNodeWriter.cs | 21 +---- .../DesignTimeNodeWriterTest.cs | 29 ++----- .../Await_DesignTime.codegen.cs | 24 +++++- .../Await_DesignTime.mappings.txt | 28 +++---- .../CodeBlockAtEOF_DesignTime.codegen.cs | 6 +- .../CodeBlockAtEOF_DesignTime.mappings.txt | 2 +- ...BlockWithTextElement_DesignTime.codegen.cs | 5 +- ...ockWithTextElement_DesignTime.mappings.txt | 2 +- .../ComplexTagHelpers_DesignTime.codegen.cs | 12 ++- .../ComplexTagHelpers_DesignTime.mappings.txt | 82 +++++++++---------- ...onditionalAttributes_DesignTime.codegen.cs | 65 ++++++++++++--- ...ditionalAttributes_DesignTime.mappings.txt | 42 +++++----- .../EmptyCodeBlock_DesignTime.codegen.cs | 6 +- .../EmptyCodeBlock_DesignTime.mappings.txt | 2 +- ...icitExpressionInCode_DesignTime.codegen.cs | 11 ++- ...itExpressionInCode_DesignTime.mappings.txt | 6 +- .../FunctionsBlock_DesignTime.codegen.cs | 5 +- .../FunctionsBlock_DesignTime.mappings.txt | 4 +- .../HiddenSpansInCode_DesignTime.codegen.cs | 6 +- .../HiddenSpansInCode_DesignTime.mappings.txt | 4 +- .../Instrumented_DesignTime.codegen.cs | 11 ++- .../Instrumented_DesignTime.mappings.txt | 38 ++++----- .../NestedCSharp_DesignTime.codegen.cs | 11 ++- .../NestedCSharp_DesignTime.mappings.txt | 10 +-- .../NoLinePragmas_DesignTime.codegen.cs | 6 +- .../NoLinePragmas_DesignTime.mappings.txt | 8 +- ...nditionalExpressions_DesignTime.codegen.cs | 29 +++++-- ...itionalExpressions_DesignTime.mappings.txt | 26 +++--- .../OpenedIf_DesignTime.codegen.cs | 11 ++- .../OpenedIf_DesignTime.mappings.txt | 4 +- .../RazorComments_DesignTime.codegen.cs | 6 +- .../RazorComments_DesignTime.mappings.txt | 14 ++-- .../Templates_DesignTime.codegen.cs | 10 ++- .../Templates_DesignTime.mappings.txt | 46 +++++------ ...shedExpressionInCode_DesignTime.codegen.cs | 10 ++- ...edExpressionInCode_DesignTime.mappings.txt | 6 +- 36 files changed, 361 insertions(+), 247 deletions(-) diff --git a/src/Microsoft.AspNetCore.Razor.Language/CodeGeneration/DesignTimeNodeWriter.cs b/src/Microsoft.AspNetCore.Razor.Language/CodeGeneration/DesignTimeNodeWriter.cs index 46837d0e23..d937c6f626 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/CodeGeneration/DesignTimeNodeWriter.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/CodeGeneration/DesignTimeNodeWriter.cs @@ -88,32 +88,13 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration public override void WriteCSharpCode(CodeRenderingContext context, CSharpCodeIntermediateNode node) { - var isWhitespaceStatement = true; - for (var i = 0; i < node.Children.Count; i++) - { - var token = node.Children[i] as IntermediateToken; - if (token == null || !string.IsNullOrWhiteSpace(token.Content)) - { - isWhitespaceStatement = false; - break; - } - } - IDisposable linePragmaScope = null; if (node.Source != null) { - if (!isWhitespaceStatement) - { - linePragmaScope = context.CodeWriter.BuildLinePragma(node.Source.Value); - } + linePragmaScope = context.CodeWriter.BuildLinePragma(node.Source.Value); context.CodeWriter.WritePadding(0, node.Source.Value, context); } - else if (isWhitespaceStatement) - { - // Don't write whitespace if there is no line mapping for it. - return; - } for (var i = 0; i < node.Children.Count; i++) { diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/CodeGeneration/DesignTimeNodeWriterTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/CodeGeneration/DesignTimeNodeWriterTest.cs index c602375095..79932bb30e 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/CodeGeneration/DesignTimeNodeWriterTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/CodeGeneration/DesignTimeNodeWriterTest.cs @@ -205,29 +205,6 @@ __o = i++; ignoreLineEndingDifferences: true); } - [Fact] - public void WriteCSharpCode_WhitespaceContent_DoesNothing() - { - // Arrange - var writer = new DesignTimeNodeWriter(); - var context = TestCodeRenderingContext.CreateDesignTime(); - - var node = new CSharpCodeIntermediateNode(); - IntermediateNodeBuilder.Create(node) - .Add(new IntermediateToken() - { - Kind = TokenKind.CSharp, - Content = " \t" - }); - - // Act - writer.WriteCSharpCode(context, node); - - // Assert - var csharp = context.CodeWriter.GenerateCode(); - Assert.Empty(csharp); - } - [Fact] public void WriteCSharpCode_WhitespaceContentWithSource_WritesContent() { @@ -252,7 +229,11 @@ __o = i++; // Assert var csharp = context.CodeWriter.GenerateCode(); Assert.Equal( -@" +@"#line 1 ""test.cshtml"" + + +#line default +#line hidden ", csharp, ignoreLineEndingDifferences: true); diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs index 6baa07bacf..72db8cb380 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs @@ -30,13 +30,21 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden #line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" __o = await Foo(); #line default #line hidden - +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden #line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" __o = await; @@ -67,13 +75,21 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden #line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" __o = await Foo(boolValue: false); #line default #line hidden - +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden #line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" __o = await ("wrrronggg"); diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt index 739f6092e2..f16bc10af3 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt @@ -15,67 +15,67 @@ Generated Location: (1080:28,39 [14] ) Source Location: (371:12,46 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) | | -Generated Location: (1185:32,58 [1] ) +Generated Location: (1255:33,46 [1] ) | | Source Location: (376:12,51 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await Foo()| -Generated Location: (1321:34,51 [11] ) +Generated Location: (1422:38,51 [11] ) |await Foo()| Source Location: (391:12,66 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) | | -Generated Location: (1444:38,78 [1] ) +Generated Location: (1615:43,66 [1] ) | | Source Location: (448:13,49 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await| -Generated Location: (1578:40,49 [5] ) +Generated Location: (1780:48,49 [5] ) |await| Source Location: (578:18,42 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await Foo(1, 2)| -Generated Location: (1741:45,42 [15] ) +Generated Location: (1943:53,42 [15] ) |await Foo(1, 2)| Source Location: (650:19,51 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await Foo.Bar(1, 2)| -Generated Location: (1923:50,51 [19] ) +Generated Location: (2125:58,51 [19] ) |await Foo.Bar(1, 2)| Source Location: (716:20,41 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await Foo("bob", true)| -Generated Location: (2099:55,41 [22] ) +Generated Location: (2301:63,41 [22] ) |await Foo("bob", true)| Source Location: (787:21,42 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) | await Foo(something, hello: "world"); | -Generated Location: (2279:60,42 [39] ) +Generated Location: (2481:68,42 [39] ) | await Foo(something, hello: "world"); | Source Location: (884:22,51 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) | await Foo.Bar(1, 2) | -Generated Location: (2484:65,51 [21] ) +Generated Location: (2686:73,51 [21] ) | await Foo.Bar(1, 2) | Source Location: (961:23,49 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) | | -Generated Location: (2599:69,61 [1] ) +Generated Location: (2871:78,49 [1] ) | | Source Location: (966:23,54 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await Foo(boolValue: false)| -Generated Location: (2738:71,54 [27] ) +Generated Location: (3041:83,54 [27] ) |await Foo(boolValue: false)| Source Location: (997:23,85 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) | | -Generated Location: (2896:75,97 [1] ) +Generated Location: (3269:88,85 [1] ) | | Source Location: (1057:24,52 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) |await ("wrrronggg")| -Generated Location: (3033:77,52 [19] ) +Generated Location: (3437:93,52 [19] ) |await ("wrrronggg")| Source Location: (12:0,12 [76] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) @@ -85,7 +85,7 @@ Source Location: (12:0,12 [76] TestFiles/IntegrationTests/CodeGenerationIntegrat return "Bar"; } | -Generated Location: (3228:84,12 [76] ) +Generated Location: (3632:100,12 [76] ) | public async Task Foo() { diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs index 8160ceea8d..b608d96706 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs @@ -15,7 +15,11 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml" + + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt index 91017073c6..35a86fcf82 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt @@ -1,5 +1,5 @@ Source Location: (2:0,2 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml) || -Generated Location: (651:17,14 [0] ) +Generated Location: (729:18,2 [0] ) || diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs index 5df492cc3c..cf0042aff3 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs @@ -32,8 +32,11 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt index 5279d46d18..3810200a52 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt @@ -20,7 +20,7 @@ Generated Location: (1123:30,38 [3] ) Source Location: (80:2,40 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml) | | -Generated Location: (1221:34,61 [2] ) +Generated Location: (1309:35,49 [2] ) | | diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs index 37b7b26436..e2ff79fdb5 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs @@ -73,8 +73,12 @@ __TestNamespace_PTagHelper.Age = @@(1+2); #line default #line hidden __TestNamespace_PTagHelper = CreateTagHelper(); - +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + + +#line default +#line hidden __TestNamespace_InputTagHelper = CreateTagHelper(); __TestNamespace_InputTagHelper2 = CreateTagHelper(); #line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" @@ -84,8 +88,12 @@ __TestNamespace_PTagHelper.Age = @@(1+2); #line hidden __TestNamespace_InputTagHelper.Type = string.Empty; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; - +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + + +#line default +#line hidden __TestNamespace_InputTagHelper = CreateTagHelper(); __TestNamespace_InputTagHelper2 = CreateTagHelper(); #line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt index 35f9f98fe8..5a3c14354f 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt @@ -81,213 +81,213 @@ Generated Location: (3077:70,63 [4] ) Source Location: (523:16,74 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | | -Generated Location: (3296:75,86 [18] ) +Generated Location: (3378:76,74 [18] ) | | Source Location: (556:17,31 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |true ? "checkbox" : "anything"| -Generated Location: (3649:80,31 [30] ) +Generated Location: (3762:84,31 [30] ) |true ? "checkbox" : "anything"| Source Location: (591:17,66 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | | -Generated Location: (3945:86,78 [18] ) +Generated Location: (4140:91,66 [18] ) | | Source Location: (623:18,30 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |if(true) { | -Generated Location: (4297:91,30 [11] ) +Generated Location: (4523:99,30 [11] ) |if(true) { | Source Location: (655:18,62 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | } else { | -Generated Location: (4497:96,62 [10] ) +Generated Location: (4723:104,62 [10] ) | } else { | Source Location: (686:18,93 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | }| -Generated Location: (4727:101,93 [2] ) +Generated Location: (4953:109,93 [2] ) | }| Source Location: (690:18,97 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | }| -Generated Location: (5107:108,97 [15] ) +Generated Location: (5333:116,97 [15] ) | }| Source Location: (212:8,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |DateTime.Now| -Generated Location: (5375:115,32 [12] ) +Generated Location: (5601:123,32 [12] ) |DateTime.Now| Source Location: (832:22,14 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | var @object = false;| -Generated Location: (5529:120,14 [21] ) +Generated Location: (5755:128,14 [21] ) | var @object = false;| Source Location: (885:23,29 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |(| -Generated Location: (5927:127,42 [1] ) +Generated Location: (6153:135,42 [1] ) |(| Source Location: (886:23,30 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |@object| -Generated Location: (5928:127,43 [7] ) +Generated Location: (6154:135,43 [7] ) |@object| Source Location: (893:23,37 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |)| -Generated Location: (5935:127,50 [1] ) +Generated Location: (6161:135,50 [1] ) |)| Source Location: (760:21,39 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |DateTimeOffset.Now.Year| -Generated Location: (6197:133,38 [23] ) +Generated Location: (6423:141,38 [23] ) |DateTimeOffset.Now.Year| Source Location: (783:21,62 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | -| -Generated Location: (6220:133,61 [2] ) +Generated Location: (6446:141,61 [2] ) | -| Source Location: (785:21,64 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | 1970| -Generated Location: (6222:133,63 [5] ) +Generated Location: (6448:141,63 [5] ) | 1970| Source Location: (1025:26,61 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |(| -Generated Location: (6623:140,60 [1] ) +Generated Location: (6849:148,60 [1] ) |(| Source Location: (1026:26,62 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |DateTimeOffset.Now.Year > 2014| -Generated Location: (6624:140,61 [30] ) +Generated Location: (6850:148,61 [30] ) |DateTimeOffset.Now.Year > 2014| Source Location: (1056:26,92 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |)| -Generated Location: (6654:140,91 [1] ) +Generated Location: (6880:148,91 [1] ) |)| Source Location: (928:25,16 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |-1970| -Generated Location: (6911:146,33 [5] ) +Generated Location: (7137:154,33 [5] ) |-1970| Source Location: (933:25,21 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | +| -Generated Location: (6916:146,38 [2] ) +Generated Location: (7142:154,38 [2] ) | +| Source Location: (935:25,23 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | | -Generated Location: (6918:146,40 [1] ) +Generated Location: (7144:154,40 [1] ) | | Source Location: (936:25,24 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |@| -Generated Location: (6919:146,41 [1] ) +Generated Location: (7145:154,41 [1] ) |@| Source Location: (937:25,25 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |DateTimeOffset.Now.Year| -Generated Location: (6920:146,42 [23] ) +Generated Location: (7146:154,42 [23] ) |DateTimeOffset.Now.Year| Source Location: (1155:29,28 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |DateTimeOffset.Now.Year > 2014| -Generated Location: (7321:153,42 [30] ) +Generated Location: (7547:161,42 [30] ) |DateTimeOffset.Now.Year > 2014| Source Location: (1093:28,16 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |DateTimeOffset.Now.Year - 1970| -Generated Location: (7607:159,33 [30] ) +Generated Location: (7833:167,33 [30] ) |DateTimeOffset.Now.Year - 1970| Source Location: (1283:32,28 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | | -Generated Location: (8015:166,42 [3] ) +Generated Location: (8241:174,42 [3] ) | | Source Location: (1286:32,31 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |@| -Generated Location: (8018:166,45 [1] ) +Generated Location: (8244:174,45 [1] ) |@| Source Location: (1287:32,32 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |(| -Generated Location: (8019:166,46 [1] ) +Generated Location: (8245:174,46 [1] ) |(| Source Location: (1288:32,33 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | DateTimeOffset.Now.Year | -Generated Location: (8020:166,47 [27] ) +Generated Location: (8246:174,47 [27] ) | DateTimeOffset.Now.Year | Source Location: (1315:32,60 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |)| -Generated Location: (8047:166,74 [1] ) +Generated Location: (8273:174,74 [1] ) |)| Source Location: (1316:32,61 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | >| -Generated Location: (8048:166,75 [2] ) +Generated Location: (8274:174,75 [2] ) | >| Source Location: (1318:32,63 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | 2014| -Generated Location: (8050:166,77 [5] ) +Generated Location: (8276:174,77 [5] ) | 2014| Source Location: (1323:32,68 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | | -Generated Location: (8055:166,82 [3] ) +Generated Location: (8281:174,82 [3] ) | | Source Location: (1220:31,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |(| -Generated Location: (8314:172,33 [1] ) +Generated Location: (8540:180,33 [1] ) |(| Source Location: (1221:31,18 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |"My age is this long.".Length| -Generated Location: (8315:172,34 [29] ) +Generated Location: (8541:180,34 [29] ) |"My age is this long.".Length| Source Location: (1250:31,47 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |)| -Generated Location: (8344:172,63 [1] ) +Generated Location: (8570:180,63 [1] ) |)| Source Location: (1355:34,9 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |someMethod(| -Generated Location: (8482:177,9 [11] ) +Generated Location: (8708:185,9 [11] ) |someMethod(| Source Location: (1410:34,64 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |checked| -Generated Location: (8900:181,63 [7] ) +Generated Location: (9126:189,63 [7] ) |checked| Source Location: (1375:34,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |123| -Generated Location: (9155:187,33 [3] ) +Generated Location: (9381:195,33 [3] ) |123| Source Location: (1424:34,78 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) |)| -Generated Location: (9196:192,1 [1] ) +Generated Location: (9422:200,1 [1] ) |)| Source Location: (1437:35,10 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) | }| -Generated Location: (9335:197,10 [3] ) +Generated Location: (9561:205,10 [3] ) | }| diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs index d603d44201..f03a621125 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs @@ -23,43 +23,67 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = cls; #line default #line hidden - +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = cls; #line default #line hidden - +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = cls; #line default #line hidden - +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = ch; #line default #line hidden - +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = ch; #line default #line hidden - +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" if(cls != null) { @@ -75,26 +99,45 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + - + +#line default +#line hidden +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = Url.Content("~/Scripts/jquery-1.6.2.min.js"); #line default #line hidden - +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden #line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" __o = Url.Content("~/Scripts/modernizr-2.0.6-development-only.js"); #line default #line hidden - +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + - +#line default +#line hidden +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt index 6824785c85..49fdb956d9 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt @@ -12,127 +12,127 @@ Generated Location: (743:18,2 [48] ) Source Location: (66:3,20 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (856:25,32 [6] ) +Generated Location: (941:26,20 [6] ) | | Source Location: (83:4,15 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |cls| -Generated Location: (976:28,15 [3] ) +Generated Location: (1092:32,15 [3] ) |cls| Source Location: (90:4,22 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (1047:32,34 [6] ) +Generated Location: (1248:37,22 [6] ) | | Source Location: (111:5,19 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |cls| -Generated Location: (1171:35,19 [3] ) +Generated Location: (1403:43,19 [3] ) |cls| Source Location: (118:5,26 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (1246:39,38 [6] ) +Generated Location: (1563:48,26 [6] ) | | Source Location: (135:6,15 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |cls| -Generated Location: (1366:42,15 [3] ) +Generated Location: (1714:54,15 [3] ) |cls| Source Location: (146:6,26 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (1441:46,38 [6] ) +Generated Location: (1874:59,26 [6] ) | | Source Location: (185:7,37 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |ch| -Generated Location: (1583:49,37 [2] ) +Generated Location: (2047:65,37 [2] ) |ch| Source Location: (191:7,43 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (1674:53,55 [6] ) +Generated Location: (2223:70,43 [6] ) | | Source Location: (234:8,41 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |ch| -Generated Location: (1820:56,41 [2] ) +Generated Location: (2400:76,41 [2] ) |ch| Source Location: (240:8,47 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (1915:60,59 [6] ) +Generated Location: (2580:81,47 [6] ) | | Source Location: (257:9,15 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |if(cls != null) { | -Generated Location: (2036:63,15 [18] ) +Generated Location: (2732:87,15 [18] ) |if(cls != null) { | Source Location: (276:9,34 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |cls| -Generated Location: (2219:68,34 [3] ) +Generated Location: (2915:92,34 [3] ) |cls| Source Location: (279:9,37 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | }| -Generated Location: (2391:73,37 [2] ) +Generated Location: (3087:97,37 [2] ) | }| Source Location: (285:9,43 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (2481:77,55 [6] ) +Generated Location: (3263:102,43 [6] ) | | Source Location: (309:10,22 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (2523:79,34 [6] ) +Generated Location: (3422:108,22 [6] ) | | Source Location: (329:11,18 [44] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |Url.Content("~/Scripts/jquery-1.6.2.min.js")| -Generated Location: (2647:82,18 [44] ) +Generated Location: (3577:114,18 [44] ) |Url.Content("~/Scripts/jquery-1.6.2.min.js")| Source Location: (407:11,96 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (2833:86,108 [6] ) +Generated Location: (3849:119,96 [6] ) | | Source Location: (427:12,18 [60] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) |Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")| -Generated Location: (2957:89,18 [60] ) +Generated Location: (4004:125,18 [60] ) |Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")| Source Location: (521:12,112 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (3175:93,124 [6] ) +Generated Location: (4308:130,112 [6] ) | | Source Location: (638:13,115 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) | | -Generated Location: (3310:95,127 [2] ) +Generated Location: (4560:136,115 [2] ) | | diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs index 6927c99f10..c0c4004a57 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs @@ -15,7 +15,11 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml" + + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt index be686c9435..7e37fe345d 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt @@ -1,5 +1,5 @@ Source Location: (20:2,2 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml) || -Generated Location: (651:17,14 [0] ) +Generated Location: (729:18,2 [0] ) || diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs index 2f466f8132..b288005187 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs @@ -15,15 +15,22 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" + + +#line default +#line hidden #line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" __o = ; #line default #line hidden - +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt index 8fde4acc1b..37e96b1d2d 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt @@ -1,19 +1,19 @@ Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) | | -Generated Location: (666:17,14 [6] ) +Generated Location: (759:18,2 [6] ) | | Source Location: (9:1,5 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) || -Generated Location: (785:20,6 [0] ) +Generated Location: (909:24,6 [0] ) || Source Location: (9:1,5 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) | | -Generated Location: (836:24,17 [2] ) +Generated Location: (1053:29,5 [2] ) | | diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs index ac6848c885..36ff974c05 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs @@ -22,9 +22,12 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line hidden } #pragma warning restore 1998 - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" + +#line default +#line hidden #line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" Random _rand = new Random(); diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt index 91a2fbde86..262325f0cb 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt @@ -7,7 +7,7 @@ Source Location: (12:0,12 [4] TestFiles/IntegrationTests/CodeGenerationIntegrati | | -Generated Location: (867:24,20 [4] ) +Generated Location: (949:25,12 [4] ) | | @@ -19,7 +19,7 @@ Source Location: (33:4,12 [104] TestFiles/IntegrationTests/CodeGenerationIntegra return _rand.Next(); } | -Generated Location: (975:28,12 [104] ) +Generated Location: (1086:31,12 [104] ) | Random _rand = new Random(); private int RandomInt() { diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs index 77d9135c5a..1b8baa0064 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs @@ -15,8 +15,12 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml" + + +#line default +#line hidden #line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml" @Da diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt index e56c1f5b1f..80b903cc64 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt @@ -1,14 +1,14 @@ Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml) | | -Generated Location: (654:17,14 [6] ) +Generated Location: (735:18,2 [6] ) | | Source Location: (9:1,5 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml) |@Da | -Generated Location: (760:20,5 [5] ) +Generated Location: (872:24,5 [5] ) |@Da | diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs index 04f1daad49..d9c39802a7 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs @@ -31,9 +31,16 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - - +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + +#line default +#line hidden +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + +#line default +#line hidden #line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" while(i <= 10) { diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt index 4165c88fa9..2a622f4808 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt @@ -16,33 +16,33 @@ Generated Location: (1003:28,25 [7] ) Source Location: (68:4,0 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | | -Generated Location: (1043:33,0 [4] ) +Generated Location: (1131:34,0 [4] ) | | Source Location: (91:4,23 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | | -Generated Location: (1096:34,35 [2] ) +Generated Location: (1279:39,23 [2] ) | | Source Location: (99:7,1 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |while(i <= 10) { | -Generated Location: (1189:37,1 [22] ) +Generated Location: (1401:44,1 [22] ) |while(i <= 10) { | Source Location: (142:8,25 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |i| -Generated Location: (1357:43,25 [1] ) +Generated Location: (1569:50,25 [1] ) |i| Source Location: (148:8,31 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | i += 1; }| -Generated Location: (1511:48,31 [16] ) +Generated Location: (1723:55,31 [16] ) | i += 1; }| @@ -50,14 +50,14 @@ Generated Location: (1511:48,31 [16] ) Source Location: (169:12,1 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |if(i == 11) { | -Generated Location: (1650:55,1 [19] ) +Generated Location: (1862:62,1 [19] ) |if(i == 11) { | Source Location: (213:13,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | }| -Generated Location: (1820:61,29 [3] ) +Generated Location: (2032:68,29 [3] ) | }| @@ -65,7 +65,7 @@ Source Location: (221:16,1 [35] TestFiles/IntegrationTests/CodeGenerationIntegra |switch(i) { case 11: | -Generated Location: (1946:67,1 [35] ) +Generated Location: (2158:74,1 [35] ) |switch(i) { case 11: | @@ -75,7 +75,7 @@ Source Location: (292:18,44 [40] TestFiles/IntegrationTests/CodeGenerationIntegr break; default: | -Generated Location: (2147:74,44 [40] ) +Generated Location: (2359:81,44 [40] ) | break; default: @@ -85,7 +85,7 @@ Source Location: (361:21,37 [19] TestFiles/IntegrationTests/CodeGenerationIntegr | break; }| -Generated Location: (2346:82,37 [19] ) +Generated Location: (2558:89,37 [19] ) | break; }| @@ -93,26 +93,26 @@ Generated Location: (2346:82,37 [19] ) Source Location: (385:25,1 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |for(int j = 1; j <= 10; j += 2) { | -Generated Location: (2488:89,1 [39] ) +Generated Location: (2700:96,1 [39] ) |for(int j = 1; j <= 10; j += 2) { | Source Location: (451:26,31 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |j| -Generated Location: (2680:95,31 [1] ) +Generated Location: (2892:102,31 [1] ) |j| Source Location: (457:26,37 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | }| -Generated Location: (2841:100,37 [3] ) +Generated Location: (3053:107,37 [3] ) | }| Source Location: (465:29,1 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |try { | -Generated Location: (2967:106,1 [11] ) +Generated Location: (3179:113,1 [11] ) |try { | @@ -120,34 +120,34 @@ Source Location: (511:30,39 [31] TestFiles/IntegrationTests/CodeGenerationIntegr | } catch(Exception ex) { | -Generated Location: (3139:112,39 [31] ) +Generated Location: (3351:119,39 [31] ) | } catch(Exception ex) { | Source Location: (573:32,35 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |ex.Message| -Generated Location: (3327:119,35 [10] ) +Generated Location: (3539:126,35 [10] ) |ex.Message| Source Location: (588:32,50 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | }| -Generated Location: (3510:124,50 [3] ) +Generated Location: (3722:131,50 [3] ) | }| Source Location: (596:35,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) |lock(new object()) { | -Generated Location: (3636:130,1 [26] ) +Generated Location: (3848:137,1 [26] ) |lock(new object()) { | Source Location: (669:36,51 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) | }| -Generated Location: (3835:136,51 [3] ) +Generated Location: (4047:143,51 [3] ) | }| diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs index ad9d4de7e5..763d09cac3 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs @@ -15,8 +15,12 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + + +#line default +#line hidden #line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" foreach (var result in (dynamic)Url) { @@ -35,8 +39,11 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt index a3a8e67f53..d07593ae24 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt @@ -1,7 +1,7 @@ Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) | | -Generated Location: (649:17,14 [6] ) +Generated Location: (725:18,2 [6] ) | | @@ -9,27 +9,27 @@ Source Location: (9:1,5 [53] TestFiles/IntegrationTests/CodeGenerationIntegratio |foreach (var result in (dynamic)Url) { | -Generated Location: (750:20,5 [53] ) +Generated Location: (857:24,5 [53] ) |foreach (var result in (dynamic)Url) { | Source Location: (82:4,13 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) |result.SomeValue| -Generated Location: (937:27,13 [16] ) +Generated Location: (1044:31,13 [16] ) |result.SomeValue| Source Location: (115:5,14 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) | }| -Generated Location: (1089:32,14 [7] ) +Generated Location: (1196:36,14 [7] ) | }| Source Location: (122:6,5 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) | | -Generated Location: (1146:37,17 [2] ) +Generated Location: (1329:42,5 [2] ) | | diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs index a800b83828..9e127a7992 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs @@ -115,7 +115,11 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + +#line default +#line hidden #line 34 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" __o = i; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt index 349b695abd..e0965c9452 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt @@ -124,25 +124,25 @@ Generated Location: (3201:111,50 [7] ) Source Location: (556:32,34 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) || -Generated Location: (3285:117,46 [0] ) +Generated Location: (3363:118,34 [0] ) || Source Location: (571:33,13 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) |i| -Generated Location: (3390:119,13 [1] ) +Generated Location: (3499:123,13 [1] ) |i| Source Location: (581:35,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) |lock(new object()) { | -Generated Location: (3516:124,1 [26] ) +Generated Location: (3625:128,1 [26] ) |lock(new object()) { | Source Location: (654:36,51 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) | }| -Generated Location: (3716:130,51 [3] ) +Generated Location: (3825:134,51 [3] ) | }| diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs index a380c6449e..ce0052fdd8 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs @@ -15,36 +15,55 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + +#line default +#line hidden #line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" __o = ViewBag?.Data; #line default #line hidden - +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + +#line default +#line hidden #line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" __o = ViewBag.IntIndexer?[0]; #line default #line hidden - +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + +#line default +#line hidden #line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" __o = ViewBag.StrIndexer?["key"]; #line default #line hidden - +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + +#line default +#line hidden #line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" __o = ViewBag?.Method(Value?[23]?.More)?["key"]; #line default #line hidden - +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + +#line default +#line hidden #line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" __o = ViewBag?.Data; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt index 0f7b77a97c..1811d93f1f 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt @@ -1,75 +1,75 @@ Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) | | -Generated Location: (663:17,14 [6] ) +Generated Location: (753:18,2 [6] ) | | Source Location: (9:1,5 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag?.Data| -Generated Location: (779:20,6 [13] ) +Generated Location: (900:24,6 [13] ) |ViewBag?.Data| Source Location: (22:1,18 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) | | -Generated Location: (856:24,30 [6] ) +Generated Location: (1067:29,18 [6] ) | | Source Location: (29:2,5 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag.IntIndexer?[0]| -Generated Location: (972:27,6 [22] ) +Generated Location: (1214:35,6 [22] ) |ViewBag.IntIndexer?[0]| Source Location: (51:2,27 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) | | -Generated Location: (1067:31,39 [6] ) +Generated Location: (1399:40,27 [6] ) | | Source Location: (58:3,5 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag.StrIndexer?["key"]| -Generated Location: (1183:34,6 [26] ) +Generated Location: (1546:46,6 [26] ) |ViewBag.StrIndexer?["key"]| Source Location: (84:3,31 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) | | -Generated Location: (1286:38,43 [6] ) +Generated Location: (1739:51,31 [6] ) | | Source Location: (91:4,5 [41] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag?.Method(Value?[23]?.More)?["key"]| -Generated Location: (1402:41,6 [41] ) +Generated Location: (1886:57,6 [41] ) |ViewBag?.Method(Value?[23]?.More)?["key"]| Source Location: (132:4,46 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) | | -Generated Location: (1535:45,58 [2] ) +Generated Location: (2109:62,46 [2] ) | | Source Location: (140:7,1 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag?.Data| -Generated Location: (1647:48,6 [13] ) +Generated Location: (2250:67,6 [13] ) |ViewBag?.Data| Source Location: (156:8,1 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag.IntIndexer?[0]| -Generated Location: (1802:53,6 [22] ) +Generated Location: (2405:72,6 [22] ) |ViewBag.IntIndexer?[0]| Source Location: (181:9,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag.StrIndexer?["key"]| -Generated Location: (1967:58,6 [26] ) +Generated Location: (2570:77,6 [26] ) |ViewBag.StrIndexer?["key"]| Source Location: (210:10,1 [41] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) |ViewBag?.Method(Value?[23]?.More)?["key"]| -Generated Location: (2136:63,6 [41] ) +Generated Location: (2739:82,6 [41] ) |ViewBag?.Method(Value?[23]?.More)?["key"]| diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs index cbf0fbd1b9..40f50f1e8b 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs @@ -20,9 +20,16 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #line default #line hidden - +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" + - +#line default +#line hidden +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" + + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt index 0e07728ecc..96e7303e2b 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt @@ -8,12 +8,12 @@ Generated Location: (716:18,1 [14] ) Source Location: (38:3,7 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml) | | -Generated Location: (780:22,19 [2] ) +Generated Location: (852:23,7 [2] ) | | Source Location: (47:4,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml) || -Generated Location: (803:24,19 [0] ) +Generated Location: (976:28,7 [0] ) || diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs index a21ac99866..de5d6f8ac6 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs @@ -15,8 +15,12 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + + +#line default +#line hidden #line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" Exception foo = diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt index 3278641353..3357a58b2f 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt @@ -1,14 +1,14 @@ Source Location: (81:3,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) | | -Generated Location: (650:17,14 [6] ) +Generated Location: (727:18,2 [6] ) | | Source Location: (122:4,39 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) | Exception foo = | -Generated Location: (786:20,39 [22] ) +Generated Location: (894:24,39 [22] ) | Exception foo = | @@ -18,7 +18,7 @@ Source Location: (173:5,49 [58] TestFiles/IntegrationTests/CodeGenerationIntegra throw foo; } | -Generated Location: (979:26,49 [58] ) +Generated Location: (1087:30,49 [58] ) | null; if(foo != null) { throw foo; @@ -27,21 +27,21 @@ Generated Location: (979:26,49 [58] ) Source Location: (238:11,2 [24] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) | var bar = "@* bar *@"; | -Generated Location: (1160:34,2 [24] ) +Generated Location: (1268:38,2 [24] ) | var bar = "@* bar *@"; | Source Location: (310:12,45 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) |bar| -Generated Location: (1352:39,45 [3] ) +Generated Location: (1460:43,45 [3] ) |bar| Source Location: (323:14,2 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) |a| -Generated Location: (1485:44,6 [1] ) +Generated Location: (1593:48,6 [1] ) |a| Source Location: (328:14,7 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) |b| -Generated Location: (1486:44,7 [1] ) +Generated Location: (1594:48,7 [1] ) |b| diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs index e71dc97f63..f1b77b164c 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs @@ -40,8 +40,11 @@ __o = foo(""); #line default #line hidden - +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + +#line default +#line hidden #line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" Func bar = @@ -67,8 +70,11 @@ __o = bar("myclass"); #line default #line hidden - +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + +#line default +#line hidden #line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" __o = Repeat(10, item => new Template(async(__razor_template_writer) => { #line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt index 3c35d4c99a..6f779cac97 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt @@ -25,125 +25,125 @@ Generated Location: (1343:38,6 [7] ) Source Location: (364:12,12 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) | | -Generated Location: (1408:42,24 [2] ) +Generated Location: (1482:43,12 [2] ) | | Source Location: (373:15,2 [35] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) | Func bar = | -Generated Location: (1500:45,2 [35] ) +Generated Location: (1603:48,2 [35] ) | Func bar = | Source Location: (420:16,44 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |item| -Generated Location: (1768:52,44 [4] ) +Generated Location: (1871:55,44 [4] ) |item| Source Location: (435:16,59 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |; | -Generated Location: (1981:59,59 [7] ) +Generated Location: (2084:62,59 [7] ) |; | Source Location: (443:17,5 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |bar("myclass")| -Generated Location: (2113:65,6 [14] ) +Generated Location: (2216:68,6 [14] ) |bar("myclass")| Source Location: (457:17,19 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) | | -Generated Location: (2192:69,31 [2] ) +Generated Location: (2369:73,19 [2] ) | | Source Location: (472:21,2 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |Repeat(10, | -Generated Location: (2288:72,6 [11] ) +Generated Location: (2494:78,6 [11] ) |Repeat(10, | Source Location: (495:21,25 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |item| -Generated Location: (2468:74,25 [4] ) +Generated Location: (2674:80,25 [4] ) |item| Source Location: (504:21,34 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |)| -Generated Location: (2510:79,1 [1] ) +Generated Location: (2716:85,1 [1] ) |)| Source Location: (523:25,1 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |Repeat(10, | -Generated Location: (2637:84,6 [16] ) +Generated Location: (2843:90,6 [16] ) |Repeat(10, | Source Location: (556:26,21 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |item| -Generated Location: (2818:87,21 [4] ) +Generated Location: (3024:93,21 [4] ) |item| Source Location: (577:27,0 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |)| -Generated Location: (2860:92,1 [1] ) +Generated Location: (3066:98,1 [1] ) |)| Source Location: (594:31,1 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |Repeat(10, | -Generated Location: (2987:97,6 [16] ) +Generated Location: (3193:103,6 [16] ) |Repeat(10, | Source Location: (628:32,22 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |item| -Generated Location: (3169:100,22 [4] ) +Generated Location: (3375:106,22 [4] ) |item| Source Location: (650:33,0 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |)| -Generated Location: (3211:105,1 [1] ) +Generated Location: (3417:111,1 [1] ) |)| Source Location: (667:37,1 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |Repeat(10, | -Generated Location: (3338:110,6 [16] ) +Generated Location: (3544:116,6 [16] ) |Repeat(10, | Source Location: (702:38,23 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |item| -Generated Location: (3521:113,23 [4] ) +Generated Location: (3727:119,23 [4] ) |item| Source Location: (724:39,0 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |)| -Generated Location: (3563:118,1 [1] ) +Generated Location: (3769:124,1 [1] ) |)| Source Location: (748:44,5 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |Repeat(10, | -Generated Location: (3690:123,6 [11] ) +Generated Location: (3896:129,6 [11] ) |Repeat(10, | Source Location: (781:45,15 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |item| -Generated Location: (3860:125,15 [4] ) +Generated Location: (4066:131,15 [4] ) |item| Source Location: (797:46,10 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |var parent = item;| -Generated Location: (3994:130,10 [18] ) +Generated Location: (4200:136,10 [18] ) |var parent = item;| Source Location: (956:51,9 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) |)| -Generated Location: (4049:135,1 [1] ) +Generated Location: (4255:141,1 [1] ) |)| Source Location: (12:0,12 [265] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) @@ -156,7 +156,7 @@ Source Location: (12:0,12 [265] TestFiles/IntegrationTests/CodeGenerationIntegra }); } | -Generated Location: (4230:142,12 [265] ) +Generated Location: (4436:148,12 [265] ) | public HelperResult Repeat(int times, Func template) { return new HelperResult((writer) => { diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.codegen.cs index dab1c558b9..67dcb7e986 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.codegen.cs @@ -15,15 +15,21 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { - +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml" + +#line default +#line hidden #line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml" __o = DateTime.; #line default #line hidden - +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml" + +#line default +#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.mappings.txt index df11ba8f84..b3394a56b8 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.mappings.txt @@ -1,19 +1,19 @@ Source Location: (2:0,2 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml) | | -Generated Location: (663:17,14 [2] ) +Generated Location: (753:18,2 [2] ) | | Source Location: (5:1,1 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml) |DateTime.| -Generated Location: (775:20,6 [9] ) +Generated Location: (894:23,6 [9] ) |DateTime.| Source Location: (14:1,10 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml) | | -Generated Location: (840:24,22 [2] ) +Generated Location: (1049:28,10 [2] ) | |