diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs index b83cfe959e3..8cca54ad60c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs @@ -13,14 +13,15 @@ namespace AspNetCore using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; -#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" -using Microsoft.AspNetCore.Mvc.RazorPages; +#line (4,2)-(5,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" +using Microsoft.AspNetCore.Mvc.RazorPages #line default #line hidden + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("RouteTemplate", // language=Route -#line (1,7)-(1,15) 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" +#line (1,7)-(1,15) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" "/About" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs index 2098ee26a00..4a2c50cf594 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs @@ -13,11 +13,12 @@ namespace AspNetCore using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; -#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" -using Microsoft.AspNetCore.Mvc.RazorPages; +#line (4,2)-(5,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" +using Microsoft.AspNetCore.Mvc.RazorPages #line default #line hidden + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"4d4352438ec54cff935ed10c73f4fb4ce0ea8ffc7c46b467007618dead77f960", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml")] public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel : global::Microsoft.AspNetCore.Mvc.RazorPages.Page { diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs index dd901cefc3b..657a5752535 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs @@ -13,11 +13,12 @@ namespace AspNetCore using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; -#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" -using Microsoft.AspNetCore.Mvc.RazorPages; +#line (5,2)-(6,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" +using Microsoft.AspNetCore.Mvc.RazorPages #line default #line hidden + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"676265931c358e22efce0fe9ebd76cc3a7d2a5c12d37384e13aec92aa7667663", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml")] public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages : global::Microsoft.AspNetCore.Mvc.RazorPages.Page { diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs index e6adcbfa75c..ef59ce10ac9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs @@ -12,26 +12,30 @@ namespace AspNetCore using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.ViewFeatures; -#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System.ComponentModel; +#line (1,2)-(2,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System.ComponentModel #line default #line hidden -#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System.Collections; + ; +#line (2,2)-(3,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System.Collections #line default #line hidden -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System; + ; +#line (3,2)-(4,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System #line default #line hidden -#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System; + ; +#line (4,2)-(4,14) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System #line default #line hidden + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"9194971d2fb7908a02b02841f18655ccc0908a204c2fa948e8dc7e947269da86", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml")] public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_UsingDirectives : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage { diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeDirectiveWithViewImports_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeDirectiveWithViewImports_Runtime.codegen.cs index f009118984b..0309683d9fc 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeDirectiveWithViewImports_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeDirectiveWithViewImports_Runtime.codegen.cs @@ -12,12 +12,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 1 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\_ViewImports.cshtml" -using System; +#line (1,2)-(2,1) "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\_ViewImports.cshtml" +using System #line default #line hidden #nullable disable + ; #nullable restore #line 2 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\_ViewImports.cshtml" [Serializable] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs index 813c032e374..f3bbcd3f728 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate_Runtime.codegen.cs @@ -13,16 +13,17 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" -using Microsoft.AspNetCore.Mvc.RazorPages; +#line (4,2)-(5,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" +using Microsoft.AspNetCore.Mvc.RazorPages #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("RouteTemplate", // language=Route #nullable restore -#line (1,7)-(1,15) 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" +#line (1,7)-(1,15) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml" "/About" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs index 6eed0748f88..378170b3f24 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel_Runtime.codegen.cs @@ -13,12 +13,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" -using Microsoft.AspNetCore.Mvc.RazorPages; +#line (4,2)-(5,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" +using Microsoft.AspNetCore.Mvc.RazorPages #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"4d4352438ec54cff935ed10c73f4fb4ce0ea8ffc7c46b467007618dead77f960", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs index 4e09af26831..62d4421a45b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages_Runtime.codegen.cs @@ -13,12 +13,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" -using Microsoft.AspNetCore.Mvc.RazorPages; +#line (5,2)-(6,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" +using Microsoft.AspNetCore.Mvc.RazorPages #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"676265931c358e22efce0fe9ebd76cc3a7d2a5c12d37384e13aec92aa7667663", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNonNullableModel_NullableContextEnabled.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNonNullableModel_NullableContextEnabled.codegen.cs index 78c2b7aec4f..3a76b5f94c0 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNonNullableModel_NullableContextEnabled.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNonNullableModel_NullableContextEnabled.codegen.cs @@ -13,12 +13,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 2 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" -using TestNamespace; +#line (2,2)-(3,1) "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" +using TestNamespace #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"d0420b910fa2a6f0119a96ffb534fee225ca66e96b3b1741cf04c7ebd9525f62", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableBaseType_NullableContexEnabled.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableBaseType_NullableContexEnabled.codegen.cs index f68eca9e18e..29eed07fc8f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableBaseType_NullableContexEnabled.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableBaseType_NullableContexEnabled.codegen.cs @@ -13,12 +13,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 2 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" -using TestNamespace; +#line (2,2)-(3,1) "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" +using TestNamespace #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"714936b16425e1b5a49883c3e910ed43c30422ebc564f54651880695133a3b4b", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextEnabled.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextEnabled.codegen.cs index e95ba65bd2d..70a2da34788 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextEnabled.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextEnabled.codegen.cs @@ -13,12 +13,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 2 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" -using TestNamespace; +#line (2,2)-(3,1) "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" +using TestNamespace #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"b354ee3595811e9701f9c464ddf35ccb31360a3799b7bb4279192f084591a4fe", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextNotEnabled.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextNotEnabled.codegen.cs index e95ba65bd2d..70a2da34788 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextNotEnabled.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorView_WithNullableModel_NullableContextNotEnabled.codegen.cs @@ -13,12 +13,13 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 2 "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" -using TestNamespace; +#line (2,2)-(3,1) "TestFiles\IntegrationTests\CodeGenerationIntegrationTest\test.cshtml" +using TestNamespace #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"b354ee3595811e9701f9c464ddf35ccb31360a3799b7bb4279192f084591a4fe", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/test.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs index e1aded5eb49..ef302ac5def 100644 --- a/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives_Runtime.codegen.cs @@ -12,33 +12,37 @@ namespace AspNetCore using global::Microsoft.AspNetCore.Mvc.Rendering; using global::Microsoft.AspNetCore.Mvc.ViewFeatures; #nullable restore -#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System.ComponentModel; +#line (1,2)-(2,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System.ComponentModel #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System.Collections; +#line (2,2)-(3,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System.Collections #line default #line hidden #nullable disable + ; #nullable restore -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System; +#line (3,2)-(4,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System #line default #line hidden #nullable disable + ; #nullable restore -#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" -using System; +#line (4,2)-(4,14) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml" +using System #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"9194971d2fb7908a02b02841f18655ccc0908a204c2fa948e8dc7e947269da86", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml")] [global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute] diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/CodeWriterExtensions.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/CodeWriterExtensions.cs index 9f2b6610252..d4a22423152 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/CodeWriterExtensions.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/CodeWriterExtensions.cs @@ -152,15 +152,14 @@ public static CodeWriter WriteUsing(this CodeWriter writer, string name, bool en return writer; } - public static CodeWriter WriteEnhancedLineNumberDirective(this CodeWriter writer, SourceSpan span, int characterOffset) + public static CodeWriter WriteEnhancedLineNumberDirective(this CodeWriter writer, SourceSpan span, int characterOffset = 0) { // All values here need to be offset by 1 since #line uses a 1-indexed numbering system. var lineNumberAsString = (span.LineIndex + 1).ToString(CultureInfo.InvariantCulture); var characterStartAsString = (span.CharacterIndex + 1).ToString(CultureInfo.InvariantCulture); var lineEndAsString = (span.LineIndex + 1 + span.LineCount).ToString(CultureInfo.InvariantCulture); var characterEndAsString = (span.EndCharacterIndex + 1).ToString(CultureInfo.InvariantCulture); - var characterOffsetAsString = characterOffset.ToString(CultureInfo.InvariantCulture); - return writer.Write("#line (") + writer.Write("#line (") .Write(lineNumberAsString) .Write(",") .Write(characterStartAsString) @@ -168,9 +167,16 @@ public static CodeWriter WriteEnhancedLineNumberDirective(this CodeWriter writer .Write(lineEndAsString) .Write(",") .Write(characterEndAsString) - .Write(") ") - .Write(characterOffsetAsString) - .Write(" \"").Write(span.FilePath).WriteLine("\""); + .Write(") "); + + // an offset of zero is indicated by its absence. + if (characterOffset != 0) + { + var characterOffsetAsString = characterOffset.ToString(CultureInfo.InvariantCulture); + writer.Write(characterOffsetAsString).Write(" "); + } + + return writer.Write("\"").Write(span.FilePath).WriteLine("\""); } public static CodeWriter WriteLineNumberDirective(this CodeWriter writer, SourceSpan span) diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/RuntimeNodeWriter.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/RuntimeNodeWriter.cs index b20fff951f8..44e754aafd3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/RuntimeNodeWriter.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/CodeGeneration/RuntimeNodeWriter.cs @@ -4,7 +4,6 @@ #nullable disable using System; -using System.Diagnostics; using System.Globalization; using System.Linq; using System.Text; @@ -34,9 +33,14 @@ public override void WriteUsingDirective(CodeRenderingContext context, UsingDire { if (node.Source.HasValue) { - using (context.CodeWriter.BuildLinePragma(node.Source.Value, context)) + using (context.CodeWriter.BuildEnhancedLinePragma(node.Source.Value, context)) { - context.CodeWriter.WriteUsing(node.Content); + context.AddSourceMappingFor(node); + context.CodeWriter.WriteUsing(node.Content, endLine: node.HasExplicitSemicolon); + } + if (!node.HasExplicitSemicolon) + { + context.CodeWriter.WriteLine(";"); } } else diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentRuntimeNodeWriter.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentRuntimeNodeWriter.cs index 1db2b184c9a..e4c56a272ef 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentRuntimeNodeWriter.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentRuntimeNodeWriter.cs @@ -351,9 +351,14 @@ public override void WriteUsingDirective(CodeRenderingContext context, UsingDire if (node.Source.HasValue) { - using (context.CodeWriter.BuildLinePragma(node.Source.Value, context)) + using (context.CodeWriter.BuildEnhancedLinePragma(node.Source.Value, context)) { - context.CodeWriter.WriteUsing(node.Content); + context.AddSourceMappingFor(node); + context.CodeWriter.WriteUsing(node.Content, endLine: node.HasExplicitSemicolon); + } + if (!node.HasExplicitSemicolon) + { + context.CodeWriter.WriteLine(";"); } } else diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/RouteAttributeExtensionNode.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/RouteAttributeExtensionNode.cs index c83a7c20363..3de043b2074 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/RouteAttributeExtensionNode.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/RouteAttributeExtensionNode.cs @@ -27,7 +27,7 @@ public override void WriteNode(CodeTarget target, CodeRenderingContext context) { context.CodeWriter.WriteLine("("); context.CodeWriter.WriteLine("// language=Route,Component"); - using (context.CodeWriter.BuildEnhancedLinePragma(Source, context, characterOffset: 1)) + using (context.CodeWriter.BuildEnhancedLinePragma(Source, context)) { context.CodeWriter.WritePadding(0, Source, context); context.AddSourceMappingFor(this); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs index 1fbbb2f6bef..39717ae8fd1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs @@ -108,6 +108,7 @@ protected override void ExecuteCore(RazorCodeDocument codeDocument) { Content = reference.Namespace, Source = reference.Source, + HasExplicitSemicolon = reference.HasExplicitSemicolon }; builder.Insert(index++, @using); @@ -236,15 +237,18 @@ private static void PostProcessImportedDirectives(DocumentIntermediateNode docum private struct UsingReference : IEquatable { - public UsingReference(string @namespace, SourceSpan? source) + public UsingReference(string @namespace, SourceSpan? source, bool hasExplicitSemicolon) { Namespace = @namespace; Source = source; + HasExplicitSemicolon = hasExplicitSemicolon; } public string Namespace { get; } public SourceSpan? Source { get; } + public bool HasExplicitSemicolon { get; } + public override bool Equals(object other) { if (other is UsingReference reference) @@ -349,7 +353,7 @@ public override void VisitCSharpStatementLiteral(CSharpStatementLiteralSyntax no case AddImportChunkGenerator importChunkGenerator: var namespaceImport = importChunkGenerator.Namespace.Trim(); var namespaceSpan = BuildSourceSpanFromNode(node); - _usings.Add(new UsingReference(namespaceImport, namespaceSpan)); + _usings.Add(new UsingReference(namespaceImport, namespaceSpan, importChunkGenerator.HasExplicitSemicolon)); break; case AddTagHelperChunkGenerator addTagHelperChunkGenerator: { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Extensions/MetadataAttributeTargetExtension.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Extensions/MetadataAttributeTargetExtension.cs index 72ffe10a179..7ebbed9686c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Extensions/MetadataAttributeTargetExtension.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Extensions/MetadataAttributeTargetExtension.cs @@ -67,7 +67,7 @@ public void WriteRazorCompiledItemMetadataAttribute(CodeRenderingContext context context.CodeWriter.Write("// language="); context.CodeWriter.WriteLine(node.ValueStringSyntax); } - using (context.CodeWriter.BuildEnhancedLinePragma(node.Source, context, characterOffset: 1)) + using (context.CodeWriter.BuildEnhancedLinePragma(node.Source, context)) { context.CodeWriter.WritePadding(0, node.Source, context); context.AddSourceMappingFor(node); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Intermediate/UsingDirectiveIntermediateNode.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Intermediate/UsingDirectiveIntermediateNode.cs index 9c356699e6a..9d9f5a3f90c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Intermediate/UsingDirectiveIntermediateNode.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Intermediate/UsingDirectiveIntermediateNode.cs @@ -13,6 +13,8 @@ public sealed class UsingDirectiveIntermediateNode : IntermediateNode public string Content { get; set; } + public bool HasExplicitSemicolon { get; set; } + public override void Accept(IntermediateNodeVisitor visitor) { if (visitor == null) diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/AddImportChunkGenerator.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/AddImportChunkGenerator.cs index c23a5d5575a..97de9f79a2b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/AddImportChunkGenerator.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/AddImportChunkGenerator.cs @@ -9,11 +9,12 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy; internal class AddImportChunkGenerator : SpanChunkGenerator { - public AddImportChunkGenerator(string usingContent, string parsedNamespace, bool isStatic) + public AddImportChunkGenerator(string usingContent, string parsedNamespace, bool isStatic, bool hasExplicitSemicolon) { Namespace = usingContent; ParsedNamespace = parsedNamespace; IsStatic = isStatic; + HasExplicitSemicolon = hasExplicitSemicolon; } public string Namespace { get; } @@ -22,6 +23,8 @@ public AddImportChunkGenerator(string usingContent, string parsedNamespace, bool public bool IsStatic { get; } + public bool HasExplicitSemicolon { get; } + public override string ToString() { return "Import:" + Namespace + ";"; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs index f3e87fb67df..b4fcadac3c4 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs @@ -2377,17 +2377,20 @@ private void ParseUsingDeclaration(in SyntaxListBuilder builder .Where(s => s.Kind != SyntaxKind.CSharpComment && s.Kind != SyntaxKind.Whitespace && s.Kind != SyntaxKind.NewLine); SetAcceptedCharacters(AcceptedCharactersInternal.AnyExceptNewline); - chunkGenerator = new AddImportChunkGenerator( - string.Concat(usingContentTokens.Select(s => s.Content)), - string.Concat(parsedNamespaceTokens.Select(s => s.Content)), - isStatic); // Optional ";" + bool hasExplicitSemicolon = false; if (EnsureCurrent()) { - TryAccept(SyntaxKind.Semicolon); + hasExplicitSemicolon = TryAccept(SyntaxKind.Semicolon); } + chunkGenerator = new AddImportChunkGenerator( + string.Concat(usingContentTokens.Select(s => s.Content)), + string.Concat(parsedNamespaceTokens.Select(s => s.Content)), + isStatic, + hasExplicitSemicolon); + CompleteBlock(); Debug.Assert(directiveBuilder.Count == 0, "We should not have built any blocks so far."); var keywordTokens = OutputTokensAsStatementLiteral(); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/PublicAPI.Unshipped.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/PublicAPI.Unshipped.txt index 2ab6783a616..4337b424db8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/PublicAPI.Unshipped.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/PublicAPI.Unshipped.txt @@ -128,6 +128,8 @@ Microsoft.AspNetCore.Razor.Language.Intermediate.TypeParameter.ConstraintsSource Microsoft.AspNetCore.Razor.Language.Intermediate.TypeParameter.ConstraintsSource.init -> void Microsoft.AspNetCore.Razor.Language.Intermediate.TypeParameter.ParameterNameSource.get -> Microsoft.AspNetCore.Razor.Language.SourceSpan? Microsoft.AspNetCore.Razor.Language.Intermediate.TypeParameter.ParameterNameSource.init -> void +Microsoft.AspNetCore.Razor.Language.Intermediate.UsingDirectiveIntermediateNode.HasExplicitSemicolon.get -> bool +Microsoft.AspNetCore.Razor.Language.Intermediate.UsingDirectiveIntermediateNode.HasExplicitSemicolon.set -> void Microsoft.AspNetCore.Razor.Language.ITagHelperDescriptorProvider Microsoft.AspNetCore.Razor.Language.ITagHelperDescriptorProvider.Execute(Microsoft.AspNetCore.Razor.Language.TagHelperDescriptorProviderContext! context) -> void Microsoft.AspNetCore.Razor.Language.ITagHelperDescriptorProvider.Order.get -> int diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs index 988d196f19a..86db8d69d66 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs @@ -62,12 +62,13 @@ public void WriteUsingDirective_WithSource_WritesContentWithLinePragma() Assert.Equal( @" #nullable restore -#line 1 ""test.cshtml"" -using System; +#line (1,1)-(1,1) ""test.cshtml"" +using System #line default #line hidden #nullable disable +; ", csharp, ignoreLineEndingDifferences: true); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs index f81c9003b8c..a8cec10b837 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs @@ -4718,6 +4718,19 @@ @using static Test2.SomeComponent AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); CompileToAssembly(generated, throwOnFailure: false); } + + [IntegrationTestFact] + public void Component_WithMultipleUsingDirectives() + { + var generated = CompileToCSharp(@" +@using System.IO ;@using Microsoft.AspNetCore.Components +; @using System.Reflection;"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } [IntegrationTestFact] public void ChildContent_FromAnotherNamespace() @@ -10719,7 +10732,7 @@ @using Microsoft.AspNetCore.Components.Web ? Diagnostic(ErrorCode.ERR_NoCorrespondingArgument, "TypeCheck").WithArguments("value", "Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck(T)").WithLocation(39, 85) // (34,105): error CS7036: There is no argument given that corresponds to the required parameter 'value' of 'RuntimeHelpers.TypeCheck(T)' // string __formName = global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck(); - : Diagnostic(ErrorCode.ERR_NoCorrespondingArgument, "TypeCheck").WithArguments("value", "Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck(T)").WithLocation(34, 105)); + : Diagnostic(ErrorCode.ERR_NoCorrespondingArgument, "TypeCheck").WithArguments("value", "Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck(T)").WithLocation(35, 105)); } [IntegrationTestFact, WorkItem("https://github.com/dotnet/razor/issues/9077")] diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs index 26b972c2476..0360fdf5e9e 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs @@ -6,12 +6,13 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles { #line hidden #nullable restore -#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" -using System.Collections.Generic; +#line (1,2)-(2,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +using System.Collections.Generic #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"4c55c366b179d82f3d2800004985646e9bf0edbf993e2f4a94cbb70079823905", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml")] public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp8_Runtime { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs index c90796a270a..5be338bfc4b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs @@ -6,47 +6,53 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles { #line hidden #nullable restore -#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" -using System.IO; +#line (1,2)-(2,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using System.IO #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" -using Foo = System.Text.Encoding; +#line (2,2)-(3,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using Foo = System.Text.Encoding #line default #line hidden #nullable disable + ; #nullable restore -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" -using System; +#line (3,2)-(4,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using System #line default #line hidden #nullable disable + ; #nullable restore -#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" -using static System; +#line (5,2)-(6,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static System #line default #line hidden #nullable disable + ; #nullable restore -#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" -using static System.Console; +#line (6,2)-(7,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static System.Console #line default #line hidden #nullable disable + ; #nullable restore -#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" -using static global::System.Text.Encoding; +#line (7,2)-(8,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static global::System.Text.Encoding #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"f52e72ba69034334ab681d1f5e91cd50788cbfc0d1390104ee1e60d95d4ca443", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml")] public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Usings_Runtime { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.codegen.cs new file mode 100644 index 00000000000..1fab8a95aef --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.codegen.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable 1591 +namespace Test +{ + #line hidden + using global::System; + using global::System.Collections.Generic; + using global::System.Linq; + using global::System.Threading.Tasks; +#nullable restore +#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +using System.IO; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Reflection; + +#line default +#line hidden +#nullable disable + public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) + { + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.ir.txt new file mode 100644 index 00000000000..16e6cdc47f2 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.ir.txt @@ -0,0 +1,22 @@ +Document - + NamespaceDeclaration - - Test + UsingDirective - (3:1,1 [20] ) - global::System + UsingDirective - (26:2,1 [40] ) - global::System.Collections.Generic + UsingDirective - (69:3,1 [25] ) - global::System.Linq + UsingDirective - (97:4,1 [36] ) - global::System.Threading.Tasks + UsingDirective - (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml) - System.IO + UsingDirective - (19:0,19 [37] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components + UsingDirective - (61:1,3 [24] x:\dir\subdir\Test\TestComponent.cshtml) - System.Reflection + ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - protected override - void - BuildRenderTree + HtmlContent - (16:0,16 [2] x:\dir\subdir\Test\TestComponent.cshtml) + LazyIntermediateToken - (16:0,16 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ; + HtmlContent - (56:0,56 [4] x:\dir\subdir\Test\TestComponent.cshtml) + LazyIntermediateToken - (56:0,56 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.mappings.txt new file mode 100644 index 00000000000..9f6d5754c64 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.mappings.txt @@ -0,0 +1,15 @@ +Source Location: (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.IO| +Generated Location: (308:11,0 [15] ) +|using System.IO| + +Source Location: (19:0,19 [37] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components| +Generated Location: (446:18,0 [37] ) +|using Microsoft.AspNetCore.Components| + +Source Location: (61:1,3 [24] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Reflection;| +Generated Location: (606:25,0 [24] ) +|using System.Reflection;| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs index abeb2e36156..1e0c98547fd 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs @@ -8,19 +8,21 @@ namespace Test using global::System.Linq; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Threading.Tasks; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Threading.Tasks #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt index c22774f1b6c..c9a4334d8e9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt @@ -1,5 +1,19 @@ -Source Location: (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Threading.Tasks +| +Generated Location: (327:11,0 [30] ) +|using System.Threading.Tasks +| + +Source Location: (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (494:19,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) |async (e) => await Task.Delay(10)| -Generated Location: (1165:32,19 [33] ) +Generated Location: (1197:34,19 [33] ) |async (e) => await Task.Delay(10)| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs index ef0e1473a9c..a0ddb303ab5 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs @@ -8,19 +8,21 @@ namespace Test using global::System.Linq; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Threading.Tasks; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Threading.Tasks #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt index 49cc55d071a..f0861dfe585 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt @@ -1,6 +1,20 @@ -Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Threading.Tasks +| +Generated Location: (327:11,0 [30] ) +|using System.Threading.Tasks +| + +Source Location: (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (494:19,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1163:32,17 [7] ) +Generated Location: (1195:34,17 [7] ) |OnClick| Source Location: (112:3,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) @@ -10,7 +24,7 @@ Source Location: (112:3,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) return Task.CompletedTask; } | -Generated Location: (1404:43,7 [88] ) +Generated Location: (1436:45,7 [88] ) | Task OnClick(MouseEventArgs e) { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs index 1ff6ac74885..38026721853 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs @@ -8,19 +8,21 @@ namespace Test using global::System.Linq; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Threading.Tasks; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Threading.Tasks #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt index 1670c8ac137..aedcd087303 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt @@ -1,5 +1,19 @@ -Source Location: (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Threading.Tasks +| +Generated Location: (327:11,0 [30] ) +|using System.Threading.Tasks +| + +Source Location: (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (494:19,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) |async () => await Task.Delay(10)| -Generated Location: (1165:32,19 [32] ) +Generated Location: (1197:34,19 [32] ) |async () => await Task.Delay(10)| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs index 7986a765c6f..68b984963d2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs @@ -8,19 +8,21 @@ namespace Test using global::System.Linq; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Threading.Tasks; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Threading.Tasks #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt index 046394e2bb6..ddae5a50cee 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt @@ -1,6 +1,20 @@ -Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Threading.Tasks +| +Generated Location: (327:11,0 [30] ) +|using System.Threading.Tasks +| + +Source Location: (32:1,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (494:19,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1163:32,17 [7] ) +Generated Location: (1195:34,17 [7] ) |OnClick| Source Location: (112:3,7 [72] x:\dir\subdir\Test\TestComponent.cshtml) @@ -10,7 +24,7 @@ Source Location: (112:3,7 [72] x:\dir\subdir\Test\TestComponent.cshtml) return Task.CompletedTask; } | -Generated Location: (1404:43,7 [72] ) +Generated Location: (1436:45,7 [72] ) | Task OnClick() { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.codegen.cs index 459a18dc967..6f1b304d940 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Globalization; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Globalization #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.mappings.txt index f29884dd311..42c8e5c6e7c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithCulture/TestComponent.mappings.txt @@ -1,18 +1,25 @@ -Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Globalization +| +Generated Location: (370:12,0 [28] ) +|using System.Globalization +| + +Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (969:26,19 [11] ) +Generated Location: (985:27,19 [11] ) |ParentValue| Source Location: (111:1,82 [28] x:\dir\subdir\Test\TestComponent.cshtml) |CultureInfo.InvariantCulture| -Generated Location: (1209:34,82 [28] ) +Generated Location: (1225:35,82 [28] ) |CultureInfo.InvariantCulture| Source Location: (152:2,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1748:47,7 [55] ) +Generated Location: (1764:48,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.codegen.cs index 5b054f54830..d7f390a7301 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Globalization; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Globalization #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.mappings.txt index bb0184dac98..81bf2f28704 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithCulture/TestComponent.mappings.txt @@ -1,18 +1,25 @@ -Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Globalization +| +Generated Location: (370:12,0 [28] ) +|using System.Globalization +| + +Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (971:26,19 [11] ) +Generated Location: (987:27,19 [11] ) |ParentValue| Source Location: (115:1,86 [28] x:\dir\subdir\Test\TestComponent.cshtml) |CultureInfo.InvariantCulture| -Generated Location: (1215:34,86 [28] ) +Generated Location: (1231:35,86 [28] ) |CultureInfo.InvariantCulture| Source Location: (156:2,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1760:47,7 [55] ) +Generated Location: (1776:48,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.codegen.cs index 0ffb419f3a6..88a4de0a601 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Globalization; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Globalization #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.mappings.txt index fa8d5d5bbc6..d46f6e45956 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture/TestComponent.mappings.txt @@ -1,13 +1,20 @@ -Source Location: (64:1,35 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Globalization +| +Generated Location: (370:12,0 [28] ) +|using System.Globalization +| + +Source Location: (64:1,35 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1045:27,35 [11] ) +Generated Location: (1061:28,35 [11] ) |ParentValue| Source Location: (121:2,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } | -Generated Location: (1532:40,7 [44] ) +Generated Location: (1548:41,7 [44] ) | public int ParentValue { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.codegen.cs index d6ebdbef124..02b244d1af7 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Globalization; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Globalization #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.mappings.txt index 09b744da230..cd0ed60ba28 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToInputElementWithDefaultCulture_Override/TestComponent.mappings.txt @@ -1,18 +1,25 @@ -Source Location: (64:1,35 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Globalization +| +Generated Location: (370:12,0 [28] ) +|using System.Globalization +| + +Source Location: (64:1,35 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1045:27,35 [11] ) +Generated Location: (1061:28,35 [11] ) |ParentValue| Source Location: (131:1,102 [26] x:\dir\subdir\Test\TestComponent.cshtml) |CultureInfo.CurrentCulture| -Generated Location: (1305:35,102 [26] ) +Generated Location: (1321:36,102 [26] ) |CultureInfo.CurrentCulture| Source Location: (170:2,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } | -Generated Location: (1844:48,7 [44] ) +Generated Location: (1860:49,7 [44] ) | public int ParentValue { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs index aa06a66ebf8..65baa87976d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt index eb515a928ec..e7299321d56 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_CanOverrideEvent/TestComponent.mappings.txt @@ -1,13 +1,20 @@ -Source Location: (59:1,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (59:1,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) |CurrentDate| -Generated Location: (982:26,15 [11] ) +Generated Location: (998:27,15 [11] ) |CurrentDate| Source Location: (126:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | -Generated Location: (1498:39,7 [77] ) +Generated Location: (1514:40,7 [77] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs index a4228b37d97..eb11ac1e39c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt index 14d8e76752f..ba99d26d7d4 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithSuffix/TestComponent.mappings.txt @@ -1,13 +1,20 @@ -Source Location: (65:1,21 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (65:1,21 [11] x:\dir\subdir\Test\TestComponent.cshtml) |CurrentDate| -Generated Location: (988:26,21 [11] ) +Generated Location: (1004:27,21 [11] ) |CurrentDate| Source Location: (116:2,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | -Generated Location: (1505:39,7 [77] ) +Generated Location: (1521:40,7 [77] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs index edcddb66bba..e164eb7ac06 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs @@ -9,7 +9,7 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Models; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.mappings.txt index 26eda138b85..83069e5c9b6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (57:2,39 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml) +|using Models; +| +Generated Location: (370:12,0 [15] ) +|using Models; +| + +Source Location: (57:2,39 [30] x:\dir\subdir\Test\TestComponent.cshtml) |Array.Empty()| -Generated Location: (949:26,39 [30] ) +Generated Location: (959:26,39 [30] ) |Array.Empty()| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs index 7f0e70d69cd..8fda9912bc4 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs @@ -9,7 +9,7 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Models; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.mappings.txt index dc11a78dbe2..1c02a2d45c7 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (55:1,39 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml) +|using Models; +| +Generated Location: (370:12,0 [15] ) +|using Models; +| + +Source Location: (55:1,39 [30] x:\dir\subdir\Test\TestComponent.cshtml) |Array.Empty()| -Generated Location: (949:26,39 [30] ) +Generated Location: (959:26,39 [30] ) |Array.Empty()| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.codegen.cs index ab60035e3b7..2274a816997 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.codegen.cs @@ -9,7 +9,7 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components.Rendering; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.mappings.txt index 03874436381..2f90c9d5731 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (55:2,2 [34] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [50] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Rendering; +| +Generated Location: (370:12,0 [50] ) +|using Microsoft.AspNetCore.Components.Rendering; +| + +Source Location: (55:2,2 [34] x:\dir\subdir\Test\TestComponent.cshtml) | RenderChildComponent(__builder); | -Generated Location: (812:24,2 [34] ) +Generated Location: (822:24,2 [34] ) | RenderChildComponent(__builder); | Source Location: (101:4,7 [69] x:\dir\subdir\Test\TestComponent.cshtml) @@ -8,7 +15,7 @@ Source Location: (101:4,7 [69] x:\dir\subdir\Test\TestComponent.cshtml) void RenderChildComponent(RenderTreeBuilder __builder) { | -Generated Location: (1024:33,7 [69] ) +Generated Location: (1034:33,7 [69] ) | void RenderChildComponent(RenderTreeBuilder __builder) { @@ -17,7 +24,7 @@ Generated Location: (1024:33,7 [69] ) Source Location: (195:8,0 [7] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (1313:44,0 [7] ) +Generated Location: (1323:44,0 [7] ) | } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.codegen.cs index 7371add42a6..0e566af9574 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.codegen.cs @@ -9,7 +9,7 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components.RenderTree; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.mappings.txt index 56dfb534ed6..916df780b6f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.mappings.txt @@ -1,9 +1,16 @@ -Source Location: (54:1,2 [42] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [51] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.RenderTree; +| +Generated Location: (370:12,0 [51] ) +|using Microsoft.AspNetCore.Components.RenderTree; +| + +Source Location: (54:1,2 [42] x:\dir\subdir\Test\TestComponent.cshtml) | void RenderChildComponent() { | -Generated Location: (813:24,2 [42] ) +Generated Location: (823:24,2 [42] ) | void RenderChildComponent() { @@ -12,12 +19,12 @@ Generated Location: (813:24,2 [42] ) Source Location: (121:5,0 [7] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (1083:35,0 [7] ) +Generated Location: (1093:35,0 [7] ) | } | Source Location: (135:8,2 [25] x:\dir\subdir\Test\TestComponent.cshtml) | RenderChildComponent(); | -Generated Location: (1212:42,2 [25] ) +Generated Location: (1222:42,2 [25] ) | RenderChildComponent(); | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.codegen.cs index b7b7c069760..3c28dc49a23 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.codegen.cs @@ -11,7 +11,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (1,7)-(1,16) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,7)-(1,16) "x:\dir\subdir\Test\TestComponent.cshtml" "/MyPage" #line default @@ -21,7 +21,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (2,7)-(2,27) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (2,7)-(2,27) "x:\dir\subdir\Test\TestComponent.cshtml" "/AnotherRoute/{id}" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.mappings.txt index 87f4004b9ea..4d8942f6ecd 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.mappings.txt @@ -1,10 +1,10 @@ Source Location: (6:0,6 [9] x:\dir\subdir\Test\TestComponent.cshtml) |"/MyPage"| -Generated Location: (474:14,6 [9] ) +Generated Location: (472:14,6 [9] ) |"/MyPage"| Source Location: (23:1,6 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"/AnotherRoute/{id}"| -Generated Location: (727:24,6 [20] ) +Generated Location: (723:24,6 [20] ) |"/AnotherRoute/{id}"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs index 59771751e82..3a779597f8b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt index 0b41aead8ad..47156a13e70 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt @@ -1,13 +1,20 @@ -Source Location: (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1095:26,26 [7] ) +Generated Location: (1111:27,26 [7] ) |OnClick| Source Location: (92:3,7 [60] x:\dir\subdir\Test\TestComponent.cshtml) | private Action OnClick { get; set; } | -Generated Location: (1338:37,7 [60] ) +Generated Location: (1354:38,7 [60] ) | private Action OnClick { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.codegen.cs index 46499d30e13..0e888dd2a93 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using AnotherTest; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using AnotherTest #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.mappings.txt index b0710a15146..63e22eb2ca5 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (119:6,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [19] x:\dir\subdir\Test\TestComponent.cshtml) +|using AnotherTest +| +Generated Location: (370:12,0 [19] ) +|using AnotherTest +| + +Source Location: (119:6,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) |context| -Generated Location: (1422:33,25 [7] ) +Generated Location: (1438:34,25 [7] ) |context| Source Location: (276:12,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) |context| -Generated Location: (2327:53,26 [7] ) +Generated Location: (2343:54,26 [7] ) |context| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.codegen.cs index da5cc0aaba7..49316af7e10 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.codegen.cs @@ -9,19 +9,21 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\_Imports.razor" -using System.Text; +#line (1,2)-(2,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Text #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\_Imports.razor" -using System.Reflection; +#line (2,2)-(3,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Reflection #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Components.LayoutAttribute(typeof(MainLayout))] public partial class _Imports : System.Object { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.mappings.txt index 5a065a62eea..2f8ff9dedaf 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.mappings.txt @@ -1,5 +1,19 @@ -Source Location: (69:4,1 [3] x:\dir\subdir\Test\_Imports.razor) +Source Location: (1:0,1 [19] x:\dir\subdir\Test\_Imports.razor) +|using System.Text +| +Generated Location: (364:12,0 [19] ) +|using System.Text +| + +Source Location: (21:1,1 [25] x:\dir\subdir\Test\_Imports.razor) +|using System.Reflection +| +Generated Location: (514:20,0 [25] ) +|using System.Reflection +| + +Source Location: (69:4,1 [3] x:\dir\subdir\Test\_Imports.razor) |Foo| -Generated Location: (889:32,24 [3] ) +Generated Location: (921:34,24 [3] ) |Foo| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.codegen.cs index a636a479aeb..04268223ae3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.codegen.cs @@ -8,7 +8,7 @@ namespace Test using global::System.Linq; using global::System.Threading.Tasks; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.mappings.txt index ea898a79643..154ee8287db 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/TestComponent.mappings.txt @@ -1,51 +1,58 @@ -Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components; +| +Generated Location: (318:11,0 [40] ) +|using Microsoft.AspNetCore.Components; +| + +Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem1| -Generated Location: (509:19,0 [6] ) +Generated Location: (519:19,0 [6] ) |TItem1| Source Location: (92:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem2| -Generated Location: (644:27,0 [6] ) +Generated Location: (654:27,0 [6] ) |TItem2| Source Location: (131:3,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem3| -Generated Location: (779:35,0 [6] ) +Generated Location: (789:35,0 [6] ) |TItem3| Source Location: (59:1,18 [20] x:\dir\subdir\Test\TestComponent.cshtml) |where TItem1 : Image| -Generated Location: (970:43,0 [20] ) +Generated Location: (980:43,0 [20] ) |where TItem1 : Image| Source Location: (99:2,18 [19] x:\dir\subdir\Test\TestComponent.cshtml) |where TItem2 : ITag| -Generated Location: (1112:50,0 [19] ) +Generated Location: (1122:50,0 [19] ) |where TItem2 : ITag| Source Location: (138:3,18 [27] x:\dir\subdir\Test\TestComponent.cshtml) |where TItem3 : Image, new()| -Generated Location: (1253:57,0 [27] ) +Generated Location: (1263:57,0 [27] ) |where TItem3 : Image, new()| Source Location: (186:6,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) |foreach (var item2 in Items2) { | -Generated Location: (1649:69,1 [34] ) +Generated Location: (1659:69,1 [34] ) |foreach (var item2 in Items2) { | Source Location: (234:9,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(item2)| -Generated Location: (1887:78,24 [19] ) +Generated Location: (1897:78,24 [19] ) |ChildContent(item2)| Source Location: (266:11,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (2127:87,0 [3] ) +Generated Location: (2137:87,0 [3] ) |} | @@ -56,7 +63,7 @@ Source Location: (294:15,7 [236] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public TItem3 Item3 { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } | -Generated Location: (2367:97,7 [236] ) +Generated Location: (2377:97,7 [236] ) | [Parameter] public TItem1 Item1 { get; set; } [Parameter] public List Items2 { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs index b9b03144876..32a5dd0a0b8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\UseTestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\UseTestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class UseTestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.mappings.txt index 6133b6a9091..8294556140b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.mappings.txt @@ -1,21 +1,28 @@ -Source Location: (35:1,22 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\UseTestComponent.cshtml) +|using Test +| +Generated Location: (373:12,0 [12] ) +|using Test +| + +Source Location: (35:1,22 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |item1| -Generated Location: (910:25,22 [5] ) +Generated Location: (926:26,22 [5] ) |item1| Source Location: (49:1,36 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |items| -Generated Location: (1095:33,36 [5] ) +Generated Location: (1111:34,36 [5] ) |items| Source Location: (62:1,49 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |item1| -Generated Location: (1293:41,49 [5] ) +Generated Location: (1309:42,49 [5] ) |item1| Source Location: (78:2,8 [7] x:\dir\subdir\Test\UseTestComponent.cshtml) |context| -Generated Location: (1560:50,25 [7] ) +Generated Location: (1576:51,25 [7] ) |context| Source Location: (118:5,7 [268] x:\dir\subdir\Test\UseTestComponent.cshtml) @@ -25,7 +32,7 @@ Source Location: (118:5,7 [268] x:\dir\subdir\Test\UseTestComponent.cshtml) static Tag tag2 = new Tag() { description = "Another description."}; List items = new List() { tag1, tag2 }; | -Generated Location: (1825:62,7 [268] ) +Generated Location: (1841:63,7 [268] ) | Image item1 = new Image() { id = 1, url="https://example.com"}; static Tag tag1 = new Tag() { description = "A description."}; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.codegen.cs index a636a479aeb..04268223ae3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.codegen.cs @@ -8,7 +8,7 @@ namespace Test using global::System.Linq; using global::System.Threading.Tasks; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.mappings.txt index da1532bcee3..3a9597dca41 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.mappings.txt @@ -1,51 +1,58 @@ -Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components; +| +Generated Location: (318:11,0 [40] ) +|using Microsoft.AspNetCore.Components; +| + +Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem1| -Generated Location: (509:19,0 [6] ) +Generated Location: (519:19,0 [6] ) |TItem1| Source Location: (93:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem2| -Generated Location: (644:27,0 [6] ) +Generated Location: (654:27,0 [6] ) |TItem2| Source Location: (133:3,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem3| -Generated Location: (779:35,0 [6] ) +Generated Location: (789:35,0 [6] ) |TItem3| Source Location: (59:1,18 [20] x:\dir\subdir\Test\TestComponent.cshtml) |where TItem1 : Image| -Generated Location: (970:43,0 [20] ) +Generated Location: (980:43,0 [20] ) |where TItem1 : Image| Source Location: (100:2,18 [19] x:\dir\subdir\Test\TestComponent.cshtml) |where TItem2 : ITag| -Generated Location: (1112:50,0 [19] ) +Generated Location: (1122:50,0 [19] ) |where TItem2 : ITag| Source Location: (140:3,18 [27] x:\dir\subdir\Test\TestComponent.cshtml) |where TItem3 : Image, new()| -Generated Location: (1253:57,0 [27] ) +Generated Location: (1263:57,0 [27] ) |where TItem3 : Image, new()| Source Location: (189:6,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) |foreach (var item2 in Items2) { | -Generated Location: (1649:69,1 [34] ) +Generated Location: (1659:69,1 [34] ) |foreach (var item2 in Items2) { | Source Location: (237:9,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(item2)| -Generated Location: (1887:78,24 [19] ) +Generated Location: (1897:78,24 [19] ) |ChildContent(item2)| Source Location: (269:11,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (2127:87,0 [3] ) +Generated Location: (2137:87,0 [3] ) |} | @@ -56,7 +63,7 @@ Source Location: (297:15,7 [236] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public TItem3 Item3 { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } | -Generated Location: (2367:97,7 [236] ) +Generated Location: (2377:97,7 [236] ) | [Parameter] public TItem1 Item1 { get; set; } [Parameter] public List Items2 { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs index b9b03144876..32a5dd0a0b8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\UseTestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\UseTestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class UseTestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.mappings.txt index 6133b6a9091..8294556140b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.mappings.txt @@ -1,21 +1,28 @@ -Source Location: (35:1,22 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\UseTestComponent.cshtml) +|using Test +| +Generated Location: (373:12,0 [12] ) +|using Test +| + +Source Location: (35:1,22 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |item1| -Generated Location: (910:25,22 [5] ) +Generated Location: (926:26,22 [5] ) |item1| Source Location: (49:1,36 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |items| -Generated Location: (1095:33,36 [5] ) +Generated Location: (1111:34,36 [5] ) |items| Source Location: (62:1,49 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |item1| -Generated Location: (1293:41,49 [5] ) +Generated Location: (1309:42,49 [5] ) |item1| Source Location: (78:2,8 [7] x:\dir\subdir\Test\UseTestComponent.cshtml) |context| -Generated Location: (1560:50,25 [7] ) +Generated Location: (1576:51,25 [7] ) |context| Source Location: (118:5,7 [268] x:\dir\subdir\Test\UseTestComponent.cshtml) @@ -25,7 +32,7 @@ Source Location: (118:5,7 [268] x:\dir\subdir\Test\UseTestComponent.cshtml) static Tag tag2 = new Tag() { description = "Another description."}; List items = new List() { tag1, tag2 }; | -Generated Location: (1825:62,7 [268] ) +Generated Location: (1841:63,7 [268] ) | Image item1 = new Image() { id = 1, url="https://example.com"}; static Tag tag1 = new Tag() { description = "A description."}; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.codegen.cs index 3ad9d4727ea..e7316078b15 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.codegen.cs @@ -8,7 +8,7 @@ namespace Test using global::System.Linq; using global::System.Threading.Tasks; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.mappings.txt index 7265b12f2c9..636b6eed93a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/TestComponent.mappings.txt @@ -1,37 +1,44 @@ -Source Location: (52:1,11 [5] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components; +| +Generated Location: (318:11,0 [40] ) +|using Microsoft.AspNetCore.Components; +| + +Source Location: (52:1,11 [5] x:\dir\subdir\Test\TestComponent.cshtml) |TItem| -Generated Location: (509:19,0 [5] ) +Generated Location: (519:19,0 [5] ) |TItem| Source Location: (82:5,4 [20] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(Items1)| -Generated Location: (1034:33,24 [20] ) +Generated Location: (1044:33,24 [20] ) |ChildContent(Items1)| Source Location: (111:7,1 [33] x:\dir\subdir\Test\TestComponent.cshtml) |foreach (var item in Items2) { | -Generated Location: (1218:41,1 [33] ) +Generated Location: (1228:41,1 [33] ) |foreach (var item in Items2) { | Source Location: (152:9,8 [18] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(item)| -Generated Location: (1455:50,24 [18] ) +Generated Location: (1465:50,24 [18] ) |ChildContent(item)| Source Location: (176:10,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (1637:58,0 [3] ) +Generated Location: (1647:58,0 [3] ) |} | Source Location: (185:12,4 [22] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(Items3())| -Generated Location: (1844:66,24 [22] ) +Generated Location: (1854:66,24 [22] ) |ChildContent(Items3())| Source Location: (222:14,7 [248] x:\dir\subdir\Test\TestComponent.cshtml) @@ -41,7 +48,7 @@ Source Location: (222:14,7 [248] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public Func Items3 { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } | -Generated Location: (2086:76,7 [248] ) +Generated Location: (2096:76,7 [248] ) | [Parameter] public TItem[] Items1 { get; set; } [Parameter] public List Items2 { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs index d1fb95e8662..4bcc2499240 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\UseTestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\UseTestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class UseTestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.mappings.txt index 368cfa60fdc..11dec4b766d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.mappings.txt @@ -1,21 +1,28 @@ -Source Location: (35:1,22 [6] x:\dir\subdir\Test\UseTestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\UseTestComponent.cshtml) +|using Test +| +Generated Location: (373:12,0 [12] ) +|using Test +| + +Source Location: (35:1,22 [6] x:\dir\subdir\Test\UseTestComponent.cshtml) |items1| -Generated Location: (910:25,22 [6] ) +Generated Location: (926:26,22 [6] ) |items1| Source Location: (49:1,36 [6] x:\dir\subdir\Test\UseTestComponent.cshtml) |items2| -Generated Location: (1096:33,36 [6] ) +Generated Location: (1112:34,36 [6] ) |items2| Source Location: (63:1,50 [6] x:\dir\subdir\Test\UseTestComponent.cshtml) |items3| -Generated Location: (1296:41,50 [6] ) +Generated Location: (1312:42,50 [6] ) |items3| Source Location: (80:2,8 [22] x:\dir\subdir\Test\UseTestComponent.cshtml) |context[0].description| -Generated Location: (1564:50,25 [22] ) +Generated Location: (1580:51,25 [22] ) |context[0].description| Source Location: (135:5,7 [208] x:\dir\subdir\Test\UseTestComponent.cshtml) @@ -25,7 +32,7 @@ Source Location: (135:5,7 [208] x:\dir\subdir\Test\UseTestComponent.cshtml) List items2 = new List() { new [] { tag } }; Tag[] items3() => new [] { tag }; | -Generated Location: (1844:62,7 [208] ) +Generated Location: (1860:63,7 [208] ) | static Tag tag = new Tag() { description = "A description."}; Tag[] items1 = new [] { tag }; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.codegen.cs index 73ccbd74780..f40f6fbc26e 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.codegen.cs @@ -8,7 +8,7 @@ namespace Test using global::System.Linq; using global::System.Threading.Tasks; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.mappings.txt index 31a1105ca96..50068be9701 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/TestComponent.mappings.txt @@ -1,36 +1,43 @@ -Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components; +| +Generated Location: (318:11,0 [40] ) +|using Microsoft.AspNetCore.Components; +| + +Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem1| -Generated Location: (509:19,0 [6] ) +Generated Location: (519:19,0 [6] ) |TItem1| Source Location: (71:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem2| -Generated Location: (644:27,0 [6] ) +Generated Location: (654:27,0 [6] ) |TItem2| Source Location: (102:6,4 [19] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(Item1)| -Generated Location: (1170:41,24 [19] ) +Generated Location: (1180:41,24 [19] ) |ChildContent(Item1)| Source Location: (130:8,1 [33] x:\dir\subdir\Test\TestComponent.cshtml) |foreach (var item in Items2) { | -Generated Location: (1353:49,1 [33] ) +Generated Location: (1363:49,1 [33] ) |foreach (var item in Items2) { | Source Location: (171:10,8 [18] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(item)| -Generated Location: (1590:58,24 [18] ) +Generated Location: (1600:58,24 [18] ) |ChildContent(item)| Source Location: (195:11,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (1772:66,0 [3] ) +Generated Location: (1782:66,0 [3] ) |} | @@ -40,7 +47,7 @@ Source Location: (207:13,7 [215] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public List<(TItem1, TItem2)> Items2 { get; set; } [Parameter] public RenderFragment<(TItem1, TItem2)> ChildContent { get; set; } | -Generated Location: (1952:75,7 [215] ) +Generated Location: (1962:75,7 [215] ) | [Parameter] public (TItem1, TItem2) Item1 { get; set; } [Parameter] public List<(TItem1, TItem2)> Items2 { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs index dc8fe5630a9..b1b2dc6f674 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\UseTestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\UseTestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class UseTestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.mappings.txt index 5a6c2de6fb6..a2aa7bbb51d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.mappings.txt @@ -1,16 +1,23 @@ -Source Location: (34:1,21 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\UseTestComponent.cshtml) +|using Test +| +Generated Location: (373:12,0 [12] ) +|using Test +| + +Source Location: (34:1,21 [5] x:\dir\subdir\Test\UseTestComponent.cshtml) |item1| -Generated Location: (909:25,21 [5] ) +Generated Location: (925:26,21 [5] ) |item1| Source Location: (47:1,34 [6] x:\dir\subdir\Test\UseTestComponent.cshtml) |items2| -Generated Location: (1092:33,34 [6] ) +Generated Location: (1108:34,34 [6] ) |items2| Source Location: (64:2,8 [7] x:\dir\subdir\Test\UseTestComponent.cshtml) |context| -Generated Location: (1360:42,25 [7] ) +Generated Location: (1376:43,25 [7] ) |context| Source Location: (104:5,7 [176] x:\dir\subdir\Test\UseTestComponent.cshtml) @@ -19,7 +26,7 @@ Source Location: (104:5,7 [176] x:\dir\subdir\Test\UseTestComponent.cshtml) static (string, int) item2 = ("Another string", 42); List<(string, int)> items2 = new List<(string, int)>() { item2 }; | -Generated Location: (1625:54,7 [176] ) +Generated Location: (1641:55,7 [176] ) | (string, int) item1 = ("A string", 42); static (string, int) item2 = ("Another string", 42); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs index 1ad1e303a63..689b1a271b9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using N; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using N #line default #line hidden #nullable disable + ; public partial class TestComponent< #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.mappings.txt index f5e3015203e..5fb91892062 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.mappings.txt @@ -1,21 +1,28 @@ -Source Location: (21:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [9] x:\dir\subdir\Test\TestComponent.cshtml) +|using N +| +Generated Location: (370:12,0 [9] ) +|using N +| + +Source Location: (21:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TParam| -Generated Location: (531:20,0 [6] ) +Generated Location: (547:21,0 [6] ) |TParam| Source Location: (239:11,27 [1] x:\dir\subdir\Test\TestComponent.cshtml) |1| -Generated Location: (1037:33,27 [1] ) +Generated Location: (1053:34,27 [1] ) |1| Source Location: (269:13,9 [20] x:\dir\subdir\Test\TestComponent.cshtml) |context.I1.MyClassId| -Generated Location: (1251:41,25 [20] ) +Generated Location: (1267:42,25 [20] ) |context.I1.MyClassId| Source Location: (293:13,33 [21] x:\dir\subdir\Test\TestComponent.cshtml) |context.I2.MyStructId| -Generated Location: (1487:49,25 [21] ) +Generated Location: (1503:50,25 [21] ) |context.I2.MyStructId| Source Location: (38:3,7 [169] x:\dir\subdir\Test\TestComponent.cshtml) @@ -26,7 +33,7 @@ Source Location: (38:3,7 [169] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public RenderFragment<(MyClass I1, MyStruct I2, TParam P)> Template { get; set; } | -Generated Location: (1719:60,7 [169] ) +Generated Location: (1735:61,7 [169] ) | [Parameter] public TParam InferParam { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.codegen.cs index 3d64ee4978a..0990a8be6fc 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.codegen.cs @@ -8,7 +8,7 @@ namespace Test using global::System.Linq; using global::System.Threading.Tasks; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.mappings.txt index e48ce54ca5d..79343d5f433 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.mappings.txt @@ -1,31 +1,38 @@ -Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components; +| +Generated Location: (318:11,0 [40] ) +|using Microsoft.AspNetCore.Components; +| + +Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem1| -Generated Location: (509:19,0 [6] ) +Generated Location: (519:19,0 [6] ) |TItem1| Source Location: (71:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem2| -Generated Location: (644:27,0 [6] ) +Generated Location: (654:27,0 [6] ) |TItem2| Source Location: (98:5,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) |foreach (var item2 in Items2) { | -Generated Location: (1082:40,1 [34] ) +Generated Location: (1092:40,1 [34] ) |foreach (var item2 in Items2) { | Source Location: (146:8,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(item2)| -Generated Location: (1318:49,24 [19] ) +Generated Location: (1328:49,24 [19] ) |ChildContent(item2)| Source Location: (178:10,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (1558:58,0 [3] ) +Generated Location: (1568:58,0 [3] ) |} | @@ -35,7 +42,7 @@ Source Location: (188:11,7 [185] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public List Items2 { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } | -Generated Location: (1738:67,7 [185] ) +Generated Location: (1748:67,7 [185] ) | [Parameter] public TItem1 Item1 { get; set; } [Parameter] public List Items2 { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.codegen.cs index 3d64ee4978a..0990a8be6fc 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.codegen.cs @@ -8,7 +8,7 @@ namespace Test using global::System.Linq; using global::System.Threading.Tasks; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.mappings.txt index 3c2425a21d0..aab71b0629a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters_WithSemicolon/TestComponent.mappings.txt @@ -1,31 +1,38 @@ -Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components; +| +Generated Location: (318:11,0 [40] ) +|using Microsoft.AspNetCore.Components; +| + +Source Location: (52:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem1| -Generated Location: (509:19,0 [6] ) +Generated Location: (519:19,0 [6] ) |TItem1| Source Location: (72:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TItem2| -Generated Location: (644:27,0 [6] ) +Generated Location: (654:27,0 [6] ) |TItem2| Source Location: (100:5,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) |foreach (var item2 in Items2) { | -Generated Location: (1082:40,1 [34] ) +Generated Location: (1092:40,1 [34] ) |foreach (var item2 in Items2) { | Source Location: (148:8,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) |ChildContent(item2)| -Generated Location: (1318:49,24 [19] ) +Generated Location: (1328:49,24 [19] ) |ChildContent(item2)| Source Location: (180:10,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (1558:58,0 [3] ) +Generated Location: (1568:58,0 [3] ) |} | @@ -35,7 +42,7 @@ Source Location: (190:11,7 [185] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public List Items2 { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } | -Generated Location: (1738:67,7 [185] ) +Generated Location: (1748:67,7 [185] ) | [Parameter] public TItem1 Item1 { get; set; } [Parameter] public List Items2 { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.codegen.cs index 9f06586a2f1..929b51cab30 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.codegen.cs @@ -9,19 +9,21 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using static Test2.SomeComponent; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using static Test2.SomeComponent #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Foo = Test3; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Foo = Test3 #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.mappings.txt new file mode 100644 index 00000000000..06fcf987623 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.mappings.txt @@ -0,0 +1,14 @@ +Source Location: (1:0,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) +|using static Test2.SomeComponent +| +Generated Location: (370:12,0 [34] ) +|using static Test2.SomeComponent +| + +Source Location: (36:1,1 [19] x:\dir\subdir\Test\TestComponent.cshtml) +|using Foo = Test3 +| +Generated Location: (541:20,0 [19] ) +|using Foo = Test3 +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.codegen.cs index 7b72c4e7e4f..0022a1bd21d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.codegen.cs @@ -9,19 +9,21 @@ namespace New.Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\_Imports.razor" -using System.Text; +#line (1,2)-(2,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Text #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\_Imports.razor" -using System.Reflection; +#line (2,2)-(3,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Reflection #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.codegen.cs index f5ab5c316c5..09bdcbe2a30 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.codegen.cs @@ -9,19 +9,21 @@ namespace New.Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\_Imports.razor" -using System.Text; +#line (1,2)-(2,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Text #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\_Imports.razor" -using System.Reflection; +#line (2,2)-(3,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Reflection #line default #line hidden #nullable disable + ; public partial class Counter : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.codegen.cs index 2aae932e922..25b08126e99 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.codegen.cs @@ -9,19 +9,21 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Rendering; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Rendering #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.mappings.txt index f442d174ab3..72e4e62f8ab 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithCssScope/TestComponent.mappings.txt @@ -1,36 +1,50 @@ -Source Location: (192:3,61 [3] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (45:1,1 [49] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Rendering +| +Generated Location: (550:20,0 [49] ) +|using Microsoft.AspNetCore.Components.Rendering +| + +Source Location: (192:3,61 [3] x:\dir\subdir\Test\TestComponent.cshtml) |123| -Generated Location: (1321:35,61 [3] ) +Generated Location: (1353:37,61 [3] ) |123| Source Location: (318:6,30 [20] x:\dir\subdir\Test\TestComponent.cshtml) |myComponentReference| -Generated Location: (2193:52,30 [20] ) +Generated Location: (2225:54,30 [20] ) |myComponentReference| Source Location: (439:10,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) |if (DateTime.Now.Year > 1950) { | -Generated Location: (2484:63,1 [34] ) +Generated Location: (2516:65,1 [34] ) |if (DateTime.Now.Year > 1950) { | Source Location: (511:12,38 [18] x:\dir\subdir\Test\TestComponent.cshtml) |myElementReference| -Generated Location: (2917:75,38 [18] ) +Generated Location: (2949:77,38 [18] ) |myElementReference| Source Location: (589:13,30 [10] x:\dir\subdir\Test\TestComponent.cshtml) |myVariable| -Generated Location: (3577:91,30 [10] ) +Generated Location: (3609:93,30 [10] ) |myVariable| Source Location: (639:14,0 [3] x:\dir\subdir\Test\TestComponent.cshtml) |} | -Generated Location: (4060:103,0 [3] ) +Generated Location: (4092:105,0 [3] ) |} | @@ -45,7 +59,7 @@ Source Location: (651:16,7 [233] x:\dir\subdir\Test\TestComponent.cshtml) for (var i = 0; i < 10; i++) { | -Generated Location: (4240:112,7 [233] ) +Generated Location: (4272:114,7 [233] ) | ElementReference myElementReference; TemplatedComponent myComponentReference; @@ -59,12 +73,12 @@ Generated Location: (4240:112,7 [233] ) Source Location: (912:25,28 [1] x:\dir\subdir\Test\TestComponent.cshtml) |i| -Generated Location: (4715:129,28 [1] ) +Generated Location: (4747:131,28 [1] ) |i| Source Location: (925:25,41 [1] x:\dir\subdir\Test\TestComponent.cshtml) |i| -Generated Location: (4994:139,25 [1] ) +Generated Location: (5026:141,25 [1] ) |i| Source Location: (933:26,0 [164] x:\dir\subdir\Test\TestComponent.cshtml) @@ -75,7 +89,7 @@ Source Location: (933:26,0 [164] x:\dir\subdir\Test\TestComponent.cshtml) System.GC.KeepAlive(myVariable); } | -Generated Location: (5155:147,0 [164] ) +Generated Location: (5187:149,0 [164] ) | } System.GC.KeepAlive(myElementReference); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.codegen.cs index 666a7f52fa5..d9a2db1f861 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.codegen.cs @@ -9,19 +9,21 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\_Imports.razor" -using System.Text; +#line (1,2)-(2,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Text #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\_Imports.razor" -using System.Reflection; +#line (2,2)-(3,1) "x:\dir\subdir\Test\_Imports.razor" +using System.Reflection #line default #line hidden #nullable disable + ; #nullable restore #line 3 "x:\dir\subdir\Test\_Imports.razor" [Serializable] diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.codegen.cs new file mode 100644 index 00000000000..9df63a57aad --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.codegen.cs @@ -0,0 +1,43 @@ +// +#pragma warning disable 1591 +namespace Test +{ + #line hidden + using global::System; + using global::System.Collections.Generic; + using global::System.Linq; + using global::System.Threading.Tasks; +#nullable restore +#line (1,2)-(1,17) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.IO + +#line default +#line hidden +#nullable disable + ; +#nullable restore +#line (1,20)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components + +#line default +#line hidden +#nullable disable + ; +#nullable restore +#line (2,4)-(2,28) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Reflection; + +#line default +#line hidden +#nullable disable + public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase + { + #pragma warning disable 1998 + protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) + { + __builder.AddMarkupContent(0, " ;; "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.ir.txt new file mode 100644 index 00000000000..6f4e30bbb69 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.ir.txt @@ -0,0 +1,12 @@ +Document - + NamespaceDeclaration - - Test + UsingDirective - (3:1,1 [22] ) - global::System + UsingDirective - (26:2,1 [42] ) - global::System.Collections.Generic + UsingDirective - (69:3,1 [27] ) - global::System.Linq + UsingDirective - (97:4,1 [38] ) - global::System.Threading.Tasks + UsingDirective - (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml) - System.IO + UsingDirective - (19:0,19 [39] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components + UsingDirective - (61:1,3 [24] x:\dir\subdir\Test\TestComponent.cshtml) - System.Reflection + ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - + MethodDeclaration - - protected override - void - BuildRenderTree + MarkupBlock - - ;; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.mappings.txt new file mode 100644 index 00000000000..95dc4915fb3 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithMultipleUsingDirectives/TestComponent.mappings.txt @@ -0,0 +1,17 @@ +Source Location: (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.IO| +Generated Location: (319:11,0 [15] ) +|using System.IO| + +Source Location: (19:0,19 [39] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components +| +Generated Location: (474:19,0 [39] ) +|using Microsoft.AspNetCore.Components +| + +Source Location: (61:1,3 [24] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Reflection;| +Generated Location: (651:27,0 [24] ) +|using System.Reflection;| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.codegen.cs index 1c8fb2e7f5a..c79474ce71c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace AnotherTest using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.mappings.txt new file mode 100644 index 00000000000..cbe661a6b80 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNamespaceDirective/TestComponent.mappings.txt @@ -0,0 +1,7 @@ +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (377:12,0 [12] ) +|using Test +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.codegen.cs index e718a550913..8d3ae33ec89 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.codegen.cs @@ -9,16 +9,17 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 3 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test2; +#line (3,2)-(4,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test2 #line default #line hidden #nullable disable + ; [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (1,7)-(1,16) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,7)-(1,16) "x:\dir\subdir\Test\TestComponent.cshtml" "/MyPage" #line default @@ -28,7 +29,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (2,7)-(2,27) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (2,7)-(2,27) "x:\dir\subdir\Test\TestComponent.cshtml" "/AnotherRoute/{id}" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.mappings.txt index a441ff5c779..0c25ffab91f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (6:0,6 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (46:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test2 +| +Generated Location: (370:12,0 [13] ) +|using Test2 +| + +Source Location: (6:0,6 [9] x:\dir\subdir\Test\TestComponent.cshtml) |"/MyPage"| -Generated Location: (608:21,6 [9] ) +Generated Location: (622:22,6 [9] ) |"/MyPage"| Source Location: (23:1,6 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"/AnotherRoute/{id}"| -Generated Location: (861:31,6 [20] ) +Generated Location: (873:32,6 [20] ) |"/AnotherRoute/{id}"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.codegen.cs index b1fe5db4662..9267ee567a9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.codegen.cs @@ -9,19 +9,21 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test2; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test2 #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test3; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test3 #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.mappings.txt new file mode 100644 index 00000000000..471c55afd48 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.mappings.txt @@ -0,0 +1,14 @@ +Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test2 +| +Generated Location: (370:12,0 [13] ) +|using Test2 +| + +Source Location: (15:1,1 [13] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test3 +| +Generated Location: (520:20,0 [13] ) +|using Test3 +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs index 0a92cde8561..b44a93c2a9c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt index 2fc8397600e..2ff9ecfd9c3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_DifferentCasing_IsAnError_BindValue/TestComponent.mappings.txt @@ -1,13 +1,20 @@ -Source Location: (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) |text| -Generated Location: (1164:29,40 [4] ) +Generated Location: (1180:30,40 [4] ) |text| Source Location: (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (1670:43,12 [35] ) +Generated Location: (1686:44,12 [35] ) | private string text = "hi"; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs index 87e70f6c03a..b9f5171e812 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt index c3772ae3f67..98c1df98b68 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt @@ -1,18 +1,25 @@ -Source Location: (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (130:2,79 [8] x:\dir\subdir\Test\TestComponent.cshtml) |() => {}| -Generated Location: (1216:28,79 [8] ) +Generated Location: (1232:29,79 [8] ) |() => {}| Source Location: (86:2,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) |text| -Generated Location: (1513:37,35 [4] ) +Generated Location: (1529:38,35 [4] ) |text| Source Location: (170:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (2018:51,12 [35] ) +Generated Location: (2034:52,12 [35] ) | private string text = "hi"; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs index 518450a8b7c..c9f253a9518 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt index 2fc8397600e..2ff9ecfd9c3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt @@ -1,13 +1,20 @@ -Source Location: (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (91:2,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) |text| -Generated Location: (1164:29,40 [4] ) +Generated Location: (1180:30,40 [4] ) |text| Source Location: (127:4,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (1670:43,12 [35] ) +Generated Location: (1686:44,12 [35] ) | private string text = "hi"; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs index 7bbaee64fc6..144b6ee0832 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt index 067cf352267..7ed94ce7d04 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (83:2,32 [8] x:\dir\subdir\Test\TestComponent.cshtml) |() => {}| -Generated Location: (1173:28,32 [8] ) +Generated Location: (1189:29,32 [8] ) |() => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs index e73871d25ed..d3c28e15206 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt index 7939509f8d8..ef22e7ed273 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (68:1,24 [61] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (68:1,24 [61] x:\dir\subdir\Test\TestComponent.cshtml) |EventCallback.Factory.Create(this, Increment)| -Generated Location: (1287:26,24 [61] ) +Generated Location: (1303:27,24 [61] ) |EventCallback.Factory.Create(this, Increment)| Source Location: (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) @@ -10,7 +17,7 @@ Source Location: (144:3,7 [87] x:\dir\subdir\Test\TestComponent.cshtml) counter++; } | -Generated Location: (1585:37,7 [87] ) +Generated Location: (1601:38,7 [87] ) | private int counter; private void Increment() { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs index dd19b6b0b5e..733d3bbba7a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt index d1a658d57a3..a3e0dc72518 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) |Increment| -Generated Location: (1286:26,23 [9] ) +Generated Location: (1302:27,23 [9] ) |Increment| Source Location: (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml) @@ -10,7 +17,7 @@ Source Location: (90:3,7 [103] x:\dir\subdir\Test\TestComponent.cshtml) counter++; } | -Generated Location: (1532:37,7 [103] ) +Generated Location: (1548:38,7 [103] ) | private int counter; private void Increment(MouseEventArgs e) { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs index d1596e991ed..298773904b1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt index 0b75ccd93db..438834095c9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) |Increment| -Generated Location: (1286:26,23 [9] ) +Generated Location: (1302:27,23 [9] ) |Increment| Source Location: (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml) @@ -11,7 +18,7 @@ Source Location: (90:3,7 [139] x:\dir\subdir\Test\TestComponent.cshtml) return Task.CompletedTask; } | -Generated Location: (1532:37,7 [139] ) +Generated Location: (1548:38,7 [139] ) | private int counter; private Task Increment(MouseEventArgs e) { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs index 7c8ea365470..9fbf779e289 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt index d371f530dcb..db1ac28a50f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (67:1,23 [9] x:\dir\subdir\Test\TestComponent.cshtml) |Increment| -Generated Location: (1286:26,23 [9] ) +Generated Location: (1302:27,23 [9] ) |Increment| Source Location: (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) @@ -10,7 +17,7 @@ Source Location: (90:3,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) counter++; } | -Generated Location: (1532:37,7 [104] ) +Generated Location: (1548:38,7 [104] ) | private int counter; private void Increment(ChangeEventArgs e) { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs index 9b14fb8bd91..cb163c949e3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt index cd502999e26..b2ebe514ad0 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_AttributeNameIsCaseSensitive/TestComponent.mappings.txt @@ -1,9 +1,16 @@ -Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(MouseEventArgs e) { } | -Generated Location: (936:27,7 [47] ) +Generated Location: (952:28,7 [47] ) | void OnClick(MouseEventArgs e) { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs index 5b2eb0c3d83..f4ae88b8656 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt index 82798a49834..1b12f787de2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1055:26,17 [7] ) +Generated Location: (1071:27,17 [7] ) |OnClick| Source Location: (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml) @@ -8,7 +15,7 @@ Source Location: (81:2,7 [42] x:\dir\subdir\Test\TestComponent.cshtml) void OnClick(EventArgs e) { } | -Generated Location: (1296:37,7 [42] ) +Generated Location: (1312:38,7 [42] ) | void OnClick(EventArgs e) { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs index 102bfed6bf3..5d5ff8f1d68 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt index 8c45e09c5f7..4e1a62de7c2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1055:26,17 [7] ) +Generated Location: (1071:27,17 [7] ) |OnClick| Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) @@ -8,7 +15,7 @@ Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) void OnClick(MouseEventArgs e) { } | -Generated Location: (1296:37,7 [47] ) +Generated Location: (1312:38,7 [47] ) | void OnClick(MouseEventArgs e) { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs index 1aa3aa8e930..d879b15a1a2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt index 32d6e46a779..9c2b7be2fba 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) |x => { }| -Generated Location: (1055:26,17 [8] ) +Generated Location: (1071:27,17 [8] ) |x => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs index 102bfed6bf3..5d5ff8f1d68 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt index 8c45e09c5f7..4e1a62de7c2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1055:26,17 [7] ) +Generated Location: (1071:27,17 [7] ) |OnClick| Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) @@ -8,7 +15,7 @@ Source Location: (81:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) void OnClick(MouseEventArgs e) { } | -Generated Location: (1296:37,7 [47] ) +Generated Location: (1312:38,7 [47] ) | void OnClick(MouseEventArgs e) { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs index 1aa3aa8e930..d879b15a1a2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt index 32d6e46a779..9c2b7be2fba 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) |x => { }| -Generated Location: (1055:26,17 [8] ) +Generated Location: (1071:27,17 [8] ) |x => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs index bc731ba87d2..3a7d01e789f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt index 47a3c8209fd..97f6bf517f5 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1055:26,17 [7] ) +Generated Location: (1071:27,17 [7] ) |OnClick| Source Location: (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) @@ -8,7 +15,7 @@ Source Location: (81:2,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) void OnClick() { } | -Generated Location: (1296:37,7 [31] ) +Generated Location: (1312:38,7 [31] ) | void OnClick() { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs index dd7571d4872..a1a0de6f601 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt index 8b101582ed9..340c89f9f67 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1055:26,17 [9] ) +Generated Location: (1071:27,17 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs index c78a715146d..5874d9fa028 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.mappings.txt new file mode 100644 index 00000000000..54a743e9232 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.mappings.txt @@ -0,0 +1,7 @@ +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.codegen.cs index 52b75be4e7b..e0a7934b79b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.mappings.txt index 4770a457cd7..8be03a15229 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithoutCloseTag/TestComponent.mappings.txt @@ -1,6 +1,13 @@ -Source Location: (70:2,19 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (70:2,19 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1103:27,19 [7] ) +Generated Location: (1119:28,19 [7] ) |OnClick| Source Location: (96:4,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) @@ -8,7 +15,7 @@ Source Location: (96:4,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) void OnClick() { } | -Generated Location: (1383:39,7 [31] ) +Generated Location: (1399:40,7 [31] ) | void OnClick() { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.codegen.cs index 32b1407036f..23c47901559 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.mappings.txt index 2a174e841ae..cacb97d60c9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_Duplicates/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (76:1,32 [4] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (76:1,32 [4] x:\dir\subdir\Test\TestComponent.cshtml) |true| -Generated Location: (954:26,32 [4] ) +Generated Location: (970:27,32 [4] ) |true| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.codegen.cs index cadf3cf7c69..1532ba856af 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.mappings.txt index 9e8446d1b7c..e2f28536df1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation/TestComponent.mappings.txt @@ -1,28 +1,35 @@ -Source Location: (62:1,18 [17] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (62:1,18 [17] x:\dir\subdir\Test\TestComponent.cshtml) |() => Foo = false| -Generated Location: (1057:26,18 [17] ) +Generated Location: (1073:27,18 [17] ) |() => Foo = false| Source Location: (106:1,62 [4] x:\dir\subdir\Test\TestComponent.cshtml) |true| -Generated Location: (1345:35,62 [4] ) +Generated Location: (1361:36,62 [4] ) |true| Source Location: (138:1,94 [3] x:\dir\subdir\Test\TestComponent.cshtml) |Foo| -Generated Location: (1652:44,94 [3] ) +Generated Location: (1668:45,94 [3] ) |Foo| Source Location: (169:1,125 [5] x:\dir\subdir\Test\TestComponent.cshtml) |false| -Generated Location: (1989:53,125 [5] ) +Generated Location: (2005:54,125 [5] ) |false| Source Location: (202:2,7 [30] x:\dir\subdir\Test\TestComponent.cshtml) | bool Foo { get; set; } | -Generated Location: (2277:65,7 [30] ) +Generated Location: (2293:66,7 [30] ) | bool Foo { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.codegen.cs index c400b39f225..764194fe9d2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.mappings.txt new file mode 100644 index 00000000000..54a743e9232 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_PreventDefault_StopPropagation_Minimized/TestComponent.mappings.txt @@ -0,0 +1,7 @@ +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.codegen.cs index b5a11f27bd3..109fd8b8ae4 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.mappings.txt index abdfff091f0..c32d3c262c0 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_WithDelegate_PreventDefault/TestComponent.mappings.txt @@ -1,11 +1,18 @@ -Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnFocus| -Generated Location: (1055:26,17 [7] ) +Generated Location: (1071:27,17 [7] ) |OnFocus| Source Location: (95:1,51 [22] x:\dir\subdir\Test\TestComponent.cshtml) |ShouldPreventDefault()| -Generated Location: (1322:35,51 [22] ) +Generated Location: (1338:36,51 [22] ) |ShouldPreventDefault()| Source Location: (130:2,7 [95] x:\dir\subdir\Test\TestComponent.cshtml) @@ -14,7 +21,7 @@ Source Location: (130:2,7 [95] x:\dir\subdir\Test\TestComponent.cshtml) bool ShouldPreventDefault() { return false; } | -Generated Location: (1577:46,7 [95] ) +Generated Location: (1593:47,7 [95] ) | void OnFocus(FocusEventArgs e) { } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.codegen.cs index 648ff48decf..0f19fd6fd96 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.mappings.txt index bc0f78773fc..30b78bbbda1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpError/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (98:1,54 [1] x:\dir\subdir\Test\TestComponent.cshtml) |x| -Generated Location: (1419:36,54 [1] ) +Generated Location: (1435:37,54 [1] ) |x| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.codegen.cs index 600d6a5e1e3..3b1b563597c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.mappings.txt index b6414df8d11..8b1f15c2266 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (99:1,55 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (1420:36,55 [20] ) +Generated Location: (1436:37,55 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.codegen.cs index 85faf08a24c..7a126c2eed8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.mappings.txt index 70b36c1f3cd..2e5c95cb87e 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_CSharpValue_Integer/TestComponent.mappings.txt @@ -1,18 +1,25 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (98:1,54 [1] x:\dir\subdir\Test\TestComponent.cshtml) |x| -Generated Location: (1419:36,54 [1] ) +Generated Location: (1435:37,54 [1] ) |x| Source Location: (117:2,7 [18] x:\dir\subdir\Test\TestComponent.cshtml) | int x = 1; | -Generated Location: (1715:48,7 [18] ) +Generated Location: (1731:49,7 [18] ) | int x = 1; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.codegen.cs index 81d4b39edff..abf9f381d3b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.mappings.txt index 69a54f82a53..6148c06230a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_ChildContent/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (92:2,8 [12] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (92:2,8 [12] x:\dir\subdir\Test\TestComponent.cshtml) |DateTime.Now| -Generated Location: (1186:29,24 [12] ) +Generated Location: (1202:30,24 [12] ) |DateTime.Now| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.codegen.cs index 008bd2e0bbd..28dc34cfa29 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.mappings.txt index e63d2f91f43..310416471af 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component/TestComponent.mappings.txt @@ -1,15 +1,22 @@ -Source Location: (84:1,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (84:1,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1142:27,40 [9] ) +Generated Location: (1158:28,40 [9] ) |() => { }| Source Location: (170:2,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1805:41,40 [9] ) +Generated Location: (1821:42,40 [9] ) |() => { }| Source Location: (194:2,64 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (2079:50,64 [20] ) +Generated Location: (2095:51,64 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs index 50d0ce976dd..821e5ee564c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent< #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.mappings.txt index 8d9aa4ae96c..0c50cd0d15f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic/TestComponent.mappings.txt @@ -1,38 +1,45 @@ -Source Location: (55:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (55:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) |T| -Generated Location: (565:20,0 [1] ) +Generated Location: (581:21,0 [1] ) |T| Source Location: (98:2,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1190:33,40 [9] ) +Generated Location: (1206:34,40 [9] ) |() => { }| Source Location: (151:2,93 [1] x:\dir\subdir\Test\TestComponent.cshtml) |1| -Generated Location: (1459:41,93 [1] ) +Generated Location: (1475:42,93 [1] ) |1| Source Location: (198:3,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1905:51,40 [9] ) +Generated Location: (1921:52,40 [9] ) |() => { }| Source Location: (222:3,64 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (2120:59,64 [20] ) +Generated Location: (2136:60,64 [20] ) |"named-form-handler"| Source Location: (256:3,98 [1] x:\dir\subdir\Test\TestComponent.cshtml) |2| -Generated Location: (2380:67,98 [1] ) +Generated Location: (2396:68,98 [1] ) |2| Source Location: (270:4,7 [52] x:\dir\subdir\Test\TestComponent.cshtml) | [Parameter] public T Parameter { get; set; } | -Generated Location: (2575:77,7 [52] ) +Generated Location: (2591:78,7 [52] ) | [Parameter] public T Parameter { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.codegen.cs index 4b6779e699e..8739afa3227 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent< #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.mappings.txt index 8d9aa4ae96c..0c50cd0d15f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_Generic_RazorLangVersion7/TestComponent.mappings.txt @@ -1,38 +1,45 @@ -Source Location: (55:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (55:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) |T| -Generated Location: (565:20,0 [1] ) +Generated Location: (581:21,0 [1] ) |T| Source Location: (98:2,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1190:33,40 [9] ) +Generated Location: (1206:34,40 [9] ) |() => { }| Source Location: (151:2,93 [1] x:\dir\subdir\Test\TestComponent.cshtml) |1| -Generated Location: (1459:41,93 [1] ) +Generated Location: (1475:42,93 [1] ) |1| Source Location: (198:3,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1905:51,40 [9] ) +Generated Location: (1921:52,40 [9] ) |() => { }| Source Location: (222:3,64 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (2120:59,64 [20] ) +Generated Location: (2136:60,64 [20] ) |"named-form-handler"| Source Location: (256:3,98 [1] x:\dir\subdir\Test\TestComponent.cshtml) |2| -Generated Location: (2380:67,98 [1] ) +Generated Location: (2396:68,98 [1] ) |2| Source Location: (270:4,7 [52] x:\dir\subdir\Test\TestComponent.cshtml) | [Parameter] public T Parameter { get; set; } | -Generated Location: (2575:77,7 [52] ) +Generated Location: (2591:78,7 [52] ) | [Parameter] public T Parameter { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.codegen.cs index 1a7810d3939..aadc37e39f6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.mappings.txt index 8eb664a9db7..4012176f768 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Component_RazorLangVersion7/TestComponent.mappings.txt @@ -1,15 +1,22 @@ -Source Location: (84:1,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (84:1,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1143:27,40 [9] ) +Generated Location: (1159:28,40 [9] ) |() => { }| Source Location: (170:2,40 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1809:41,40 [9] ) +Generated Location: (1825:42,40 [9] ) |() => { }| Source Location: (194:2,64 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (2084:50,64 [20] ) +Generated Location: (2100:51,64 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.codegen.cs index 45943025534..73cd9e47522 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.mappings.txt index b2908a67d9e..81d245af8fa 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_CSharpValue/TestComponent.mappings.txt @@ -1,16 +1,23 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (98:1,54 [1] x:\dir\subdir\Test\TestComponent.cshtml) |x| -Generated Location: (1419:36,54 [1] ) +Generated Location: (1435:37,54 [1] ) |x| Source Location: (113:1,69 [1] x:\dir\subdir\Test\TestComponent.cshtml) |y| -Generated Location: (1597:44,24 [1] ) +Generated Location: (1613:45,24 [1] ) |y| Source Location: (132:2,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) @@ -18,7 +25,7 @@ Source Location: (132:2,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) string x = "a"; string y = "b"; | -Generated Location: (1932:56,7 [44] ) +Generated Location: (1948:57,7 [44] ) | string x = "a"; string y = "b"; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.codegen.cs index 65ebd0e256e..8a6618afb9f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.mappings.txt index f50f4b7ef8f..30d63e92bf1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Duplicate_HtmlValue/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.codegen.cs index e3adc13355b..d068c41c869 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.mappings.txt index fc063f99fb0..dff4d11cdd6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_FakeSubmit/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (161:2,45 [20] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (161:2,45 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (1597:35,45 [20] ) +Generated Location: (1613:36,45 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.codegen.cs index 2ed404d9bf9..05feb4367c4 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.mappings.txt index f50f4b7ef8f..30d63e92bf1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_HtmlValue/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.codegen.cs index 7132f1d71f0..89b61c6d322 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.mappings.txt index 98ce953a781..08580958e24 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MissingSubmit/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (137:2,33 [20] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (137:2,33 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (1473:33,33 [20] ) +Generated Location: (1489:34,33 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.codegen.cs index 1e13f4ff4d5..cc6b1dd6599 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.mappings.txt index 1c3a57c2700..5ae1b60ffc3 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MixedValue/TestComponent.mappings.txt @@ -1,23 +1,30 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (105:1,61 [9] x:\dir\subdir\Test\TestComponent.cshtml) |"literal"| -Generated Location: (1443:36,61 [9] ) +Generated Location: (1459:37,61 [9] ) |"literal"| Source Location: (117:1,73 [1] x:\dir\subdir\Test\TestComponent.cshtml) |x| -Generated Location: (1672:44,73 [1] ) +Generated Location: (1688:45,73 [1] ) |x| Source Location: (140:2,7 [18] x:\dir\subdir\Test\TestComponent.cshtml) | int x = 1; | -Generated Location: (1978:56,7 [18] ) +Generated Location: (1994:57,7 [18] ) | int x = 1; | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.codegen.cs index ea44650531e..095a06a86ad 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.mappings.txt index c105b266081..ee944500773 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_CSharpValue/TestComponent.mappings.txt @@ -1,21 +1,28 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (98:1,54 [1] x:\dir\subdir\Test\TestComponent.cshtml) |x| -Generated Location: (1419:36,54 [1] ) +Generated Location: (1435:37,54 [1] ) |x| Source Location: (141:2,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (2000:50,31 [9] ) +Generated Location: (2016:51,31 [9] ) |() => { }| Source Location: (164:2,54 [1] x:\dir\subdir\Test\TestComponent.cshtml) |y| -Generated Location: (2329:59,54 [1] ) +Generated Location: (2345:60,54 [1] ) |y| Source Location: (183:3,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) @@ -23,7 +30,7 @@ Source Location: (183:3,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) string x = "a"; string y = "b"; | -Generated Location: (2628:71,7 [44] ) +Generated Location: (2644:72,7 [44] ) | string x = "a"; string y = "b"; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.codegen.cs index 6450b8f8058..75459a75464 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.mappings.txt index 8451299e608..deb48795a87 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_MoreElements_HtmlValue/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (140:2,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1812:42,31 [9] ) +Generated Location: (1828:43,31 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.codegen.cs index a4e3662c815..5aa9b8b7762 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.mappings.txt index 8ba8e16d811..bb049e84f27 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nested/TestComponent.mappings.txt @@ -1,28 +1,35 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (161:3,35 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (2030:44,35 [9] ) +Generated Location: (2046:45,35 [9] ) |() => { }| Source Location: (255:5,39 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (3031:61,39 [9] ) +Generated Location: (3047:62,39 [9] ) |() => { }| Source Location: (346:7,35 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (3908:79,35 [9] ) +Generated Location: (3924:80,35 [9] ) |() => { }| Source Location: (405:9,7 [68] x:\dir\subdir\Test\TestComponent.cshtml) | [Parameter] public RenderFragment ChildContent { get; set; } | -Generated Location: (4440:95,7 [68] ) +Generated Location: (4456:96,7 [68] ) | [Parameter] public RenderFragment ChildContent { get; set; } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.codegen.cs index ed5b1c709b4..6ef85b6ebe5 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.mappings.txt index f50f4b7ef8f..30d63e92bf1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NoAddNamedEventMethod/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.codegen.cs index 45143cdb46a..bec40a6105b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.mappings.txt index 5e8f61dfa7e..a4fb97178df 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm/TestComponent.mappings.txt @@ -1,15 +1,22 @@ -Source Location: (74:1,30 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (74:1,30 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1091:27,30 [9] ) +Generated Location: (1107:28,30 [9] ) |() => { }| Source Location: (154:2,30 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1692:41,30 [9] ) +Generated Location: (1708:42,30 [9] ) |() => { }| Source Location: (178:2,54 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (1947:50,54 [20] ) +Generated Location: (1963:51,54 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.codegen.cs index 45143cdb46a..bec40a6105b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.mappings.txt index 5e8f61dfa7e..a4fb97178df 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_NotAForm_RazorLangVersion7/TestComponent.mappings.txt @@ -1,15 +1,22 @@ -Source Location: (74:1,30 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (74:1,30 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1091:27,30 [9] ) +Generated Location: (1107:28,30 [9] ) |() => { }| Source Location: (154:2,30 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1692:41,30 [9] ) +Generated Location: (1708:42,30 [9] ) |() => { }| Source Location: (178:2,54 [20] x:\dir\subdir\Test\TestComponent.cshtml) |"named-form-handler"| -Generated Location: (1947:50,54 [20] ) +Generated Location: (1963:51,54 [20] ) |"named-form-handler"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.codegen.cs index 8600e265809..1a2792da1a8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.mappings.txt index bb166a5ee0b..d0528af4ed8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_Nullability/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| Source Location: (98:1,54 [4] x:\dir\subdir\Test\TestComponent.cshtml) |null| -Generated Location: (1419:36,54 [4] ) +Generated Location: (1435:37,54 [4] ) |null| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.codegen.cs index d6b2af2a7eb..e7f8ade5152 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.mappings.txt index f50f4b7ef8f..30d63e92bf1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorError/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.codegen.cs index ed5b1c709b4..6ef85b6ebe5 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.mappings.txt index f50f4b7ef8f..30d63e92bf1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/FormName_RazorLangVersion7/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (1093:27,31 [9] ) +Generated Location: (1109:28,31 [9] ) |() => { }| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.codegen.cs index 20fc0bdd7b2..cde92633611 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent< #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.mappings.txt index 1b2a6b53a07..3cd85f55403 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (11:0,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (20:1,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (11:0,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TChild| -Generated Location: (534:20,0 [6] ) +Generated Location: (550:21,0 [6] ) |TChild| Source Location: (69:2,37 [16] x:\dir\subdir\Test\TestComponent.cshtml) |(TChild x) => {}| -Generated Location: (1309:34,37 [16] ) +Generated Location: (1325:35,37 [16] ) |(TChild x) => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs index 0c605401ea7..2db7285b2ae 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent< #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.mappings.txt index 7c338de35a1..cb37832812b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.mappings.txt @@ -1,16 +1,23 @@ -Source Location: (11:0,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (20:1,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (11:0,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) |TChild| -Generated Location: (534:20,0 [6] ) +Generated Location: (550:21,0 [6] ) |TChild| Source Location: (51:2,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) |ChildItem| -Generated Location: (1029:33,19 [9] ) +Generated Location: (1045:34,19 [9] ) |ChildItem| Source Location: (71:2,39 [12] x:\dir\subdir\Test\TestComponent.cshtml) |MyChildEvent| -Generated Location: (1293:41,39 [12] ) +Generated Location: (1309:42,39 [12] ) |MyChildEvent| Source Location: (97:4,1 [138] x:\dir\subdir\Test\TestComponent.cshtml) @@ -18,7 +25,7 @@ Source Location: (97:4,1 [138] x:\dir\subdir\Test\TestComponent.cshtml) [Parameter] public TChild ChildItem { get; set; } [Parameter] public EventCallback MyChildEvent { get; set; } | -Generated Location: (1494:51,1 [138] ) +Generated Location: (1510:52,1 [138] ) | [Parameter] public TChild ChildItem { get; set; } [Parameter] public EventCallback MyChildEvent { get; set; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs index fa86ce6b4ec..68f5c9cd5c6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.mappings.txt index 8f69e71ff40..9bbb095b180 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) |3| -Generated Location: (893:25,19 [1] ) +Generated Location: (909:26,19 [1] ) |3| Source Location: (44:1,31 [13] x:\dir\subdir\Test\TestComponent.cshtml) |(int x) => {}| -Generated Location: (1141:33,31 [13] ) +Generated Location: (1157:34,31 [13] ) |(int x) => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs index e40fe05d591..12414926a8d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs @@ -8,19 +8,21 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; #nullable restore -#line 2 "x:\dir\subdir\Test\TestComponent.cshtml" -using System.Collections.Generic; +#line (2,2)-(3,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System.Collections.Generic #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.mappings.txt index 4fcda222789..dd932fe1ff6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.mappings.txt @@ -1,10 +1,24 @@ -Source Location: (67:2,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (323:11,0 [12] ) +|using Test +| + +Source Location: (14:1,1 [34] x:\dir\subdir\Test\TestComponent.cshtml) +|using System.Collections.Generic +| +Generated Location: (472:19,0 [34] ) +|using System.Collections.Generic +| + +Source Location: (67:2,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) |3| -Generated Location: (1001:31,19 [1] ) +Generated Location: (1033:33,19 [1] ) |3| Source Location: (79:2,31 [26] x:\dir\subdir\Test\TestComponent.cshtml) |(IEnumerable x) => {}| -Generated Location: (1249:39,31 [26] ) +Generated Location: (1281:41,31 [26] ) |(IEnumerable x) => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs index ff0431308b8..75bd631bd0a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.mappings.txt index ba9bd2b0ca7..3b42244b9ee 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) |3| -Generated Location: (893:25,19 [1] ) +Generated Location: (909:26,19 [1] ) |3| Source Location: (44:1,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) |x => {}| -Generated Location: (1167:33,31 [7] ) +Generated Location: (1183:34,31 [7] ) |x => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs index b2d18fa0ed2..63d114941b6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.mappings.txt index 97f38e60367..cbbc79bcf6b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) |3| -Generated Location: (893:25,19 [1] ) +Generated Location: (909:26,19 [1] ) |3| Source Location: (44:1,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) |x => {}| -Generated Location: (1256:33,31 [7] ) +Generated Location: (1272:34,31 [7] ) |x => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs index fa2ebc8ce5c..e1c5743e008 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.mappings.txt index f47e011ac11..e16624f07e0 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (32:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) |3| -Generated Location: (893:25,19 [1] ) +Generated Location: (909:26,19 [1] ) |3| Source Location: (44:1,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) |x => {}| -Generated Location: (1141:33,31 [7] ) +Generated Location: (1157:34,31 [7] ) |x => {}| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs index 7d56644c71c..70296694d08 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test.Shared; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test.Shared #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.mappings.txt index 687dac12bba..4ffbd8677b9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.mappings.txt @@ -1,18 +1,25 @@ -Source Location: (39:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [19] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test.Shared +| +Generated Location: (370:12,0 [19] ) +|using Test.Shared +| + +Source Location: (39:1,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) |3| -Generated Location: (900:25,19 [1] ) +Generated Location: (916:26,19 [1] ) |3| Source Location: (48:1,28 [5] x:\dir\subdir\Test\TestComponent.cshtml) |Hello| -Generated Location: (1070:33,28 [5] ) +Generated Location: (1086:34,28 [5] ) |Hello| Source Location: (68:3,7 [38] x:\dir\subdir\Test\TestComponent.cshtml) | MyClass Hello = new MyClass(); | -Generated Location: (1269:43,7 [38] ) +Generated Location: (1285:44,7 [38] ) | MyClass Hello = new MyClass(); | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs index ccbc7cc6b6b..e8b67765abf 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Test; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Test #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.mappings.txt index f9c381ce2c1..dc47a650335 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.mappings.txt @@ -1,5 +1,12 @@ -Source Location: (37:1,24 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [12] x:\dir\subdir\Test\TestComponent.cshtml) +|using Test +| +Generated Location: (370:12,0 [12] ) +|using Test +| + +Source Location: (37:1,24 [1] x:\dir\subdir\Test\TestComponent.cshtml) |1| -Generated Location: (898:25,24 [1] ) +Generated Location: (914:26,24 [1] ) |1| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs index 42be2d4f10b..e7fe065283b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs @@ -8,12 +8,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt new file mode 100644 index 00000000000..49c02e3e3b5 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt @@ -0,0 +1,7 @@ +Source Location: (1:0,1 [14] x:\dir\subdir\Test\TestComponent.cshtml) +|using System +| +Generated Location: (343:11,0 [14] ) +|using System +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs index 42be2d4f10b..e7fe065283b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs @@ -8,12 +8,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using System; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using System #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt new file mode 100644 index 00000000000..49c02e3e3b5 --- /dev/null +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt @@ -0,0 +1,7 @@ +Source Location: (1:0,1 [14] x:\dir\subdir\Test\TestComponent.cshtml) +|using System +| +Generated Location: (343:11,0 [14] ) +|using System +| + diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs index e554bd11189..1a20524aa36 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs @@ -11,7 +11,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (3,7)-(3,16) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (3,7)-(3,16) "x:\dir\subdir\Test\TestComponent.cshtml" "/my/url" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt index 7e88a57f660..63b42e3a8ec 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt @@ -1,5 +1,5 @@ Source Location: (24:2,6 [9] x:\dir\subdir\Test\TestComponent.cshtml) |"/my/url"| -Generated Location: (474:14,6 [9] ) +Generated Location: (472:14,6 [9] ) |"/my/url"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs index ec005d5431c..a2998de8137 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Rendering; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Rendering #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt index 534d093f555..803b624db18 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt @@ -1,9 +1,16 @@ -Source Location: (57:1,7 [57] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [49] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Rendering +| +Generated Location: (370:12,0 [49] ) +|using Microsoft.AspNetCore.Components.Rendering +| + +Source Location: (57:1,7 [57] x:\dir\subdir\Test\TestComponent.cshtml) | void MyMethod(RenderTreeBuilder __builder) { | -Generated Location: (866:26,7 [57] ) +Generated Location: (882:27,7 [57] ) | void MyMethod(RenderTreeBuilder __builder) { @@ -13,27 +20,27 @@ Source Location: (141:5,13 [46] x:\dir\subdir\Test\TestComponent.cshtml) |for (var i = 0; i < 100; i++) { | -Generated Location: (1191:38,13 [46] ) +Generated Location: (1207:39,13 [46] ) |for (var i = 0; i < 100; i++) { | Source Location: (230:8,21 [1] x:\dir\subdir\Test\TestComponent.cshtml) |i| -Generated Location: (1559:49,24 [1] ) +Generated Location: (1575:50,24 [1] ) |i| Source Location: (256:10,0 [15] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (1832:59,0 [15] ) +Generated Location: (1848:60,0 [15] ) | } | Source Location: (286:12,0 [7] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (2098:69,0 [7] ) +Generated Location: (2114:70,0 [7] ) | } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.codegen.cs index 403ea709648..38efe09cdfc 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.codegen.cs @@ -11,7 +11,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (1,7)-(1,10) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,7)-(1,10) "x:\dir\subdir\Test\TestComponent.cshtml" "/" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.mappings.txt index 40c09a6e5ac..20340d364ae 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.mappings.txt @@ -1,5 +1,5 @@ Source Location: (6:0,6 [3] x:\dir\subdir\Test\TestComponent.cshtml) |"/"| -Generated Location: (474:14,6 [3] ) +Generated Location: (472:14,6 [3] ) |"/"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.codegen.cs index 38a7af27ca9..0ef9a63f61b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.codegen.cs @@ -11,7 +11,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (1,7)-(1,10) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,7)-(1,10) "x:\dir\subdir\Test\TestComponent.cshtml" "/" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.mappings.txt index 40c09a6e5ac..20340d364ae 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.mappings.txt @@ -1,5 +1,5 @@ Source Location: (6:0,6 [3] x:\dir\subdir\Test\TestComponent.cshtml) |"/"| -Generated Location: (474:14,6 [3] ) +Generated Location: (472:14,6 [3] ) |"/"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs index d77593e1e29..ca307162ba6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Web; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Web #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt index 2aa199130a5..5c4715dd1fe 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt @@ -1,11 +1,18 @@ -Source Location: (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [43] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Web +| +Generated Location: (370:12,0 [43] ) +|using Microsoft.AspNetCore.Components.Web +| + +Source Location: (61:1,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) |OnComponentHover| -Generated Location: (1055:26,17 [16] ) +Generated Location: (1071:27,17 [16] ) |OnComponentHover| Source Location: (99:1,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) |ParentBgColor| -Generated Location: (1337:35,55 [13] ) +Generated Location: (1353:36,55 [13] ) |ParentBgColor| Source Location: (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml) @@ -16,7 +23,7 @@ Source Location: (126:2,7 [130] x:\dir\subdir\Test\TestComponent.cshtml) { } | -Generated Location: (1590:46,7 [130] ) +Generated Location: (1606:47,7 [130] ) | public string ParentBgColor { get; set; } = "#FFFFFF"; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.codegen.cs index 908c3469298..9613ba928f7 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.codegen.cs @@ -9,7 +9,7 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components.RenderTree; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.mappings.txt index 27f077879dc..2fba5736186 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeBlock/TestComponent.mappings.txt @@ -1,10 +1,17 @@ -Source Location: (56:2,2 [134] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [51] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.RenderTree; +| +Generated Location: (370:12,0 [51] ) +|using Microsoft.AspNetCore.Components.RenderTree; +| + +Source Location: (56:2,2 [134] x:\dir\subdir\Test\TestComponent.cshtml) | var output = string.Empty; if (__builder == null) output = "Builder is null!"; else output = "Builder is not null!"; | -Generated Location: (813:24,2 [134] ) +Generated Location: (823:24,2 [134] ) | var output = string.Empty; if (__builder == null) output = "Builder is null!"; @@ -13,6 +20,6 @@ Generated Location: (813:24,2 [134] ) Source Location: (206:6,16 [6] x:\dir\subdir\Test\TestComponent.cshtml) |output| -Generated Location: (1200:36,24 [6] ) +Generated Location: (1210:36,24 [6] ) |output| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.codegen.cs index edce2fae1ac..a0786457720 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.codegen.cs @@ -9,7 +9,7 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" using Microsoft.AspNetCore.Components.Rendering; #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.mappings.txt index 80662dd3f5b..18ec3f0cac6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/SingleLineControlFlowStatements_InCodeDirective/TestComponent.mappings.txt @@ -1,4 +1,11 @@ -Source Location: (60:2,7 [213] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [50] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Rendering; +| +Generated Location: (370:12,0 [50] ) +|using Microsoft.AspNetCore.Components.Rendering; +| + +Source Location: (60:2,7 [213] x:\dir\subdir\Test\TestComponent.cshtml) | void RenderChildComponent(RenderTreeBuilder __builder) { @@ -6,7 +13,7 @@ if (__builder == null) output = "Builder is null!"; else output = "Builder is not null!"; | -Generated Location: (866:26,7 [213] ) +Generated Location: (876:26,7 [213] ) | void RenderChildComponent(RenderTreeBuilder __builder) { @@ -17,13 +24,13 @@ Generated Location: (866:26,7 [213] ) Source Location: (293:8,20 [6] x:\dir\subdir\Test\TestComponent.cshtml) |output| -Generated Location: (1324:40,24 [6] ) +Generated Location: (1334:40,24 [6] ) |output| Source Location: (305:9,0 [7] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (1490:48,0 [7] ) +Generated Location: (1500:48,0 [7] ) | } | diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs index e554bd11189..1a20524aa36 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs @@ -11,7 +11,7 @@ namespace Test [global::Microsoft.AspNetCore.Components.RouteAttribute( // language=Route,Component #nullable restore -#line (3,7)-(3,16) 1 "x:\dir\subdir\Test\TestComponent.cshtml" +#line (3,7)-(3,16) "x:\dir\subdir\Test\TestComponent.cshtml" "/my/url" #line default diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt index 7e88a57f660..63b42e3a8ec 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt @@ -1,5 +1,5 @@ Source Location: (24:2,6 [9] x:\dir\subdir\Test\TestComponent.cshtml) |"/my/url"| -Generated Location: (474:14,6 [9] ) +Generated Location: (472:14,6 [9] ) |"/my/url"| diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs index d8ed53229fa..912388606ec 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.codegen.cs @@ -9,12 +9,13 @@ namespace Test using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 1 "x:\dir\subdir\Test\TestComponent.cshtml" -using Microsoft.AspNetCore.Components.Rendering; +#line (1,2)-(2,1) "x:\dir\subdir\Test\TestComponent.cshtml" +using Microsoft.AspNetCore.Components.Rendering #line default #line hidden #nullable disable + ; public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase { #pragma warning disable 1998 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt index 408d2152724..bc778ad829a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InMarkupInFunctionsBlock/TestComponent.mappings.txt @@ -1,9 +1,16 @@ -Source Location: (57:1,7 [57] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (1:0,1 [49] x:\dir\subdir\Test\TestComponent.cshtml) +|using Microsoft.AspNetCore.Components.Rendering +| +Generated Location: (370:12,0 [49] ) +|using Microsoft.AspNetCore.Components.Rendering +| + +Source Location: (57:1,7 [57] x:\dir\subdir\Test\TestComponent.cshtml) | void MyMethod(RenderTreeBuilder __builder) { | -Generated Location: (866:26,7 [57] ) +Generated Location: (882:27,7 [57] ) | void MyMethod(RenderTreeBuilder __builder) { @@ -13,27 +20,27 @@ Source Location: (141:5,13 [46] x:\dir\subdir\Test\TestComponent.cshtml) |for (var i = 0; i < 100; i++) { | -Generated Location: (1097:36,13 [46] ) +Generated Location: (1113:37,13 [46] ) |for (var i = 0; i < 100; i++) { | Source Location: (230:8,21 [1] x:\dir\subdir\Test\TestComponent.cshtml) |i| -Generated Location: (1343:45,24 [1] ) +Generated Location: (1359:46,24 [1] ) |i| Source Location: (256:10,0 [15] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (1504:53,0 [15] ) +Generated Location: (1520:54,0 [15] ) | } | Source Location: (286:12,0 [7] x:\dir\subdir\Test\TestComponent.cshtml) | } | -Generated Location: (1675:61,0 [7] ) +Generated Location: (1691:62,0 [7] ) | } | diff --git a/src/Compiler/test/Microsoft.NET.Sdk.Razor.SourceGenerators.Tests/RazorSourceGeneratorTests.cs b/src/Compiler/test/Microsoft.NET.Sdk.Razor.SourceGenerators.Tests/RazorSourceGeneratorTests.cs index 9748a8e989d..09b3caba498 100644 --- a/src/Compiler/test/Microsoft.NET.Sdk.Razor.SourceGenerators.Tests/RazorSourceGeneratorTests.cs +++ b/src/Compiler/test/Microsoft.NET.Sdk.Razor.SourceGenerators.Tests/RazorSourceGeneratorTests.cs @@ -971,9 +971,9 @@ public async Task IncrementalCompilation_RazorFiles_WhenProjectReferencesChange( var (driver, additionalTexts) = await GetDriverWithAdditionalTextAsync(project); var result = RunGenerator(compilation!, ref driver, - // Pages/Index.razor(2,7): error CS0246: The type or namespace name 'SurveyPromptRootNamspace' could not be found (are you missing a using directive or an assembly reference?) + // Pages/Index.razor(2,8): error CS0246: The type or namespace name 'SurveyPromptRootNamspace' could not be found (are you missing a using directive or an assembly reference?) // using SurveyPromptRootNamspace; - Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "SurveyPromptRootNamspace").WithArguments("SurveyPromptRootNamspace").WithLocation(2, 7) + Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "SurveyPromptRootNamspace").WithArguments("SurveyPromptRootNamspace").WithLocation(2, 8) ); result.VerifyPageOutput( @@ -989,7 +989,7 @@ namespace MyApp.Pages using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 2 ""Pages/Index.razor"" +#line (2,2)-(3,1) ""Pages/Index.razor"" using SurveyPromptRootNamspace; #line default @@ -1056,7 +1056,7 @@ namespace MyApp.Pages using global::System.Threading.Tasks; using global::Microsoft.AspNetCore.Components; #nullable restore -#line 2 ""Pages/Index.razor"" +#line (2,2)-(3,1) ""Pages/Index.razor"" using SurveyPromptRootNamspace; #line default