MalformedRequiredAttribute_Descriptors =
+ public static readonly TagHelperCollection MalformedRequiredAttribute_TagHelpers =
[
TagHelperDescriptorBuilder.CreateTagHelper("pTagHelper", "SomeAssembly")
.TagMatchingRuleDescriptor(rule =>
@@ -1237,71 +1236,71 @@ public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10()
[Fact]
public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1()
{
- EvaluateData(MalformedRequiredAttribute_Descriptors, "");
+ EvaluateData(MalformedRequiredAttribute_TagHelpers, "");
}
[Fact]
public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8()
{
- EvaluateData(MalformedRequiredAttribute_Descriptors, "
");
+ EvaluateData(MalformedRequiredAttribute_TagHelpers, "
");
}
[Fact]
public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9()
{
- EvaluateData(MalformedRequiredAttribute_Descriptors, "
PrefixedTagHelperColon_Descriptors =
+ public static readonly TagHelperCollection PrefixedTagHelperColon_TagHelpers =
[
TagHelperDescriptorBuilder.CreateTagHelper("mythTagHelper", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("myth"))
@@ -1316,7 +1315,7 @@ public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1
.Build()
];
- public static ImmutableArray PrefixedTagHelperCatchAll_Descriptors =
+ public static readonly TagHelperCollection PrefixedTagHelperCatchAll_TagHelpers =
[
TagHelperDescriptorBuilder.CreateTagHelper("mythTagHelper", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("*"))
@@ -1326,67 +1325,67 @@ public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1
[Fact]
public void AllowsPrefixedTagHelpers1()
{
- EvaluateData(PrefixedTagHelperCatchAll_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperCatchAll_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers2()
{
- EvaluateData(PrefixedTagHelperCatchAll_Descriptors, "words and spaces", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperCatchAll_TagHelpers, "words and spaces", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers3()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers4()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers5()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers6()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers7()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "!th:myth>", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "!th:myth>", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers8()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers9()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers10()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "words and spaces", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "words and spaces", tagHelperPrefix: "th:");
}
[Fact]
public void AllowsPrefixedTagHelpers11()
{
- EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:");
+ EvaluateData(PrefixedTagHelperColon_TagHelpers, "", tagHelperPrefix: "th:");
}
[Fact]
@@ -1911,7 +1910,7 @@ public void HandlesNonTagHelperStartAndEndVoidTags_Correctly()
RunParseTreeRewriterTest("Foo");
}
- public static ImmutableArray CaseSensitive_Descriptors =
+ public static readonly TagHelperCollection CaseSensitive_TagHelpers =
[
TagHelperDescriptorBuilder.CreateTagHelper("pTagHelper", "SomeAssembly")
.SetCaseSensitive()
@@ -1936,30 +1935,30 @@ public void HandlesNonTagHelperStartAndEndVoidTags_Correctly()
[Fact]
public void HandlesCaseSensitiveTagHelpersCorrectly1()
{
- EvaluateData(CaseSensitive_Descriptors, "");
+ EvaluateData(CaseSensitive_TagHelpers, "");
}
[Fact]
public void HandlesCaseSensitiveTagHelpersCorrectly2()
{
- EvaluateData(CaseSensitive_Descriptors, "");
+ EvaluateData(CaseSensitive_TagHelpers, "");
}
[Fact]
public void HandlesCaseSensitiveTagHelpersCorrectly3()
{
- EvaluateData(CaseSensitive_Descriptors, "");
+ EvaluateData(CaseSensitive_TagHelpers, "");
}
[Fact]
public void HandlesCaseSensitiveTagHelpersCorrectly4()
{
- EvaluateData(CaseSensitive_Descriptors, "");
+ EvaluateData(CaseSensitive_TagHelpers, "");
}
[Fact]
public void HandlesCaseSensitiveTagHelpersCorrectly5()
{
- EvaluateData(CaseSensitive_Descriptors, "");
+ EvaluateData(CaseSensitive_TagHelpers, "");
}
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs
index aca41009202..6b163169ab5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs
@@ -1,10 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-#nullable disable
-
using System;
-using System.Collections.Generic;
using System.Collections.Immutable;
using Xunit;
@@ -12,39 +9,38 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy;
public class TagHelperRewritingTestBase() : ParserTestBase(layer: TestProject.Layer.Compiler)
{
- internal void RunParseTreeRewriterTest(string documentContent, params string[] tagNames)
+ internal void RunParseTreeRewriterTest(string documentContent, params ImmutableArray tagNames)
{
- var descriptors = BuildDescriptors(tagNames);
+ var tagHelpers = BuildTagHelpers(tagNames);
- EvaluateData(descriptors, documentContent);
+ EvaluateData(tagHelpers, documentContent);
}
- internal ImmutableArray BuildDescriptors(params string[] tagNames)
+ internal static TagHelperCollection BuildTagHelpers(params ImmutableArray tagNames)
{
- var descriptors = new List();
-
- foreach (var tagName in tagNames)
+ return TagHelperCollection.Build(tagNames, (ref builder, tagNames) =>
{
- var descriptor = TagHelperDescriptorBuilder.CreateTagHelper(tagName + "taghelper", "SomeAssembly")
- .TagMatchingRuleDescriptor(rule => rule.RequireTagName(tagName))
- .Build();
- descriptors.Add(descriptor);
- }
-
- return descriptors.ToImmutableArray();
+ foreach (var tagName in tagNames)
+ {
+ var tagHelper = TagHelperDescriptorBuilder.CreateTagHelper(tagName + "taghelper", "SomeAssembly")
+ .TagMatchingRuleDescriptor(rule => rule.RequireTagName(tagName))
+ .Build();
+ builder.Add(tagHelper);
+ }
+ });
}
internal void EvaluateData(
- ImmutableArray descriptors,
+ TagHelperCollection tagHelpers,
string documentContent,
- string tagHelperPrefix = null,
- RazorLanguageVersion languageVersion = null,
+ string? tagHelperPrefix = null,
+ RazorLanguageVersion? languageVersion = null,
RazorFileKind? fileKind = null,
- Action configureParserOptions = null)
+ Action? configureParserOptions = null)
{
var syntaxTree = ParseDocument(languageVersion, documentContent, directives: default, fileKind: fileKind, configureParserOptions: configureParserOptions);
- var binder = new TagHelperBinder(tagHelperPrefix, descriptors);
+ var binder = new TagHelperBinder(tagHelperPrefix, tagHelpers);
var rewrittenTree = TagHelperParseTreeRewriter.Rewrite(syntaxTree, binder);
Assert.Equal(syntaxTree.Root.Width, rewrittenTree.Root.Width);
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs
index 0948fa7b0d7..906e620fb6e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs
@@ -16,7 +16,7 @@ public void GetAndSetImportSyntaxTrees_ReturnsSyntaxTrees()
var codeDocument = TestRazorCodeDocument.CreateEmpty();
var importSyntaxTree = RazorSyntaxTree.Parse(codeDocument.Source);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
var actual = codeDocument.GetImportSyntaxTrees();
@@ -32,12 +32,12 @@ public void GetAndSetTagHelpers_ReturnsTagHelpers()
// Arrange
var codeDocument = TestRazorCodeDocument.CreateEmpty();
- var expected = new[]
- {
+ TagHelperCollection expected =
+ [
TagHelperDescriptorBuilder.CreateTagHelper("TestTagHelper", "TestAssembly").Build()
- };
+ ];
- codeDocument.SetTagHelpers(expected);
+ codeDocument = codeDocument.WithTagHelpers(expected);
// Act
var actual = codeDocument.GetTagHelpers();
@@ -52,8 +52,8 @@ public void GetAndSetTagHelperContext_ReturnsTagHelperContext()
// Arrange
var codeDocument = TestRazorCodeDocument.CreateEmpty();
- var expected = TagHelperDocumentContext.Create(prefix: null, tagHelpers: []);
- codeDocument.SetTagHelperContext(expected);
+ var expected = TagHelperDocumentContext.GetOrCreate(tagHelpers: []);
+ codeDocument = codeDocument.WithTagHelperContext(expected);
// Act
var actual = codeDocument.GetTagHelperContext();
@@ -203,7 +203,7 @@ public void TryGetNamespace_RespectsNamespaceDirective()
}),
codeGenerationOptions: RazorCodeGenerationOptions.Default.WithRootNamespace("Hello.World"));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
@@ -228,7 +228,7 @@ public void TryGetNamespace_RespectsImportsNamespaceDirective()
}),
codeGenerationOptions: RazorCodeGenerationOptions.Default.WithRootNamespace("Hello.World"));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importSource = TestRazorSourceDocument.Create(
content: "@namespace My.Custom.NS",
@@ -236,7 +236,7 @@ public void TryGetNamespace_RespectsImportsNamespaceDirective()
relativePath: "\\_Imports.razor");
var importSyntaxTree = RazorSyntaxTree.Parse(importSource, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
@@ -260,7 +260,7 @@ public void TryGetNamespace_IgnoresImportsNamespaceDirectiveWhenAsked()
}),
codeGenerationOptions: RazorCodeGenerationOptions.Default.WithRootNamespace("Hello.World"));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importSource = TestRazorSourceDocument.Create(
content: "@namespace My.Custom.NS",
@@ -268,7 +268,7 @@ public void TryGetNamespace_IgnoresImportsNamespaceDirectiveWhenAsked()
relativePath: "\\_Imports.razor");
var importSyntaxTree = RazorSyntaxTree.Parse(importSource, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, considerImports: false, out var @namespace, out _);
@@ -293,7 +293,7 @@ public void TryGetNamespace_RespectsImportsNamespaceDirective_SameFolder()
}),
codeGenerationOptions: RazorCodeGenerationOptions.Default.WithRootNamespace("Hello.World"));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importSource = TestRazorSourceDocument.Create(
content: "@namespace My.Custom.NS",
@@ -301,7 +301,7 @@ public void TryGetNamespace_RespectsImportsNamespaceDirective_SameFolder()
relativePath: "\\Components\\_Imports.razor");
var importSyntaxTree = RazorSyntaxTree.Parse(importSource, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
@@ -326,7 +326,7 @@ public void TryGetNamespace_OverrideImportsNamespaceDirective()
builder.Directives = [NamespaceDirective.Directive];
}));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importSource = TestRazorSourceDocument.Create(
content: "@namespace My.Custom.NS",
@@ -334,7 +334,7 @@ public void TryGetNamespace_OverrideImportsNamespaceDirective()
relativePath: "\\_Imports.razor");
var importSyntaxTree = RazorSyntaxTree.Parse(importSource, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
@@ -358,7 +358,7 @@ public void TryGetNamespace_PicksNearestImportsNamespaceDirective()
builder.Directives = [NamespaceDirective.Directive];
}));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importSource1 = TestRazorSourceDocument.Create(
content: "@namespace RazorPagesWebSite.Pages",
@@ -374,7 +374,7 @@ public void TryGetNamespace_PicksNearestImportsNamespaceDirective()
var importSyntaxTree2 = RazorSyntaxTree.Parse(importSource2, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree1, importSyntaxTree2]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree1, importSyntaxTree2]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
@@ -405,7 +405,7 @@ public void TryGetNamespace_ComputesNamespaceWithSuffix(string basePath, string
source,
parserOptions: RazorParserOptions.Default.WithDirectives(NamespaceDirective.Directive));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importRelativePath = "_ViewImports.cshtml";
var importSource = TestRazorSourceDocument.Create(
@@ -414,7 +414,7 @@ public void TryGetNamespace_ComputesNamespaceWithSuffix(string basePath, string
relativePath: importRelativePath);
var importSyntaxTree = RazorSyntaxTree.Parse(importSource, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
@@ -435,7 +435,7 @@ public void TryGetNamespace_ForNonRelatedFiles_UsesNamespaceVerbatim()
source,
parserOptions: RazorParserOptions.Default.WithDirectives(NamespaceDirective.Directive));
- codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
+ codeDocument = codeDocument.WithSyntaxTree(RazorSyntaxTree.Parse(source, codeDocument.ParserOptions));
var importSource = TestRazorSourceDocument.Create(
content: "@namespace Base",
@@ -443,7 +443,7 @@ public void TryGetNamespace_ForNonRelatedFiles_UsesNamespaceVerbatim()
relativePath: "baz\\bleh.cshtml");
var importSyntaxTree = RazorSyntaxTree.Parse(importSource, codeDocument.ParserOptions);
- codeDocument.SetImportSyntaxTrees([importSyntaxTree]);
+ codeDocument = codeDocument.WithImportSyntaxTrees([importSyntaxTree]);
// Act
codeDocument.TryGetNamespace(fallbackToRootNamespace: true, out var @namespace);
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs
index b9adf22fd5c..adca78ffa6c 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs
@@ -70,9 +70,10 @@ private sealed class TestPhase : RazorEnginePhaseBase
{
public int CallCount;
- protected override void ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
+ protected override RazorCodeDocument ExecuteCore(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
{
Interlocked.Increment(ref CallCount);
+ return codeDocument;
}
}
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs
index d52b3566337..89fb8bc8e9c 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs
@@ -19,7 +19,7 @@ public void TryParseInvalid()
var value = "not-version";
// Act
- var result = RazorLanguageVersion.TryParse(value, out var _);
+ var result = RazorLanguageVersion.TryParse(value, out _);
// Assert
Assert.False(result);
@@ -165,6 +165,34 @@ public void TryParse90()
Assert.Same(RazorLanguageVersion.Version_9_0, version);
}
+ [Fact]
+ public void TryParse100()
+ {
+ // Arrange
+ var value = "10.0";
+
+ // Act
+ var result = RazorLanguageVersion.TryParse(value, out var version);
+
+ // Assert
+ Assert.True(result);
+ Assert.Same(RazorLanguageVersion.Version_10_0, version);
+ }
+
+ [Fact]
+ public void TryParse110()
+ {
+ // Arrange
+ var value = "11.0";
+
+ // Act
+ var result = RazorLanguageVersion.TryParse(value, out var version);
+
+ // Assert
+ Assert.True(result);
+ Assert.Same(RazorLanguageVersion.Version_11_0, version);
+ }
+
[Fact]
public void TryParseLatest()
{
@@ -195,10 +223,10 @@ public void TryParseExperimental()
}
[Fact]
- public void LatestPointsToNewestVersion()
+ public void PreviewPointsToNewestVersion()
{
// Arrange
- var v = RazorLanguageVersion.Parse("latest");
+ var v = RazorLanguageVersion.Parse("preview");
var versions = typeof(RazorLanguageVersion).GetFields(BindingFlags.Public | BindingFlags.Static)
.Where(f => f.Name.StartsWith("Version_", StringComparison.Ordinal))
.Select(f => f.GetValue(obj: null))
@@ -208,7 +236,7 @@ public void LatestPointsToNewestVersion()
Assert.NotEmpty(versions);
foreach (var version in versions)
{
- Assert.True(version.CompareTo(v) <= 0, $"RazorLanguageVersion {version} has a higher version than RazorLanguageVersion.Latest");
+ Assert.True(version.CompareTo(v) <= 0, $"RazorLanguageVersion {version} has a higher version than RazorLanguageVersion.Preview");
}
}
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs
index b479c94888a..6e493e2172f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs
@@ -89,6 +89,7 @@ private static void AssertDefaultFeatures(RazorProjectEngine engine)
feature => Assert.IsType(feature),
feature => Assert.IsType(feature),
feature => Assert.IsType(feature),
+ feature => Assert.IsType(feature),
feature => Assert.IsType(feature));
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs
index b5e72bb7d24..6c9f4738086 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs
@@ -1,12 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
-using System.Linq;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Language;
@@ -20,25 +17,26 @@ public void GetBinding_ReturnsBindingWithInformation()
var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("DivTagHelper", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- ImmutableArray expectedDescriptors = [divTagHelper];
+ TagHelperCollection expectedTagHelpers = [divTagHelper];
var expectedAttributes = ImmutableArray.Create(
new KeyValuePair("class", "something"));
- var tagHelperBinder = new TagHelperBinder("th:", expectedDescriptors);
+ var binder = new TagHelperBinder("th:", expectedTagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "th:div",
attributes: expectedAttributes,
parentTagName: "body",
parentIsTagHelper: false);
// Assert
- Assert.Equal(expectedDescriptors, bindingResult.Descriptors);
- Assert.Equal("th:div", bindingResult.TagName);
- Assert.Equal("body", bindingResult.ParentTagName);
- Assert.Equal>(expectedAttributes, bindingResult.Attributes);
- Assert.Equal("th:", bindingResult.TagNamePrefix);
- Assert.Equal(divTagHelper.TagMatchingRules, bindingResult.GetBoundRules(divTagHelper));
+ Assert.NotNull(binding);
+ Assert.Equal(expectedTagHelpers, binding.TagHelpers);
+ Assert.Equal("th:div", binding.TagName);
+ Assert.Equal("body", binding.ParentTagName);
+ Assert.Equal>(expectedAttributes, binding.Attributes);
+ Assert.Equal("th:", binding.TagNamePrefix);
+ Assert.Equal(divTagHelper.TagMatchingRules, binding.GetBoundRules(divTagHelper));
}
[Fact]
@@ -50,37 +48,37 @@ public void GetBinding_With_Multiple_TagNameRules_SingleHelper()
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("a"))
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("img"))
.Build();
- ImmutableArray expectedDescriptors = [multiTagHelper];
- var tagHelperBinder = new TagHelperBinder("", expectedDescriptors);
+ TagHelperCollection expectedTagHelpers = [multiTagHelper];
+ var binder = new TagHelperBinder("", expectedTagHelpers);
TestTagName("div", multiTagHelper.TagMatchingRules[0]);
TestTagName("a", multiTagHelper.TagMatchingRules[1]);
TestTagName("img", multiTagHelper.TagMatchingRules[2]);
TestTagName("p", null);
TestTagName("*", null);
- void TestTagName(string tagName, TagMatchingRuleDescriptor expectedBindingResult)
+
+ void TestTagName(string tagName, TagMatchingRuleDescriptor? expectedBindingResult)
{
// Act
- var bindingResult = tagHelperBinder.GetBinding(
-
+ var binding = binder.GetBinding(
tagName: tagName,
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "body",
parentIsTagHelper: false);
// Assert
if (expectedBindingResult == null)
{
- Assert.Null(bindingResult);
+ Assert.Null(binding);
return;
}
else
{
- Assert.NotNull(bindingResult);
- Assert.Equal(expectedDescriptors, bindingResult.Descriptors);
+ Assert.NotNull(binding);
+ Assert.Equal(expectedTagHelpers, binding.TagHelpers);
- Assert.Equal(tagName, bindingResult.TagName);
- var mapping = Assert.Single(bindingResult.GetBoundRules(multiTagHelper));
+ Assert.Equal(tagName, binding.TagName);
+ var mapping = Assert.Single(binding.GetBoundRules(multiTagHelper));
Assert.Equal(expectedBindingResult, mapping);
}
}
@@ -102,7 +100,7 @@ public void GetBinding_With_Multiple_TagNameRules_MultipleHelpers()
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("table"))
.Build();
- var tagHelperBinder = new TagHelperBinder("", [multiTagHelper1, multiTagHelper2]);
+ var binder = new TagHelperBinder("", [multiTagHelper1, multiTagHelper2]);
TestTagName("div", [multiTagHelper1, multiTagHelper2], [multiTagHelper1.TagMatchingRules[0], multiTagHelper2.TagMatchingRules[0]]);
TestTagName("a", [multiTagHelper1], [multiTagHelper1.TagMatchingRules[1]]);
@@ -111,38 +109,38 @@ public void GetBinding_With_Multiple_TagNameRules_MultipleHelpers()
TestTagName("table", [multiTagHelper2], [multiTagHelper2.TagMatchingRules[2]]);
TestTagName("*", null, null);
-
- void TestTagName(string tagName, TagHelperDescriptor[] expectedDescriptors, TagMatchingRuleDescriptor[] expectedBindingResults)
+ void TestTagName(string tagName, TagHelperCollection? expectedTagHelpers, TagMatchingRuleDescriptor[]? expectedBindingResults)
{
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: tagName,
attributes: [],
parentTagName: "body",
parentIsTagHelper: false);
// Assert
- if (expectedDescriptors is null)
+ if (expectedTagHelpers is null)
{
- Assert.Null(bindingResult);
+ Assert.Null(binding);
}
else
{
- Assert.NotNull(bindingResult);
- Assert.Equal(expectedDescriptors, bindingResult.Descriptors);
+ Assert.NotNull(binding);
+ Assert.Equal(expectedTagHelpers, binding.TagHelpers);
+ Assert.NotNull(expectedBindingResults);
- Assert.Equal(tagName, bindingResult.TagName);
+ Assert.Equal(tagName, binding.TagName);
- for (int i = 0; i < expectedDescriptors.Length; i++)
+ for (var i = 0; i < expectedTagHelpers.Count; i++)
{
- var mapping = Assert.Single(bindingResult.GetBoundRules(expectedDescriptors[i]));
+ var mapping = Assert.Single(binding.GetBoundRules(expectedTagHelpers[i]));
Assert.Equal(expectedBindingResults[i], mapping);
}
}
}
}
- public static TheoryData RequiredParentData
+ public static TheoryData RequiredParentData
{
get
{
@@ -163,37 +161,34 @@ public static TheoryData RequiredParentData
.RequireParentTag("p"))
.Build();
- return new TheoryData<
- string, // tagName
- string, // parentTagName
- ImmutableArray, // availableDescriptors
- ImmutableArray> // expectedDescriptors
+ // tagName, parentTagName, availableTagHelpers, expectedTagHelpers
+ return new()
+ {
+ {
+ "strong",
+ "p",
+ [strongPDivParent],
+ [strongPDivParent]
+ },
{
- {
- "strong",
- "p",
- [strongPDivParent],
- [strongPDivParent]
- },
- {
- "strong",
- "div",
- [strongPDivParent, catchAllPParent],
- [strongPDivParent]
- },
- {
- "strong",
- "p",
- [strongPDivParent, catchAllPParent],
- [strongPDivParent, catchAllPParent]
- },
- {
- "custom",
- "p",
- [strongPDivParent, catchAllPParent],
- [catchAllPParent]
- },
- };
+ "strong",
+ "div",
+ [strongPDivParent, catchAllPParent],
+ [strongPDivParent]
+ },
+ {
+ "strong",
+ "p",
+ [strongPDivParent, catchAllPParent],
+ [strongPDivParent, catchAllPParent]
+ },
+ {
+ "custom",
+ "p",
+ [strongPDivParent, catchAllPParent],
+ [catchAllPParent]
+ }
+ };
}
}
@@ -202,24 +197,25 @@ public static TheoryData RequiredParentData
public void GetBinding_ReturnsBindingResultWithDescriptorsParentTags(
string tagName,
string parentTagName,
- ImmutableArray availableDescriptors,
- ImmutableArray expectedDescriptors)
+ TagHelperCollection availableTagHelpers,
+ TagHelperCollection expectedTagHelpers)
{
// Arrange
- var tagHelperBinder = new TagHelperBinder(null, availableDescriptors);
+ var binder = new TagHelperBinder(null, availableTagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName,
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: parentTagName,
parentIsTagHelper: false);
// Assert
- Assert.Equal(expectedDescriptors, bindingResult.Descriptors);
+ Assert.NotNull(binding);
+ Assert.Equal(expectedTagHelpers, binding.TagHelpers);
}
- public static TheoryData RequiredAttributeData
+ public static TheoryData>, TagHelperCollection, TagHelperCollection?> RequiredAttributeData
{
get
{
@@ -257,100 +253,97 @@ public static TheoryData RequiredAttributeData
.RequireAttributeDescriptor(attribute => attribute
.Name("prefix-", RequiredAttributeNameComparison.PrefixMatch)))
.Build();
- ImmutableArray defaultAvailableDescriptors =
+ TagHelperCollection defaultAvailableDescriptors =
[divDescriptor, inputDescriptor, catchAllDescriptor, catchAllDescriptor2];
- ImmutableArray defaultWildcardDescriptors =
+ TagHelperCollection defaultWildcardDescriptors =
[inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor];
Func> kvp =
(name) => new KeyValuePair(name, "test value");
- return new TheoryData<
- string, // tagName
- ImmutableArray>, // providedAttributes
- ImmutableArray, // availableDescriptors
- ImmutableArray> // expectedDescriptors
+ // tagName, providedAttributes, availableTagHelpers, expectedTagHelpers
+ return new()
+ {
+ {
+ "div",
+ ImmutableArray.Create(kvp("custom")),
+ defaultAvailableDescriptors,
+ default
+ },
+ { "div", ImmutableArray.Create(kvp("style")), defaultAvailableDescriptors, [divDescriptor] },
+ { "div", ImmutableArray.Create(kvp("class")), defaultAvailableDescriptors, [catchAllDescriptor] },
+ {
+ "div",
+ ImmutableArray.Create(kvp("class"), kvp("style")),
+ defaultAvailableDescriptors,
+ [divDescriptor, catchAllDescriptor]
+ },
+ {
+ "div",
+ ImmutableArray.Create(kvp("class"), kvp("style"), kvp("custom")),
+ defaultAvailableDescriptors,
+ [divDescriptor, catchAllDescriptor, catchAllDescriptor2]
+ },
{
- {
- "div",
- ImmutableArray.Create(kvp("custom")),
- defaultAvailableDescriptors,
- default
- },
- { "div", ImmutableArray.Create(kvp("style")), defaultAvailableDescriptors, [divDescriptor] },
- { "div", ImmutableArray.Create(kvp("class")), defaultAvailableDescriptors, [catchAllDescriptor] },
- {
- "div",
- ImmutableArray.Create(kvp("class"), kvp("style")),
- defaultAvailableDescriptors,
- [divDescriptor, catchAllDescriptor]
- },
- {
- "div",
- ImmutableArray.Create(kvp("class"), kvp("style"), kvp("custom")),
- defaultAvailableDescriptors,
- [divDescriptor, catchAllDescriptor, catchAllDescriptor2]
- },
- {
- "input",
- ImmutableArray.Create(kvp("class"), kvp("style")),
- defaultAvailableDescriptors,
- [inputDescriptor, catchAllDescriptor]
- },
- {
- "input",
- ImmutableArray.Create(kvp("nodashprefixA")),
- defaultWildcardDescriptors,
- [inputWildcardPrefixDescriptor]
- },
- {
- "input",
- ImmutableArray.Create(kvp("nodashprefix-ABC-DEF"), kvp("random")),
- defaultWildcardDescriptors,
- [inputWildcardPrefixDescriptor]
- },
- {
- "input",
- ImmutableArray.Create(kvp("prefixABCnodashprefix")),
- defaultWildcardDescriptors,
- default
- },
- {
- "input",
- ImmutableArray.Create(kvp("prefix-")),
- defaultWildcardDescriptors,
- default
- },
- {
- "input",
- ImmutableArray.Create(kvp("nodashprefix")),
- defaultWildcardDescriptors,
- default
- },
- {
- "input",
- ImmutableArray.Create(kvp("prefix-A")),
- defaultWildcardDescriptors,
- [catchAllWildcardPrefixDescriptor]
- },
- {
- "input",
- ImmutableArray.Create(kvp("prefix-ABC-DEF"), kvp("random")),
- defaultWildcardDescriptors,
- [catchAllWildcardPrefixDescriptor]
- },
- {
- "input",
- ImmutableArray.Create(kvp("prefix-abc"), kvp("nodashprefix-def")),
- defaultWildcardDescriptors,
- [inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor]
- },
- {
- "input",
- ImmutableArray.Create(kvp("class"), kvp("prefix-abc"), kvp("onclick"), kvp("nodashprefix-def"), kvp("style")),
- defaultWildcardDescriptors,
- [inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor]
- },
- };
+ "input",
+ ImmutableArray.Create(kvp("class"), kvp("style")),
+ defaultAvailableDescriptors,
+ [inputDescriptor, catchAllDescriptor]
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("nodashprefixA")),
+ defaultWildcardDescriptors,
+ [inputWildcardPrefixDescriptor]
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("nodashprefix-ABC-DEF"), kvp("random")),
+ defaultWildcardDescriptors,
+ [inputWildcardPrefixDescriptor]
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("prefixABCnodashprefix")),
+ defaultWildcardDescriptors,
+ null
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("prefix-")),
+ defaultWildcardDescriptors,
+ null
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("nodashprefix")),
+ defaultWildcardDescriptors,
+ null
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("prefix-A")),
+ defaultWildcardDescriptors,
+ [catchAllWildcardPrefixDescriptor]
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("prefix-ABC-DEF"), kvp("random")),
+ defaultWildcardDescriptors,
+ [catchAllWildcardPrefixDescriptor]
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("prefix-abc"), kvp("nodashprefix-def")),
+ defaultWildcardDescriptors,
+ [inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor]
+ },
+ {
+ "input",
+ ImmutableArray.Create(kvp("class"), kvp("prefix-abc"), kvp("onclick"), kvp("nodashprefix-def"), kvp("style")),
+ defaultWildcardDescriptors,
+ [inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor]
+ },
+ };
}
}
@@ -359,24 +352,24 @@ public static TheoryData RequiredAttributeData
public void GetBinding_ReturnsBindingResultDescriptorsWithRequiredAttributes(
string tagName,
ImmutableArray> providedAttributes,
- ImmutableArray availableDescriptors,
- ImmutableArray expectedDescriptors)
+ TagHelperCollection availableTagHelpers,
+ TagHelperCollection? expectedTagHelpers)
{
// Arrange
- var tagHelperBinder = new TagHelperBinder(null, availableDescriptors);
+ var binder = new TagHelperBinder(null, availableTagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(tagName, providedAttributes, parentTagName: "p", parentIsTagHelper: false);
- var descriptors = bindingResult?.Descriptors ?? default;
+ var binding = binder.GetBinding(tagName, providedAttributes, parentTagName: "p", parentIsTagHelper: false);
+ var tagHelpers = binding?.TagHelpers;
// Assert
- if (expectedDescriptors.IsDefault)
+ if (expectedTagHelpers is null)
{
- Assert.True(descriptors.IsDefault);
+ Assert.Null(tagHelpers);
}
else
{
- Assert.Equal(expectedDescriptors, descriptors);
+ Assert.Equal(expectedTagHelpers, tagHelpers);
}
}
@@ -384,72 +377,75 @@ public void GetBinding_ReturnsBindingResultDescriptorsWithRequiredAttributes(
public void GetBinding_ReturnsNullBindingResultPrefixAsTagName()
{
// Arrange
- var catchAllDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var catchAllTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName))
.Build();
- ImmutableArray descriptors = [catchAllDescriptor];
- var tagHelperBinder = new TagHelperBinder("th", descriptors);
+ TagHelperCollection tagHelpers = [catchAllTagHelper];
+ var tagHelperBinder = new TagHelperBinder("th", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = tagHelperBinder.GetBinding(
tagName: "th",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- Assert.Null(bindingResult);
+ Assert.Null(binding);
}
[Fact]
public void GetBinding_ReturnsBindingResultCatchAllDescriptorsForPrefixedTags()
{
// Arrange
- var catchAllDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var catchAllTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName))
.Build();
- ImmutableArray descriptors = [catchAllDescriptor];
- var tagHelperBinder = new TagHelperBinder("th:", descriptors);
+ TagHelperCollection tagHelpers = [catchAllTagHelper];
+ var tagHelperBinder = new TagHelperBinder("th:", tagHelpers);
// Act
- var bindingResultDiv = tagHelperBinder.GetBinding(
+ var bindingDiv = tagHelperBinder.GetBinding(
tagName: "th:div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
- var bindingResultSpan = tagHelperBinder.GetBinding(
+ var bindingSpan = tagHelperBinder.GetBinding(
tagName: "th:span",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- var descriptor = Assert.Single(bindingResultDiv.Descriptors);
- Assert.Same(catchAllDescriptor, descriptor);
- descriptor = Assert.Single(bindingResultSpan.Descriptors);
- Assert.Same(catchAllDescriptor, descriptor);
+ Assert.NotNull(bindingDiv);
+ var tagHelper = Assert.Single(bindingDiv.TagHelpers);
+ Assert.Same(catchAllTagHelper, tagHelper);
+ Assert.NotNull(bindingSpan);
+ tagHelper = Assert.Single(bindingSpan.TagHelpers);
+ Assert.Same(catchAllTagHelper, tagHelper);
}
[Fact]
public void GetBinding_ReturnsBindingResultDescriptorsForPrefixedTags()
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- ImmutableArray descriptors = [divDescriptor];
- var tagHelperBinder = new TagHelperBinder("th:", descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper];
+ var tagHelperBinder = new TagHelperBinder("th:", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = tagHelperBinder.GetBinding(
tagName: "th:div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- var descriptor = Assert.Single(bindingResult.Descriptors);
- Assert.Same(divDescriptor, descriptor);
+ Assert.NotNull(binding);
+ var tagHelper = Assert.Single(binding.TagHelpers);
+ Assert.Same(divTagHelper, tagHelper);
}
[Theory]
@@ -458,114 +454,117 @@ public void GetBinding_ReturnsBindingResultDescriptorsForPrefixedTags()
public void GetBinding_ReturnsNullForUnprefixedTags(string tagName)
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName(tagName))
.Build();
- ImmutableArray descriptors = [divDescriptor];
- var tagHelperBinder = new TagHelperBinder("th:", descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper];
+ var binder = new TagHelperBinder("th:", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- Assert.Null(bindingResult);
+ Assert.Null(binding);
}
[Fact]
public void GetDescriptors_ReturnsNothingForUnregisteredTags()
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- var spanDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo2", "SomeAssembly")
+ var spanTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo2", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("span"))
.Build();
- ImmutableArray descriptors = [divDescriptor, spanDescriptor];
- var tagHelperBinder = new TagHelperBinder(null, descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper, spanTagHelper];
+ var binder = new TagHelperBinder(null, tagHelpers);
// Act
- var tagHelperBinding = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "foo",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- Assert.Null(tagHelperBinding);
+ Assert.Null(binding);
}
[Fact]
public void GetDescriptors_ReturnsCatchAllsWithEveryTagName()
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- var spanDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo2", "SomeAssembly")
+ var spanTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo2", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("span"))
.Build();
- var catchAllDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo3", "SomeAssembly")
+ var catchAllTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo3", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName))
.Build();
- ImmutableArray descriptors = [divDescriptor, spanDescriptor, catchAllDescriptor];
- var tagHelperBinder = new TagHelperBinder(null, descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper, spanTagHelper, catchAllTagHelper];
+ var binder = new TagHelperBinder(null, tagHelpers);
// Act
- var divBinding = tagHelperBinder.GetBinding(
+ var divBinding = binder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
- var spanBinding = tagHelperBinder.GetBinding(
+ var spanBinding = binder.GetBinding(
tagName: "span",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
// For divs
- Assert.Equal(2, divBinding.Descriptors.Count());
- Assert.Contains(divDescriptor, divBinding.Descriptors);
- Assert.Contains(catchAllDescriptor, divBinding.Descriptors);
+ Assert.NotNull(divBinding);
+ Assert.Equal(2, divBinding.TagHelpers.Count);
+ Assert.Contains(divTagHelper, divBinding.TagHelpers);
+ Assert.Contains(catchAllTagHelper, divBinding.TagHelpers);
// For spans
- Assert.Equal(2, spanBinding.Descriptors.Count());
- Assert.Contains(spanDescriptor, spanBinding.Descriptors);
- Assert.Contains(catchAllDescriptor, spanBinding.Descriptors);
+ Assert.NotNull(spanBinding);
+ Assert.Equal(2, spanBinding.TagHelpers.Count);
+ Assert.Contains(spanTagHelper, spanBinding.TagHelpers);
+ Assert.Contains(catchAllTagHelper, spanBinding.TagHelpers);
}
[Fact]
public void GetDescriptors_DuplicateDescriptorsAreNotPartOfTagHelperDescriptorPool()
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- ImmutableArray descriptors = [divDescriptor, divDescriptor];
- var tagHelperBinder = new TagHelperBinder(null, descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper, divTagHelper];
+ var binder = new TagHelperBinder(null, tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- var descriptor = Assert.Single(bindingResult.Descriptors);
- Assert.Same(divDescriptor, descriptor);
+ Assert.NotNull(binding);
+ var tagHelper = Assert.Single(binding.TagHelpers);
+ Assert.Same(divTagHelper, tagHelper);
}
[Fact]
public void GetBinding_DescriptorWithMultipleRules_CorrectlySelectsMatchingRules()
{
// Arrange
- var multiRuleDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo", "SomeAssembly")
+ var multiRuleTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule
.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName)
.RequireParentTag("body"))
@@ -574,20 +573,21 @@ public void GetBinding_DescriptorWithMultipleRules_CorrectlySelectsMatchingRules
.TagMatchingRuleDescriptor(rule => rule
.RequireTagName("span"))
.Build();
- ImmutableArray descriptors = [multiRuleDescriptor];
- var tagHelperBinder = new TagHelperBinder(null, descriptors);
+ TagHelperCollection tagHelper = [multiRuleTagHelper];
+ var binder = new TagHelperBinder(null, tagHelper);
// Act
- var binding = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- var boundDescriptor = Assert.Single(binding.Descriptors);
- Assert.Same(multiRuleDescriptor, boundDescriptor);
- var boundRules = binding.GetBoundRules(boundDescriptor);
+ Assert.NotNull(binding);
+ var boundTagHelper = Assert.Single(binding.TagHelpers);
+ Assert.Same(multiRuleTagHelper, boundTagHelper);
+ var boundRules = binding.GetBoundRules(boundTagHelper);
var boundRule = Assert.Single(boundRules);
Assert.Equal("div", boundRule.TagName);
}
@@ -596,26 +596,27 @@ public void GetBinding_DescriptorWithMultipleRules_CorrectlySelectsMatchingRules
public void GetBinding_PrefixedParent_ReturnsBinding()
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div").RequireParentTag("p"))
.Build();
- var pDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo2", "SomeAssembly")
+ var pTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo2", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("p"))
.Build();
- ImmutableArray descriptors = [divDescriptor, pDescriptor];
- var tagHelperBinder = new TagHelperBinder("th:", descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper, pTagHelper];
+ var binder = new TagHelperBinder("th:", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "th:div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "th:p",
parentIsTagHelper: true);
// Assert
- var boundDescriptor = Assert.Single(bindingResult.Descriptors);
- Assert.Same(divDescriptor, boundDescriptor);
- var boundRules = bindingResult.GetBoundRules(boundDescriptor);
+ Assert.NotNull(binding);
+ var boundTagHelper = Assert.Single(binding.TagHelpers);
+ Assert.Same(divTagHelper, boundTagHelper);
+ var boundRules = binding.GetBoundRules(boundTagHelper);
var boundRule = Assert.Single(boundRules);
Assert.Equal("div", boundRule.TagName);
Assert.Equal("p", boundRule.ParentTag);
@@ -625,78 +626,81 @@ public void GetBinding_PrefixedParent_ReturnsBinding()
public void GetBinding_IsAttributeMatch_SingleAttributeMatch()
{
// Arrange
- var divDescriptor = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.ClassifyAttributesOnly(true)
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- ImmutableArray descriptors = [divDescriptor];
- var tagHelperBinder = new TagHelperBinder("", descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper];
+ var binder = new TagHelperBinder("", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- Assert.True(bindingResult.IsAttributeMatch);
+ Assert.NotNull(binding);
+ Assert.True(binding.IsAttributeMatch);
}
[Fact]
public void GetBinding_IsAttributeMatch_MultipleAttributeMatches()
{
// Arrange
- var divDescriptor1 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper1 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.ClassifyAttributesOnly(true)
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- var divDescriptor2 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper2 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.ClassifyAttributesOnly(true)
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- ImmutableArray descriptors = [divDescriptor1, divDescriptor2];
- var tagHelperBinder = new TagHelperBinder("", descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper1, divTagHelper2];
+ var binder = new TagHelperBinder("", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- Assert.True(bindingResult.IsAttributeMatch);
+ Assert.NotNull(binding);
+ Assert.True(binding.IsAttributeMatch);
}
[Fact]
public void GetBinding_IsAttributeMatch_MixedAttributeMatches()
{
// Arrange
- var divDescriptor1 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper1 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.ClassifyAttributesOnly(true)
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- var divDescriptor2 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
+ var divTagHelper2 = TagHelperDescriptorBuilder.CreateTagHelper("foo1", "SomeAssembly")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.Build();
- ImmutableArray descriptors = [divDescriptor1, divDescriptor2];
- var tagHelperBinder = new TagHelperBinder("", descriptors);
+ TagHelperCollection tagHelpers = [divTagHelper1, divTagHelper2];
+ var tagHelperBinder = new TagHelperBinder("", tagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = tagHelperBinder.GetBinding(
tagName: "div",
- attributes: ImmutableArray>.Empty,
+ attributes: [],
parentTagName: "p",
parentIsTagHelper: false);
// Assert
- Assert.False(bindingResult.IsAttributeMatch);
+ Assert.NotNull(binding);
+ Assert.False(binding.IsAttributeMatch);
}
[Fact]
@@ -707,20 +711,20 @@ public void GetBinding_CaseSensitiveRule_CaseMismatch_ReturnsNull()
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("div"))
.SetCaseSensitive()
.Build();
- ImmutableArray expectedDescriptors = [divTagHelper];
+ TagHelperCollection expectedTagHelpers = [divTagHelper];
var expectedAttributes = ImmutableArray.Create(
new KeyValuePair("class", "something"));
- var tagHelperBinder = new TagHelperBinder("th:", expectedDescriptors);
+ var binder = new TagHelperBinder("th:", expectedTagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "th:Div",
attributes: expectedAttributes,
parentTagName: "body",
parentIsTagHelper: false);
// Assert
- Assert.Null(bindingResult);
+ Assert.Null(binding);
}
[Fact]
@@ -733,19 +737,19 @@ public void GetBinding_CaseSensitiveRequiredAttribute_CaseMismatch_ReturnsNull()
.RequireAttributeDescriptor(attribute => attribute.Name("class")))
.SetCaseSensitive()
.Build();
- ImmutableArray expectedDescriptors = [divTagHelper];
+ TagHelperCollection expectedTagHelpers = [divTagHelper];
var expectedAttributes = ImmutableArray.Create(
new KeyValuePair("CLASS", "something"));
- var tagHelperBinder = new TagHelperBinder(null, expectedDescriptors);
+ var binder = new TagHelperBinder(null, expectedTagHelpers);
// Act
- var bindingResult = tagHelperBinder.GetBinding(
+ var binding = binder.GetBinding(
tagName: "div",
attributes: expectedAttributes,
parentTagName: "body",
parentIsTagHelper: false);
// Assert
- Assert.Null(bindingResult);
+ Assert.Null(binding);
}
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperCollectionTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperCollectionTest.cs
new file mode 100644
index 00000000000..2d1e4ce032f
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperCollectionTest.cs
@@ -0,0 +1,3610 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Collections.Immutable;
+using System.Linq;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Razor.Language.Test;
+
+public class TagHelperCollectionTest
+{
+ private static TagHelperDescriptor CreateTagHelper(string name, string assemblyName = "TestAssembly")
+ {
+ var builder = TagHelperDescriptorBuilder.Create(name, assemblyName);
+ builder.TypeName = name;
+ builder.TagMatchingRule(rule => rule.TagName = name.ToLowerInvariant());
+ return builder.Build();
+ }
+
+ private static TagHelperDescriptor[] CreateTestTagHelpers(int count, int startIndex = 0)
+ {
+ var result = new TagHelperDescriptor[count];
+
+ for (var i = 0; i < count; i++)
+ {
+ result[i] = CreateTagHelper($"TagHelper{startIndex + i}");
+ }
+
+ return result;
+ }
+
+ [Fact]
+ public void Empty_ReturnsEmptyCollection()
+ {
+ // Act
+ var collection = TagHelperCollection.Empty;
+
+ // Assert
+ Assert.NotNull(collection);
+ Assert.Empty(collection);
+ Assert.True(collection.IsEmpty);
+ Assert.Equal(-1, collection.IndexOf(CreateTagHelper("Test")));
+ Assert.False(collection.Contains(CreateTagHelper("Test")));
+ }
+
+ [Fact]
+ public void Empty_Enumerator_IsEmpty()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Empty;
+
+ // Act & Assert
+ Assert.Empty(collection);
+
+ var enumerator = collection.GetEnumerator();
+ Assert.False(enumerator.MoveNext());
+ }
+
+ [Fact]
+ public void Empty_CopyTo_DoesNothing()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Empty;
+ var destination = new TagHelperDescriptor[1];
+
+ // Act
+ collection.CopyTo(destination);
+
+ // Assert
+ Assert.Null(destination[0]);
+ }
+
+ [Fact]
+ public void Empty_Indexer_ThrowsIndexOutOfRangeException()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Empty;
+
+ // Act & Assert
+ Assert.Throws(() => collection[0]);
+ Assert.Throws(() => collection[-1]);
+ }
+
+ [Fact]
+ public void Create_EmptyImmutableArray_ReturnsEmpty()
+ {
+ // Act
+ var empty = ImmutableArray.Empty;
+ var collection = TagHelperCollection.Create(empty);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Create_SingleItemImmutableArray_ReturnsSingleItemCollection()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("Test");
+ var array = ImmutableArray.Create(tagHelper);
+
+ // Act
+ var collection = TagHelperCollection.Create(array);
+
+ // Assert
+ Assert.Single(collection);
+ Assert.False(collection.IsEmpty);
+ Assert.Same(tagHelper, collection[0]);
+ Assert.Equal(0, collection.IndexOf(tagHelper));
+ Assert.True(collection.Contains(tagHelper));
+ }
+
+ [Fact]
+ public void Create_MultipleItemsImmutableArray_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var array = ImmutableArray.Create(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(array);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.False(collection.IsEmpty);
+
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Same(tagHelpers[i], collection[i]);
+ Assert.Equal(i, collection.IndexOf(tagHelpers[i]));
+ Assert.True(collection.Contains(tagHelpers[i]));
+ }
+ }
+
+ [Fact]
+ public void Create_ImmutableArrayWithDuplicates_RemovesDuplicates()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var array = ImmutableArray.Create(tagHelper1, tagHelper2, tagHelper1);
+
+ // Act
+ var collection = TagHelperCollection.Create(array);
+
+ // Assert
+ Assert.SameItems([tagHelper1, tagHelper2], collection);
+ }
+
+ [Fact]
+ public void Create_EmptyArray_ReturnsEmpty()
+ {
+ // Arrange
+ var array = Array.Empty();
+
+ // Act
+ var collection = TagHelperCollection.Create(array);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Create_SingleItemArray_ReturnsSingleItemCollection()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("Test");
+ var array = new[] { tagHelper };
+
+ // Act
+ var collection = TagHelperCollection.Create(array);
+
+ // Assert
+ Assert.Single(collection);
+ Assert.Same(tagHelper, collection[0]);
+ }
+
+ [Fact]
+ public void Create_MultipleItemArray_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+
+ // Act
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Assert
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_ArrayWithDuplicates_RemovesDuplicates()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var array = new[] { tagHelper1, tagHelper2, tagHelper1 };
+
+ // Act
+ var collection = TagHelperCollection.Create(array);
+
+ // Assert
+ Assert.SameItems([tagHelper1, tagHelper2], collection);
+ }
+
+ [Fact]
+ public void Create_EmptyCollectionExpression_ReturnsEmpty()
+ {
+ // Act
+ TagHelperCollection collection = [];
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Create_SingleItemCollectionExpression_ReturnsSingleItemCollection()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("Test");
+
+ // Act
+ TagHelperCollection collection = [tagHelper];
+
+ // Assert
+ Assert.Single(collection);
+ Assert.False(collection.IsEmpty);
+ Assert.Same(tagHelper, collection[0]);
+ Assert.Equal(0, collection.IndexOf(tagHelper));
+ Assert.True(collection.Contains(tagHelper));
+ }
+
+ [Fact]
+ public void Create_MultipleItemsCollectionExpression_CreatesCollection()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+
+ // Act
+ TagHelperCollection collection = [tagHelper1, tagHelper2, tagHelper3];
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.False(collection.IsEmpty);
+ Assert.Same(tagHelper1, collection[0]);
+ Assert.Same(tagHelper2, collection[1]);
+ Assert.Same(tagHelper3, collection[2]);
+ Assert.Equal(0, collection.IndexOf(tagHelper1));
+ Assert.Equal(1, collection.IndexOf(tagHelper2));
+ Assert.Equal(2, collection.IndexOf(tagHelper3));
+ Assert.True(collection.Contains(tagHelper1));
+ Assert.True(collection.Contains(tagHelper2));
+ Assert.True(collection.Contains(tagHelper3));
+ }
+
+ [Fact]
+ public void Create_CollectionExpressionWithDuplicates_RemovesDuplicates()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+
+ // Act
+ TagHelperCollection collection = [tagHelper1, tagHelper2, tagHelper1];
+
+ // Assert
+ Assert.SameItems([tagHelper1, tagHelper2], collection);
+ }
+
+ [Fact]
+ public void Create_CollectionExpressionWithSpreadOperator_CreatesCollection()
+ {
+ // Arrange
+ var firstBatch = CreateTestTagHelpers(2);
+ var additionalTagHelper = CreateTagHelper("Additional");
+ var lastBatch = CreateTestTagHelpers(2).Skip(2).ToArray(); // Get different helpers
+
+ // Act
+ TagHelperCollection collection = [.. firstBatch, additionalTagHelper, .. lastBatch];
+
+ // Assert
+ Assert.Equal(3, collection.Count); // 2 from first batch + 1 additional (lastBatch would be empty in this case)
+ Assert.Same(firstBatch[0], collection[0]);
+ Assert.Same(firstBatch[1], collection[1]);
+ Assert.Same(additionalTagHelper, collection[2]);
+ }
+
+ [Fact]
+ public void Create_CollectionExpressionFromExistingArray_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+
+ // Act
+ TagHelperCollection collection = [.. tagHelpers];
+
+ // Assert
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_CollectionExpressionMixedSources_CreatesCollection()
+ {
+ // Arrange
+ var singleHelper = CreateTagHelper("Single");
+ var tagHelpers = CreateTestTagHelpers(3);
+ TagHelperDescriptor[] arrayHelpers = [tagHelpers[0], tagHelpers[1]];
+ List listHelpers = [tagHelpers[2]];
+
+ // Act
+ TagHelperCollection collection = [singleHelper, .. arrayHelpers, .. listHelpers];
+
+ // Assert
+ Assert.Equal(4, collection.Count);
+ Assert.Same(singleHelper, collection[0]);
+ Assert.Same(arrayHelpers[0], collection[1]);
+ Assert.Same(arrayHelpers[1], collection[2]);
+ Assert.Same(listHelpers[0], collection[3]);
+ }
+
+ [Fact]
+ public void Create_IEnumerableEmpty_ReturnsEmpty()
+ {
+ // Arrange
+ var items = new List();
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableEmptyEnumerable_ReturnsEmpty()
+ {
+ // Arrange - Use LINQ to create an enumerable without known count
+ var items = new[] { CreateTagHelper("Test") }.Where(x => false);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableSingleItem_ReturnsSingleItemCollection()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("Test");
+ var items = new List { tagHelper };
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Single(collection);
+ Assert.False(collection.IsEmpty);
+ Assert.Same(tagHelper, collection[0]);
+ Assert.Equal(0, collection.IndexOf(tagHelper));
+ Assert.True(collection.Contains(tagHelper));
+ }
+
+ [Fact]
+ public void Create_IEnumerableSingleItemEnumerable_ReturnsSingleItemCollection()
+ {
+ // Arrange - Use LINQ to create an enumerable without known count
+ var tagHelper = CreateTagHelper("Test");
+ var items = new[] { tagHelper, CreateTagHelper("Other") }.Where(x => x == tagHelper);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Single(collection);
+ Assert.Same(tagHelper, collection[0]);
+ }
+
+ [Fact]
+ public void Create_IEnumerableMultipleItems_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+ var items = new List(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(4, collection.Count);
+ Assert.False(collection.IsEmpty);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableMultipleItemsEnumerable_CreatesCollection()
+ {
+ // Arrange - Use LINQ to create an enumerable without known count
+ var tagHelpers = CreateTestTagHelpers(4);
+ var items = tagHelpers.Where(x => true); // Forces enumerable without known count
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(4, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableWithDuplicates_RemovesDuplicates()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var items = new List { tagHelper1, tagHelper2, tagHelper1, tagHelper2 };
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(2, collection.Count);
+ Assert.SameItems([tagHelper1, tagHelper2], collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableEnumerableWithDuplicates_RemovesDuplicates()
+ {
+ // Arrange - Use LINQ to create an enumerable without known count
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var baseItems = new[] { tagHelper1, tagHelper2, tagHelper1, tagHelper2 };
+ var items = baseItems.Where(x => true); // Forces enumerable without known count
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(2, collection.Count);
+ Assert.SameItems([tagHelper1, tagHelper2], collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableHashSet_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var items = new HashSet(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableQueue_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var items = new Queue(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableStack_CreatesCollection()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var items = new Stack();
+ items.Push(tagHelper1);
+ items.Push(tagHelper2);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(2, collection.Count);
+ // Note: Stack reverses order, so tagHelper2 comes first
+ Assert.Same(tagHelper2, collection[0]);
+ Assert.Same(tagHelper1, collection[1]);
+ }
+
+ [Fact]
+ public void Create_IEnumerableLinkedList_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var items = new LinkedList(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableCustomCollection_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var items = new CustomCollection(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableCustomEnumerable_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var items = new CustomEnumerable(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableLargeCollection_WorksCorrectly()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(1000);
+ var items = new List(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(1000, collection.Count);
+ Assert.Same(tagHelpers[0], collection[0]);
+ Assert.Same(tagHelpers[999], collection[999]);
+ }
+
+ [Fact]
+ public void Create_IEnumerableLargeEnumerable_WorksCorrectly()
+ {
+ // Arrange - Use LINQ to create an enumerable without known count
+ var tagHelpers = CreateTestTagHelpers(1000);
+ var items = tagHelpers.Where(x => true);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(1000, collection.Count);
+ Assert.Same(tagHelpers[0], collection[0]);
+ Assert.Same(tagHelpers[999], collection[999]);
+ }
+
+ [Fact]
+ public void Create_IEnumerableReadOnlyCollection_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ IReadOnlyCollection items = tagHelpers;
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Create_IEnumerableYieldReturn_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ static IEnumerable YieldItems(TagHelperDescriptor[] items)
+ {
+ foreach (var item in items)
+ {
+ yield return item;
+ }
+ }
+
+ var items = YieldItems(tagHelpers);
+
+ // Act
+ var collection = TagHelperCollection.Create(items);
+
+ // Assert
+ Assert.Equal(3, collection.Count);
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ // Helper classes for testing
+ private sealed class CustomCollection(IEnumerable items) : ICollection
+ {
+ private readonly List _items = [.. items];
+
+ public int Count => _items.Count;
+ public bool IsReadOnly => true;
+ public void Add(TagHelperDescriptor item) => throw new NotSupportedException();
+ public void Clear() => throw new NotSupportedException();
+ public bool Contains(TagHelperDescriptor item) => _items.Contains(item);
+ public void CopyTo(TagHelperDescriptor[] array, int arrayIndex) => _items.CopyTo(array, arrayIndex);
+ public IEnumerator GetEnumerator() => _items.GetEnumerator();
+ public bool Remove(TagHelperDescriptor item) => throw new NotSupportedException();
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+ }
+
+ private sealed class CustomEnumerable(IEnumerable items) : IEnumerable
+ {
+ private readonly List _items = [.. items];
+
+ public IEnumerator GetEnumerator() => _items.GetEnumerator();
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+ }
+
+ [Fact]
+ public void ConcurrentAccess_MultipleThreads_DoesNotThrow()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(100);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var exceptions = new ConcurrentBag();
+
+ // Act
+ Parallel.For(0, 100, i =>
+ {
+ try
+ {
+ _ = collection[i % collection.Count];
+ _ = collection.IndexOf(tagHelpers[i % tagHelpers.Length]);
+ _ = collection.Contains(tagHelpers[i % tagHelpers.Length]);
+ foreach (var item in collection) { /* enumerate */ }
+ }
+ catch (Exception ex)
+ {
+ exceptions.Add(ex);
+ }
+ });
+
+ // Assert
+ Assert.Empty(exceptions);
+ }
+
+ [Fact]
+ public void Build_EmptyBuilder_ReturnsEmpty()
+ {
+ // Act
+ var collection = TagHelperCollection.Build("test", (ref builder, state) =>
+ {
+ // Don't add anything
+ });
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Build_WithItems_CreatesCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ // Act
+ var collection = TagHelperCollection.Build(tagHelpers, (ref builder, items) =>
+ {
+ foreach (var item in items)
+ {
+ builder.Add(item);
+ }
+ });
+
+ // Assert
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Build_WithDuplicates_RemovesDuplicates()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+
+ // Act
+ var collection = TagHelperCollection.Build((tagHelper1, tagHelper2), (ref builder, items) =>
+ {
+ builder.Add(items.tagHelper1);
+ builder.Add(items.tagHelper2);
+ builder.Add(items.tagHelper1); // Duplicate
+ });
+
+ // Assert
+ Assert.SameItems([tagHelper1, tagHelper2], collection);
+ }
+
+ [Fact]
+ public void Equals_SameInstance_ReturnsTrue()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(2));
+
+ // Act & Assert
+ Assert.True(collection.Equals(collection));
+ Assert.True(collection.Equals((object)collection));
+ }
+
+ [Fact]
+ public void Equals_DifferentInstanceSameContent_ReturnsTrue()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(2);
+ var collection1 = TagHelperCollection.Create(tagHelpers);
+ var collection2 = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert
+ Assert.True(collection1.Equals(collection2));
+ Assert.True(collection1.Equals((object)collection2));
+ }
+
+ [Fact]
+ public void Equals_DifferentContent_ReturnsFalse()
+ {
+ // Arrange
+ var collection1 = TagHelperCollection.Create(CreateTestTagHelpers(2));
+ var collection2 = TagHelperCollection.Create(CreateTestTagHelpers(3));
+
+ // Act & Assert
+ Assert.False(collection1.Equals(collection2));
+ Assert.False(collection1.Equals((object)collection2));
+ }
+
+ [Fact]
+ public void Equals_Null_ReturnsFalse()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(2));
+
+ // Act & Assert
+ Assert.False(collection.Equals(null));
+ Assert.False(collection.Equals((object?)null));
+ }
+
+ [Fact]
+ public void Equals_DifferentType_ReturnsFalse()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(2));
+
+ // Act & Assert
+ Assert.False(collection.Equals("not a collection"));
+ }
+
+ [Fact]
+ public void Equals_ArrayCreatedVsMergedCollection_SameContent_ReturnsTrue()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+ var array = new[] { tagHelper1, tagHelper2, tagHelper3 };
+
+ // Create collection directly from array
+ var arrayCollection = TagHelperCollection.Create(array);
+
+ // Create collection by merging two collections with the same content
+ TagHelperCollection firstPart = [tagHelper1];
+ TagHelperCollection secondPart = [tagHelper2, tagHelper3];
+ var mergedCollection = TagHelperCollection.Merge(firstPart, secondPart);
+
+ // Act & Assert
+ Assert.Equal(arrayCollection.Count, mergedCollection.Count);
+ Assert.True(arrayCollection.Contains(tagHelper1));
+ Assert.True(arrayCollection.Contains(tagHelper2));
+ Assert.True(arrayCollection.Contains(tagHelper3));
+ Assert.True(mergedCollection.Contains(tagHelper1));
+ Assert.True(mergedCollection.Contains(tagHelper2));
+ Assert.True(mergedCollection.Contains(tagHelper3));
+
+ // Verify same order
+ Assert.Same(tagHelper1, arrayCollection[0]);
+ Assert.Same(tagHelper2, arrayCollection[1]);
+ Assert.Same(tagHelper3, arrayCollection[2]);
+ Assert.Same(tagHelper1, mergedCollection[0]);
+ Assert.Same(tagHelper2, mergedCollection[1]);
+ Assert.Same(tagHelper3, mergedCollection[2]);
+
+ // This should pass if equality works correctly regardless of construction method
+ Assert.True(arrayCollection.Equals(mergedCollection));
+ Assert.True(mergedCollection.Equals(arrayCollection));
+ Assert.Equal(arrayCollection.GetHashCode(), mergedCollection.GetHashCode());
+ }
+
+ [Fact]
+ public void GetHashCode_SameContent_ReturnsSameHashCode()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(2);
+ var collection1 = TagHelperCollection.Create(tagHelpers);
+ var collection2 = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert
+ Assert.Equal(collection1.GetHashCode(), collection2.GetHashCode());
+ }
+
+ [Fact]
+ public void GetHashCode_DifferentContent_ReturnsDifferentHashCode()
+ {
+ // Arrange
+ var collection1 = TagHelperCollection.Create(CreateTestTagHelpers(2));
+ var collection2 = TagHelperCollection.Create(CreateTestTagHelpers(3));
+
+ // Act & Assert
+ Assert.NotEqual(collection1.GetHashCode(), collection2.GetHashCode());
+ }
+
+ [Fact]
+ public void GetHashCode_DifferentOrder_ReturnsDifferentChecksum()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(2);
+ var collection1 = TagHelperCollection.Create([tagHelpers[0], tagHelpers[1]]);
+ var collection2 = TagHelperCollection.Create([tagHelpers[1], tagHelpers[0]]);
+
+ // Act & Assert
+ Assert.NotEqual(collection1.GetHashCode(), collection2.GetHashCode());
+ }
+
+ [Fact]
+ public void Checksum_DifferentOrderSameContent_DifferentChecksums()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("A");
+ var tagHelper2 = CreateTagHelper("B");
+ var collection1 = TagHelperCollection.Create([tagHelper1, tagHelper2]);
+ var collection2 = TagHelperCollection.Create([tagHelper2, tagHelper1]);
+
+ // Act & Assert - Order matters for checksums
+ Assert.NotEqual(collection1.GetHashCode(), collection2.GetHashCode());
+ Assert.False(collection1.Equals(collection2));
+ }
+
+ [Fact]
+ public void Checksum_IdenticalContent_IdenticalChecksums()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(5);
+ var collection1 = TagHelperCollection.Create(tagHelpers);
+ var collection2 = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert - Same content should have same checksum
+ Assert.Equal(collection1.GetHashCode(), collection2.GetHashCode());
+ Assert.True(collection1.Equals(collection2));
+ }
+
+ [Fact]
+ public void GetEnumerator_Generic_EnumeratesAllItems()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var enumeratedItems = new List();
+ foreach (var item in collection)
+ {
+ enumeratedItems.Add(item);
+ }
+
+ // Assert
+ Assert.SameItems(tagHelpers, enumeratedItems);
+ }
+
+ [Fact]
+ public void GetEnumerator_NonGeneric_EnumeratesAllItems()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var enumeratedItems = new List();
+ var enumerator = ((IEnumerable)collection).GetEnumerator();
+ while (enumerator.MoveNext())
+ {
+ enumeratedItems.Add((TagHelperDescriptor)enumerator.Current);
+ }
+
+ // Assert
+ Assert.SameItems(tagHelpers, enumeratedItems);
+ }
+
+ [Fact]
+ public void Enumerator_Current_BeforeMoveNext_ThrowsInvalidOperation()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(1));
+ var enumerator = collection.GetEnumerator();
+
+ // Act & Assert
+ Assert.Throws(() => _ = enumerator.Current);
+ }
+
+ [Fact]
+ public void CopyTo_ValidDestination_CopiesAllItems()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var destination = new TagHelperDescriptor[5];
+
+ // Act
+ collection.CopyTo(destination);
+
+ // Assert
+ Assert.Same(tagHelpers[0], destination[0]);
+ Assert.Same(tagHelpers[1], destination[1]);
+ Assert.Same(tagHelpers[2], destination[2]);
+ Assert.Null(destination[3]);
+ Assert.Null(destination[4]);
+ }
+
+ [Fact]
+ public void CopyTo_DestinationTooShort_ThrowsArgumentException()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var destination = new TagHelperDescriptor[2];
+
+ // Act & Assert
+ Assert.Throws(() => collection.CopyTo(destination));
+ }
+
+ [Fact]
+ public void Indexer_ValidIndex_ReturnsCorrectItem()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert
+ Assert.Equal(tagHelpers.Length, collection.Count);
+
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Same(tagHelpers[i], collection[i]);
+ }
+ }
+
+ [Fact]
+ public void Indexer_InvalidIndex_ThrowsArgumentOutOfRangeException()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(3));
+
+ // Act & Assert
+ Assert.Throws(() => collection[-1]);
+ Assert.Throws(() => collection[3]);
+ Assert.Throws(() => collection[10]);
+ }
+
+ [Fact]
+ public void IndexOf_ExistingItem_ReturnsCorrectIndex()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Equal(i, collection.IndexOf(tagHelpers[i]));
+ }
+ }
+
+ [Fact]
+ public void IndexOf_NonExistingItem_ReturnsMinusOne()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var nonExistingItem = CreateTagHelper("NonExisting");
+
+ // Act
+ var index = collection.IndexOf(nonExistingItem);
+
+ // Assert
+ Assert.Equal(-1, index);
+ }
+
+ [Fact]
+ public void IndexOf_LargeCollection_UsesLookupTable()
+ {
+ // Arrange - Test above the 8-item threshold
+ var tagHelpers = CreateTestTagHelpers(100);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var searchItem = tagHelpers[50];
+
+ // Act & Assert - Should find the item (testing functionality, not speed)
+ Assert.Equal(50, collection.IndexOf(searchItem));
+ }
+
+ [Fact]
+ public void IndexOf_SmallCollection_UsesLinearSearch()
+ {
+ // Arrange - Test below the 8-item threshold
+ var tagHelpers = CreateTestTagHelpers(5);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var searchItem = tagHelpers[3];
+
+ // Act & Assert - Should find the item
+ Assert.Equal(3, collection.IndexOf(searchItem));
+ }
+
+ [Fact]
+ public void Contains_ExistingItem_ReturnsTrue()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert
+ foreach (var tagHelper in tagHelpers)
+ {
+ Assert.True(collection.Contains(tagHelper));
+ }
+ }
+
+ [Fact]
+ public void Contains_NonExistingItem_ReturnsFalse()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var nonExistingItem = CreateTagHelper("NonExisting");
+
+ // Act
+ var contains = collection.Contains(nonExistingItem);
+
+ // Assert
+ Assert.False(contains);
+ }
+
+ [Fact]
+ public void Create_VeryLargeCollection_WorksCorrectly()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(1000);
+
+ // Act
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Assert
+ Assert.Equal(1000, collection.Count);
+ Assert.Same(tagHelpers[0], collection[0]);
+ Assert.Same(tagHelpers[999], collection[999]);
+ Assert.Equal(0, collection.IndexOf(tagHelpers[0]));
+ Assert.Equal(999, collection.IndexOf(tagHelpers[999]));
+ }
+
+ [Fact]
+ public void IsEmpty_EmptyCollection_ReturnsTrue()
+ {
+ // Assert
+ Assert.True(TagHelperCollection.Empty.IsEmpty);
+ }
+
+ [Fact]
+ public void IsEmpty_NonEmptyCollection_ReturnsFalse()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(1));
+
+ // Assert
+ Assert.False(collection.IsEmpty);
+ }
+
+ [Fact]
+ public void Builder_Empty_IsEmptyAndHasZeroCount()
+ {
+ // Arrange & Act
+ using var builder = new TagHelperCollection.Builder();
+
+ // Assert
+ Assert.True(builder.IsEmpty);
+ Assert.Empty(builder);
+ Assert.False(builder.IsReadOnly);
+ }
+
+ [Fact]
+ public void Builder_AddSingleItem_WorksCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+
+ // Act
+ var added = builder.Add(tagHelper);
+
+ // Assert
+ Assert.True(added);
+ Assert.False(builder.IsEmpty);
+ var item = Assert.Single(builder);
+ Assert.Same(tagHelper, item);
+ }
+
+ [Fact]
+ public void Builder_AddDuplicateSingleItem_ReturnsFalse()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+
+ // Act
+ var firstAdd = builder.Add(tagHelper);
+ var secondAdd = builder.Add(tagHelper);
+
+ // Assert
+ Assert.True(firstAdd);
+ Assert.False(secondAdd);
+ var item = Assert.Single(builder);
+ Assert.Same(tagHelper, item);
+ }
+
+ [Fact]
+ public void Builder_AddMultipleItems_WorksCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ // Act
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Assert
+ Assert.False(builder.IsEmpty);
+ Assert.Equal(3, builder.Count);
+
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Same(tagHelpers[i], builder[i]);
+ }
+ }
+
+ [Fact]
+ public void Builder_AddMultipleItemsWithDuplicates_DeduplicatesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+
+ // Act
+ var add1 = builder.Add(tagHelper1);
+ var add2 = builder.Add(tagHelper2);
+ var add3 = builder.Add(tagHelper1); // Duplicate
+
+ // Assert
+ Assert.True(add1);
+ Assert.True(add2);
+ Assert.False(add3); // Should return false for duplicate
+ Assert.Equal(2, builder.Count);
+ Assert.Same(tagHelper1, builder[0]);
+ Assert.Same(tagHelper2, builder[1]);
+ }
+
+ [Fact]
+ public void Builder_IndexerValidIndex_ReturnsCorrectItem()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act & Assert
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Same(tagHelpers[i], builder[i]);
+ }
+ }
+
+ [Fact]
+ public void Builder_IndexerNegativeIndex_ThrowsArgumentOutOfRangeException()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder
+ {
+ CreateTagHelper("Test")
+ };
+
+ // Act & Assert
+ Assert.Throws(() => builder[-1]);
+ }
+
+ [Fact]
+ public void Builder_IndexerOutOfRange_ThrowsArgumentOutOfRangeException()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder
+ {
+ CreateTagHelper("Test")
+ };
+
+ // Act & Assert
+ Assert.Throws(() => builder[1]);
+ Assert.Throws(() => builder[10]);
+ }
+
+ [Fact]
+ public void Builder_IndexerEmptyBuilder_ThrowsArgumentOutOfRangeException()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+
+ // Act & Assert
+ Assert.Throws(() => builder[0]);
+ }
+
+ [Fact]
+ public void Builder_ContainsSingleItem_ReturnsCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ var otherHelper = CreateTagHelper("Other");
+ builder.Add(tagHelper);
+
+ // Act & Assert
+ Assert.Contains(tagHelper, builder);
+ Assert.DoesNotContain(otherHelper, builder);
+ }
+
+ [Fact]
+ public void Builder_ContainsMultipleItems_ReturnsCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+ var otherHelper = CreateTagHelper("Other");
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act & Assert
+ foreach (var tagHelper in tagHelpers)
+ {
+ Assert.Contains(tagHelper, builder);
+ }
+
+ Assert.DoesNotContain(otherHelper, builder);
+ }
+
+ [Fact]
+ public void Builder_ContainsEmptyBuilder_ReturnsFalse()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+
+ // Act & Assert
+ Assert.DoesNotContain(tagHelper, builder);
+ }
+
+ [Fact]
+ public void Builder_ClearSingleItem_MakesEmpty()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ builder.Add(tagHelper);
+
+ // Act
+ builder.Clear();
+
+ // Assert
+ Assert.True(builder.IsEmpty);
+ Assert.Empty(builder);
+ }
+
+ [Fact]
+ public void Builder_ClearMultipleItems_MakesEmpty()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act
+ builder.Clear();
+
+ // Assert
+ Assert.True(builder.IsEmpty);
+ Assert.Empty(builder);
+ }
+
+ [Fact]
+ public void Builder_ClearEmptyBuilder_RemainsEmpty()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+
+ // Act
+ builder.Clear();
+
+ // Assert
+ Assert.True(builder.IsEmpty);
+ Assert.Empty(builder);
+ }
+
+ [Fact]
+ public void Builder_RemoveSingleItemExists_ReturnsTrue()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ builder.Add(tagHelper);
+
+ // Act
+ var removed = builder.Remove(tagHelper);
+
+ // Assert
+ Assert.True(removed);
+ Assert.True(builder.IsEmpty);
+ Assert.Empty(builder);
+ }
+
+ [Fact]
+ public void Builder_RemoveSingleItemNotExists_ReturnsFalse()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ var otherHelper = CreateTagHelper("Other");
+ builder.Add(tagHelper);
+
+ // Act
+ var removed = builder.Remove(otherHelper);
+
+ // Assert
+ Assert.False(removed);
+ var item = Assert.Single(builder);
+ Assert.Same(tagHelper, item);
+ }
+
+ [Fact]
+ public void Builder_RemoveFromMultipleItems_WorksCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act
+ var removed = builder.Remove(tagHelpers[1]);
+
+ // Assert
+ Assert.True(removed);
+ Assert.Equal(2, builder.Count);
+ Assert.Same(tagHelpers[0], builder[0]);
+ Assert.Same(tagHelpers[2], builder[1]);
+ Assert.DoesNotContain(tagHelpers[1], builder);
+ }
+
+ [Fact]
+ public void Builder_RemoveFromEmptyBuilder_ReturnsFalse()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+
+ // Act
+ var removed = builder.Remove(tagHelper);
+
+ // Assert
+ Assert.False(removed);
+ Assert.True(builder.IsEmpty);
+ }
+
+ [Fact]
+ public void Builder_CopyToSingleItem_CopiesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ builder.Add(tagHelper);
+ var destination = new TagHelperDescriptor[3];
+
+ // Act
+ builder.CopyTo(destination, 1);
+
+ // Assert
+ Assert.Null(destination[0]);
+ Assert.Same(tagHelper, destination[1]);
+ Assert.Null(destination[2]);
+ }
+
+ [Fact]
+ public void Builder_CopyToMultipleItems_CopiesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ var destination = new TagHelperDescriptor[5];
+
+ // Act
+ builder.CopyTo(destination, 1);
+
+ // Assert
+ Assert.Null(destination[0]);
+ Assert.Same(tagHelpers[0], destination[1]);
+ Assert.Same(tagHelpers[1], destination[2]);
+ Assert.Same(tagHelpers[2], destination[3]);
+ Assert.Null(destination[4]);
+ }
+
+ [Fact]
+ public void Builder_CopyToEmptyBuilder_DoesNothing()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var destination = new TagHelperDescriptor[3];
+
+ // Act
+ builder.CopyTo(destination, 1);
+
+ // Assert
+ Assert.All(destination, item => Assert.Null(item));
+ }
+
+ [Fact]
+ public void Builder_ToCollectionEmpty_ReturnsEmpty()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+
+ // Act
+ var collection = builder.ToCollection();
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, collection);
+ }
+
+ [Fact]
+ public void Builder_ToCollectionSingleItem_ReturnsSingleItemCollection()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ builder.Add(tagHelper);
+
+ // Act
+ var collection = builder.ToCollection();
+
+ // Assert
+ Assert.Single(collection);
+ Assert.Same(tagHelper, collection[0]);
+ }
+
+ [Fact]
+ public void Builder_ToCollectionMultipleItems_ReturnsCollection()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act
+ var collection = builder.ToCollection();
+
+ // Assert
+ Assert.SameItems(tagHelpers, collection);
+ }
+
+ [Fact]
+ public void Builder_ICollectionAdd_CallsAdd()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ ICollection collection = builder;
+ var tagHelper = CreateTagHelper("Test");
+
+ // Act
+ collection.Add(tagHelper);
+
+ // Assert
+ var item = Assert.Single(builder);
+ Assert.Same(tagHelper, item);
+ }
+
+ [Fact]
+ public void Builder_GetEnumeratorEmpty_IsEmpty()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+
+ // Act
+ using var enumerator = builder.GetEnumerator();
+
+ // Assert
+ Assert.False(enumerator.MoveNext());
+ }
+
+ [Fact]
+ public void Builder_GetEnumeratorSingleItem_EnumeratesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelper = CreateTagHelper("Test");
+ builder.Add(tagHelper);
+
+ // Act
+ var enumerated = new List();
+ using var enumerator = builder.GetEnumerator();
+ while (enumerator.MoveNext())
+ {
+ enumerated.Add(enumerator.Current);
+ }
+
+ // Assert
+ Assert.Single(enumerated);
+ Assert.Same(tagHelper, enumerated[0]);
+ }
+
+ [Fact]
+ public void Builder_GetEnumeratorMultipleItems_EnumeratesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act
+ var enumerated = new List();
+ using var enumerator = builder.GetEnumerator();
+ while (enumerator.MoveNext())
+ {
+ enumerated.Add(enumerator.Current);
+ }
+
+ // Assert
+ Assert.SameItems(tagHelpers, enumerated);
+ }
+
+ [Fact]
+ public void Builder_GenericEnumerable_EnumeratesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act
+ var enumerated = new List();
+ foreach (var item in (IEnumerable)builder)
+ {
+ enumerated.Add(item);
+ }
+
+ // Assert
+ Assert.SameItems(tagHelpers, enumerated);
+ }
+
+ [Fact]
+ public void Builder_NonGenericEnumerable_EnumeratesCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act
+ var enumerated = new List();
+ var enumerator = ((IEnumerable)builder).GetEnumerator();
+ while (enumerator.MoveNext())
+ {
+ enumerated.Add((TagHelperDescriptor)enumerator.Current);
+ }
+
+ // Assert
+ Assert.SameItems(tagHelpers, enumerated);
+ }
+
+ [Fact]
+ public void Builder_DisposeTwice_DoesNotThrow()
+ {
+ // Arrange
+ var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(3);
+
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Act & Assert - Should not throw
+ builder.Dispose();
+ builder.Dispose();
+ }
+
+ [Fact]
+ public void Builder_LargeNumberOfItems_WorksCorrectly()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(100);
+
+ // Act
+ foreach (var tagHelper in tagHelpers)
+ {
+ builder.Add(tagHelper);
+ }
+
+ // Assert
+ Assert.Equal(100, builder.Count);
+ Assert.False(builder.IsEmpty);
+
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Same(tagHelpers[i], builder[i]);
+ Assert.Contains(tagHelpers[i], builder);
+ }
+ }
+
+ [Fact]
+ public void Builder_ModifyAfterToCollection_DoesNotAffectCollection()
+ {
+ // Arrange
+ using var builder = new TagHelperCollection.Builder();
+ var tagHelpers = CreateTestTagHelpers(2);
+
+ builder.Add(tagHelpers[0]);
+ var collection = builder.ToCollection();
+
+ // Act - Modify builder after creating collection
+ builder.Add(tagHelpers[1]);
+
+ // Assert - Original collection should be unchanged
+ Assert.Single(collection);
+ Assert.Same(tagHelpers[0], collection[0]);
+
+ // Builder should have new state
+ Assert.Equal(2, builder.Count);
+ Assert.Same(tagHelpers[0], builder[0]);
+ Assert.Same(tagHelpers[1], builder[1]);
+ }
+
+ [Fact]
+ public void Merge_BothEmpty_ReturnsEmpty()
+ {
+ // Act
+ var merged = TagHelperCollection.Merge(TagHelperCollection.Empty, TagHelperCollection.Empty);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, merged);
+ }
+
+ [Fact]
+ public void Merge_FirstEmpty_ReturnsSecond()
+ {
+ // Arrange
+ var second = TagHelperCollection.Create(CreateTestTagHelpers(2));
+
+ // Act
+ var merged = TagHelperCollection.Merge(TagHelperCollection.Empty, second);
+
+ // Assert
+ Assert.Same(second, merged);
+ }
+
+ [Fact]
+ public void Merge_SecondEmpty_ReturnsFirst()
+ {
+ // Arrange
+ var first = TagHelperCollection.Create(CreateTestTagHelpers(2));
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, TagHelperCollection.Empty);
+
+ // Assert
+ Assert.Same(first, merged);
+ }
+
+ [Fact]
+ public void Merge_NoOverlapSingleItems_CreatesMergedCollection()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(2, merged.Count);
+ Assert.False(merged.IsEmpty);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Equal(0, merged.IndexOf(tagHelper1));
+ Assert.Equal(1, merged.IndexOf(tagHelper2));
+ Assert.True(merged.Contains(tagHelper1));
+ Assert.True(merged.Contains(tagHelper2));
+ }
+
+ [Fact]
+ public void Merge_NoOverlapMultipleItems_CreatesMergedCollection()
+ {
+ // Arrange
+ var firstHelpers = CreateTestTagHelpers(3);
+
+ // Create different helpers for second collection
+ var secondHelper1 = CreateTagHelper("Second1");
+ var secondHelper2 = CreateTagHelper("Second2");
+
+ var first = TagHelperCollection.Create(firstHelpers);
+ TagHelperCollection second = [secondHelper1, secondHelper2];
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(5, merged.Count);
+ Assert.False(merged.IsEmpty);
+
+ // Verify first collection items
+ for (var i = 0; i < firstHelpers.Length; i++)
+ {
+ Assert.Same(firstHelpers[i], merged[i]);
+ Assert.Equal(i, merged.IndexOf(firstHelpers[i]));
+ Assert.True(merged.Contains(firstHelpers[i]));
+ }
+
+ // Verify second collection items
+ Assert.Same(secondHelper1, merged[3]);
+ Assert.Same(secondHelper2, merged[4]);
+ Assert.Equal(3, merged.IndexOf(secondHelper1));
+ Assert.Equal(4, merged.IndexOf(secondHelper2));
+ Assert.True(merged.Contains(secondHelper1));
+ Assert.True(merged.Contains(secondHelper2));
+ }
+
+ [Fact]
+ public void Merge_WithOverlapSingleItems_DeduplicatesCorrectly()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper1, tagHelper2]; // Contains duplicate
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(2, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Equal(0, merged.IndexOf(tagHelper1));
+ Assert.Equal(1, merged.IndexOf(tagHelper2));
+ }
+
+ [Fact]
+ public void Merge_WithOverlapMultipleItems_DeduplicatesCorrectly()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+ var tagHelper4 = CreateTagHelper("Test4");
+
+ TagHelperCollection first = [tagHelper1, tagHelper2];
+ TagHelperCollection second = [tagHelper2, tagHelper3, tagHelper4]; // tagHelper2 is duplicate
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(4, merged.Count); // Should be deduplicated
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Same(tagHelper3, merged[2]);
+ Assert.Same(tagHelper4, merged[3]);
+
+ // Verify all items are findable
+ Assert.Equal(0, merged.IndexOf(tagHelper1));
+ Assert.Equal(1, merged.IndexOf(tagHelper2));
+ Assert.Equal(2, merged.IndexOf(tagHelper3));
+ Assert.Equal(3, merged.IndexOf(tagHelper4));
+ }
+
+ [Fact]
+ public void Merge_CompleteOverlap_ReturnsDeduplicated()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var first = TagHelperCollection.Create(tagHelpers);
+ var second = TagHelperCollection.Create(tagHelpers); // Identical collections
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(3, merged.Count); // Should not duplicate
+ Assert.SameItems(tagHelpers, merged);
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionIndexer_WorksCorrectly()
+ {
+ // Arrange
+ var firstHelper = CreateTagHelper("First");
+ var secondHelper = CreateTagHelper("Second");
+ TagHelperCollection first = [firstHelper];
+ TagHelperCollection second = [secondHelper];
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert - Test indexer edge cases
+ Assert.Same(firstHelper, merged[0]);
+ Assert.Same(secondHelper, merged[1]);
+ Assert.Throws(() => merged[-1]);
+ Assert.Throws(() => merged[2]);
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionCopyTo_WorksCorrectly()
+ {
+ // Arrange
+ var firstHelpers = CreateTestTagHelpers(2);
+ var secondHelper = CreateTagHelper("Second");
+ var first = TagHelperCollection.Create(firstHelpers);
+ TagHelperCollection second = [secondHelper];
+ var merged = TagHelperCollection.Merge(first, second);
+ var destination = new TagHelperDescriptor[5];
+
+ // Act
+ merged.CopyTo(destination);
+
+ // Assert
+ Assert.Same(firstHelpers[0], destination[0]);
+ Assert.Same(firstHelpers[1], destination[1]);
+ Assert.Same(secondHelper, destination[2]);
+ Assert.Null(destination[3]);
+ Assert.Null(destination[4]);
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionCopyTo_DestinationTooShort_ThrowsArgumentException()
+ {
+ // Arrange
+ var firstHelper = CreateTagHelper("First");
+ var secondHelper = CreateTagHelper("Second");
+ TagHelperCollection first = [firstHelper];
+ TagHelperCollection second = [secondHelper];
+ var merged = TagHelperCollection.Merge(first, second);
+ var destination = new TagHelperDescriptor[1]; // Too short
+
+ // Act & Assert
+ Assert.Throws(() => merged.CopyTo(destination));
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionIndexOf_NonExistingItem_ReturnsMinusOne()
+ {
+ // Arrange
+ var firstHelper = CreateTagHelper("First");
+ var secondHelper = CreateTagHelper("Second");
+ var nonExistingHelper = CreateTagHelper("NonExisting");
+ TagHelperCollection first = [firstHelper];
+ TagHelperCollection second = [secondHelper];
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Act
+ var index = merged.IndexOf(nonExistingHelper);
+
+ // Assert
+ Assert.Equal(-1, index);
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionGetHashCode_DifferentForDifferentOrder()
+ {
+ // Arrange
+ var firstHelper = CreateTagHelper("First");
+ var secondHelper = CreateTagHelper("Second");
+ TagHelperCollection first = [firstHelper];
+ TagHelperCollection second = [secondHelper];
+
+ // Act
+ var merged1 = TagHelperCollection.Merge(first, second);
+ var merged2 = TagHelperCollection.Merge(second, first); // Different order
+
+ // Assert
+ Assert.NotEqual(merged1.GetHashCode(), merged2.GetHashCode());
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionEquals_SameContent_ReturnsTrue()
+ {
+ // Arrange
+ var firstHelper = CreateTagHelper("First");
+ var secondHelper = CreateTagHelper("Second");
+ TagHelperCollection first = [firstHelper];
+ TagHelperCollection second = [secondHelper];
+
+ // Act
+ var merged1 = TagHelperCollection.Merge(first, second);
+ var merged2 = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.True(merged1.Equals(merged2));
+ Assert.True(merged1.Equals((object)merged2));
+ }
+
+ [Fact]
+ public void Merge_MergedCollectionEnumeration_WorksCorrectly()
+ {
+ // Arrange
+ var firstHelpers = CreateTestTagHelpers(2);
+ var secondHelper = CreateTagHelper("Second");
+ var first = TagHelperCollection.Create(firstHelpers);
+ TagHelperCollection second = [secondHelper];
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Act
+ var enumerated = new List();
+ foreach (var item in merged)
+ {
+ enumerated.Add(item);
+ }
+
+ // Assert
+ Assert.Equal(3, enumerated.Count);
+ Assert.Same(firstHelpers[0], enumerated[0]);
+ Assert.Same(firstHelpers[1], enumerated[1]);
+ Assert.Same(secondHelper, enumerated[2]);
+ }
+
+ [Fact]
+ public void Merge_LargeCollections_WorksCorrectly()
+ {
+ // Arrange
+ var firstHelpers = CreateTestTagHelpers(500);
+ var secondHelpers = new TagHelperDescriptor[500];
+ for (var i = 0; i < 500; i++)
+ {
+ secondHelpers[i] = CreateTagHelper($"SecondHelper{i}");
+ }
+
+ var first = TagHelperCollection.Create(firstHelpers);
+ var second = TagHelperCollection.Create(secondHelpers);
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(1000, merged.Count);
+
+ // Verify first collection items
+ for (var i = 0; i < 500; i++)
+ {
+ Assert.Same(firstHelpers[i], merged[i]);
+ }
+
+ // Verify second collection items
+ for (var i = 0; i < 500; i++)
+ {
+ Assert.Same(secondHelpers[i], merged[500 + i]);
+ }
+ }
+
+ [Fact]
+ public void Merge_WithPartialOverlap_DeduplicatesCorrectly()
+ {
+ // Arrange
+ var shared1 = CreateTagHelper("Shared1");
+ var shared2 = CreateTagHelper("Shared2");
+ var unique1 = CreateTagHelper("Unique1");
+ var unique2 = CreateTagHelper("Unique2");
+ var unique3 = CreateTagHelper("Unique3");
+
+ TagHelperCollection first = [unique1, shared1, unique2];
+ TagHelperCollection second = [shared1, unique3, shared2];
+
+ // Act
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Assert
+ Assert.Equal(5, merged.Count); // 3 + 3 - 1 (shared1 deduplicated)
+
+ // Verify order: first collection items, then unique items from second collection
+ Assert.Same(unique1, merged[0]);
+ Assert.Same(shared1, merged[1]); // From first collection
+ Assert.Same(unique2, merged[2]);
+ Assert.Same(unique3, merged[3]); // From second collection (shared1 already added)
+ Assert.Same(shared2, merged[4]); // From second collection
+
+ // Verify all items are findable
+ Assert.True(merged.Contains(unique1));
+ Assert.True(merged.Contains(shared1));
+ Assert.True(merged.Contains(unique2));
+ Assert.True(merged.Contains(unique3));
+ Assert.True(merged.Contains(shared2));
+ }
+
+ [Fact]
+ public void Merge_ImmutableArrayEmpty_ReturnsEmpty()
+ {
+ // Arrange
+ var collections = ImmutableArray.Empty;
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, merged);
+ }
+
+ [Fact]
+ public void Merge_ImmutableArraySingleCollection_ReturnsSameCollection()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(3));
+ var collections = ImmutableArray.Create(collection);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Same(collection, merged);
+ }
+
+ [Fact]
+ public void Merge_ImmutableArrayTwoCollections_UsesOptimizedTwoCollectionMerge()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+ var collections = ImmutableArray.Create(first, second);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(2, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ }
+
+ [Fact]
+ public void Merge_ImmutableArrayThreeCollections_NoOverlap_CreatesEfficientMergedCollection()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+ TagHelperCollection third = [tagHelper3];
+ var collections = ImmutableArray.Create(first, second, third);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(3, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Same(tagHelper3, merged[2]);
+ Assert.Equal(0, merged.IndexOf(tagHelper1));
+ Assert.Equal(1, merged.IndexOf(tagHelper2));
+ Assert.Equal(2, merged.IndexOf(tagHelper3));
+ Assert.True(merged.Contains(tagHelper1));
+ Assert.True(merged.Contains(tagHelper2));
+ Assert.True(merged.Contains(tagHelper3));
+ }
+
+ [Fact]
+ public void Merge_ImmutableArrayThreeCollections_WithDuplicates_DeduplicatesCorrectly()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper1, tagHelper2]; // tagHelper1 is duplicate
+ TagHelperCollection third = [tagHelper2, tagHelper3]; // tagHelper2 is duplicate
+ var collections = ImmutableArray.Create(first, second, third);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(3, merged.Count); // Should be deduplicated
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Same(tagHelper3, merged[2]);
+ }
+
+ [Fact]
+ public void Merge_ImmutableArrayWithEmptyCollections_FiltersEmptyCollections()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ TagHelperCollection first = [tagHelper1];
+ var second = TagHelperCollection.Empty;
+ TagHelperCollection third = [tagHelper2];
+ var fourth = TagHelperCollection.Empty;
+ var collections = ImmutableArray.Create(first, second, third, fourth);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(2, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ }
+
+ [Fact]
+ public void Merge_ImmutableArrayMultipleCollections_LargeSet_WorksCorrectly()
+ {
+ // Arrange
+ var collections = ImmutableArray.CreateBuilder(10);
+ var allHelpers = new List();
+
+ for (var i = 0; i < 10; i++)
+ {
+ var helpers = new TagHelperDescriptor[5];
+ for (var j = 0; j < 5; j++)
+ {
+ helpers[j] = CreateTagHelper($"Collection{i}Helper{j}");
+ allHelpers.Add(helpers[j]);
+ }
+ collections.Add(TagHelperCollection.Create(helpers));
+ }
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections.ToImmutable());
+
+ // Assert
+ Assert.Equal(50, merged.Count);
+
+ // Verify all items are present in correct order
+ for (var i = 0; i < 50; i++)
+ {
+ Assert.Same(allHelpers[i], merged[i]);
+ }
+ }
+
+ [Fact]
+ public void Merge_IEnumerableEmpty_ReturnsEmpty()
+ {
+ // Arrange
+ var collections = new List();
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, merged);
+ }
+
+ [Fact]
+ public void Merge_IEnumerableSingleCollection_ReturnsSameCollection()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(3));
+ var collections = new List { collection };
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Same(collection, merged);
+ }
+
+ [Fact]
+ public void Merge_IEnumerableTwoCollections_UsesOptimizedPath()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+ var collections = new List { first, second };
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(2, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ }
+
+ [Fact]
+ public void Merge_IEnumerableMultipleCollections_WorksCorrectly()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+ TagHelperCollection third = [tagHelper3];
+ var collections = new List { first, second, third };
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(3, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Same(tagHelper3, merged[2]);
+ }
+
+ [Fact]
+ public void Merge_IEnumerableWithoutKnownCount_WorksCorrectly()
+ {
+ // Arrange - Use LINQ to create an enumerable without known count
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+ var baseCollections = new[] { first, second };
+ var collections = baseCollections.Where(c => !c.IsEmpty);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(2, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionMergedResult_SupportsIndexer()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(15).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..5]);
+ var second = TagHelperCollection.Create(helpers[5..10]);
+ var third = TagHelperCollection.Create(helpers[10..15]);
+ var collections = ImmutableArray.Create(first, second, third);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(15, merged.Count);
+
+ // Test indexer access
+ for (var i = 0; i < 15; i++)
+ {
+ Assert.Same(helpers[i], merged[i]);
+ }
+
+ // Test boundary conditions
+ Assert.Throws(() => merged[-1]);
+ Assert.Throws(() => merged[15]);
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionMergedResult_SupportsIndexOf()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(9).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..3]);
+ var second = TagHelperCollection.Create(helpers[3..6]);
+ var third = TagHelperCollection.Create(helpers[6..9]);
+ var collections = ImmutableArray.Create(first, second, third);
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ for (var i = 0; i < 9; i++)
+ {
+ Assert.Equal(i, merged.IndexOf(helpers[i]));
+ }
+
+ var nonExistingHelper = CreateTagHelper("NonExisting");
+ Assert.Equal(-1, merged.IndexOf(nonExistingHelper));
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionMergedResult_SupportsCopyTo()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(6).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..2]);
+ var second = TagHelperCollection.Create(helpers[2..4]);
+ var third = TagHelperCollection.Create(helpers[4..6]);
+ var collections = ImmutableArray.Create(first, second, third);
+ var merged = TagHelperCollection.Merge(collections);
+ var destination = new TagHelperDescriptor[8];
+
+ // Act
+ merged.CopyTo(destination);
+
+ // Assert
+ for (var i = 0; i < 6; i++)
+ {
+ Assert.Same(helpers[i], destination[i]);
+ }
+ Assert.Null(destination[6]);
+ Assert.Null(destination[7]);
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionMergedResult_SupportsEnumeration()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(9).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..3]);
+ var second = TagHelperCollection.Create(helpers[3..6]);
+ var third = TagHelperCollection.Create(helpers[6..9]);
+ var collections = ImmutableArray.Create(first, second, third);
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Act
+ var enumerated = new List();
+ foreach (var item in merged)
+ {
+ enumerated.Add(item);
+ }
+
+ // Assert
+ Assert.Equal(9, enumerated.Count);
+ for (var i = 0; i < 9; i++)
+ {
+ Assert.Same(helpers[i], enumerated[i]);
+ }
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionMergedResult_GetHashCodeIsDeterministic()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(6).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..2]);
+ var second = TagHelperCollection.Create(helpers[2..4]);
+ var third = TagHelperCollection.Create(helpers[4..6]);
+ var collections = ImmutableArray.Create(first, second, third);
+
+ // Act
+ var merged1 = TagHelperCollection.Merge(collections);
+ var merged2 = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(merged1.GetHashCode(), merged2.GetHashCode());
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionMergedResult_EqualityWorksCorrectly()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(6).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..2]);
+ var second = TagHelperCollection.Create(helpers[2..4]);
+ var third = TagHelperCollection.Create(helpers[4..6]);
+ var collections = ImmutableArray.Create(first, second, third);
+
+ // Act
+ var merged1 = TagHelperCollection.Merge(collections);
+ var merged2 = TagHelperCollection.Merge(collections);
+ var arrayCreated = TagHelperCollection.Create(helpers);
+
+ // Assert
+ Assert.True(merged1.Equals(merged2));
+ Assert.True(merged1.Equals(arrayCreated));
+ Assert.True(arrayCreated.Equals(merged1));
+ }
+
+ [Fact]
+ public void Merge_MultiCollectionNestedMerge_WorksCorrectly()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(12).AsSpan();
+ var first = TagHelperCollection.Create(helpers[0..3]);
+ var second = TagHelperCollection.Create(helpers[3..6]);
+ var third = TagHelperCollection.Create(helpers[6..9]);
+ var fourth = TagHelperCollection.Create(helpers[9..12]);
+
+ // Create nested merge structure
+ var merged1 = TagHelperCollection.Merge(first, second);
+ var merged2 = TagHelperCollection.Merge(third, fourth);
+
+ // Act
+ var finalMerged = TagHelperCollection.Merge(merged1, merged2);
+
+ // Assert
+ Assert.Equal(12, finalMerged.Count);
+ for (var i = 0; i < 12; i++)
+ {
+ Assert.Same(helpers[i], finalMerged[i]);
+ }
+ }
+
+ [Fact]
+ public void Merge_ReadOnlySpanEmpty_ReturnsEmpty()
+ {
+ // Arrange
+ ReadOnlySpan collections = [];
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, merged);
+ }
+
+ [Fact]
+ public void Merge_ReadOnlySpanSingleCollection_ReturnsSameCollection()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Create(CreateTestTagHelpers(3));
+ ReadOnlySpan collections = [collection];
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Same(collection, merged);
+ }
+
+ [Fact]
+ public void Merge_ReadOnlySpanMultipleCollections_WorksCorrectly()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+ TagHelperCollection first = [tagHelper1];
+ TagHelperCollection second = [tagHelper2];
+ TagHelperCollection third = [tagHelper3];
+ ReadOnlySpan collections = [first, second, third];
+
+ // Act
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Assert
+ Assert.Equal(3, merged.Count);
+ Assert.Same(tagHelper1, merged[0]);
+ Assert.Same(tagHelper2, merged[1]);
+ Assert.Same(tagHelper3, merged[2]);
+ }
+
+ [Fact]
+ public void MergedCollection_EnumerationPerformance_AvoidsBinarySearchPerElement()
+ {
+ // Arrange - Create a scenario where enumeration would be slow if using indexer
+ var helpers1 = CreateTestTagHelpers(100);
+ var helpers2 = CreateTestTagHelpers(100, startIndex: 100);
+ var helpers3 = CreateTestTagHelpers(100, startIndex: 200);
+
+ var collection1 = TagHelperCollection.Create(helpers1);
+ var collection2 = TagHelperCollection.Create(helpers2);
+ var collection3 = TagHelperCollection.Create(helpers3);
+
+ var collections = ImmutableArray.Create(collection1, collection2, collection3);
+ var merged = TagHelperCollection.Merge(collections);
+
+ // Act - Enumerate the entire collection
+ var enumerated = new List();
+ foreach (var item in merged)
+ {
+ enumerated.Add(item);
+ }
+
+ // Assert - Verify all items are present in correct order
+ Assert.Equal(300, enumerated.Count);
+ for (var i = 0; i < 100; i++)
+ {
+ Assert.Same(helpers1[i], enumerated[i]);
+ }
+ for (var i = 0; i < 100; i++)
+ {
+ Assert.Same(helpers2[i], enumerated[100 + i]);
+ }
+ for (var i = 0; i < 100; i++)
+ {
+ Assert.Same(helpers3[i], enumerated[200 + i]);
+ }
+ }
+
+ [Fact]
+ public void MergedCollection_EnumerationState_HandlesSegmentTransitions()
+ {
+ // Arrange - Create collections of different sizes to test segment transitions
+ var helper1 = CreateTagHelper("Single");
+ var helpers2to4 = CreateTestTagHelpers(3, startIndex: 1);
+ var helpers5to9 = CreateTestTagHelpers(5, startIndex: 4);
+
+ TagHelperCollection collection1 = [helper1];
+ var collection2 = TagHelperCollection.Create(helpers2to4);
+ var collection3 = TagHelperCollection.Create(helpers5to9);
+
+ var merged = TagHelperCollection.Merge(ImmutableArray.Create(collection1, collection2, collection3));
+
+ // Act & Assert - Test enumeration crosses segment boundaries correctly
+ using var enumerator = merged.GetEnumerator();
+
+ // First segment (single item)
+ Assert.True(enumerator.MoveNext());
+ Assert.Same(helper1, enumerator.Current);
+
+ // Second segment (3 items)
+ for (var i = 0; i < 3; i++)
+ {
+ Assert.True(enumerator.MoveNext());
+ Assert.Same(helpers2to4[i], enumerator.Current);
+ }
+
+ // Third segment (5 items)
+ for (var i = 0; i < 5; i++)
+ {
+ Assert.True(enumerator.MoveNext());
+ Assert.Same(helpers5to9[i], enumerator.Current);
+ }
+
+ // Should be exhausted
+ Assert.False(enumerator.MoveNext());
+ }
+
+ [Fact]
+ public void MergedCollection_IndexerAccuracy_WithManySegments()
+ {
+ // Arrange - Create many small segments to stress-test binary search logic
+ var segments = new List();
+ var allHelpers = new List();
+
+ for (var i = 0; i < 20; i++)
+ {
+ var helpers = CreateTestTagHelpers(3, startIndex: i * 3);
+ segments.Add(TagHelperCollection.Create(helpers));
+ allHelpers.AddRange(helpers);
+ }
+
+ var merged = TagHelperCollection.Merge(segments.ToImmutableArray());
+
+ // Act & Assert - Test random access to various indices
+ Assert.Equal(60, merged.Count);
+
+ // Test accessing elements from different segments
+ var testIndices = new[] { 0, 1, 2, 5, 8, 15, 29, 35, 44, 59 };
+ foreach (var index in testIndices)
+ {
+ Assert.Same(allHelpers[index], merged[index]);
+ Assert.Equal(index, merged.IndexOf(allHelpers[index]));
+ }
+ }
+
+ [Fact]
+ public void MergedCollection_FindCollectionIndex_BinarySearchEdgeCases()
+ {
+ // Arrange - Create segments with specific sizes to test binary search edge cases
+ var segment1 = TagHelperCollection.Create(CreateTestTagHelpers(1)); // [0]
+ var segment2 = TagHelperCollection.Create(CreateTestTagHelpers(2, startIndex: 1)); // [1, 2]
+ var segment3 = TagHelperCollection.Create(CreateTestTagHelpers(3, startIndex: 3)); // [3, 4, 5]
+ var segment4 = TagHelperCollection.Create(CreateTestTagHelpers(1, startIndex: 6)); // [6]
+
+ var merged = TagHelperCollection.Merge(ImmutableArray.Create(segment1, segment2, segment3, segment4));
+
+ // Act & Assert - Test edge cases in binary search logic
+ // Start of segments
+ Assert.Equal(0, merged.IndexOf(CreateTagHelper("TagHelper0"))); // Start of segment 1
+ Assert.Equal(1, merged.IndexOf(CreateTagHelper("TagHelper1"))); // Start of segment 2
+ Assert.Equal(3, merged.IndexOf(CreateTagHelper("TagHelper3"))); // Start of segment 3
+ Assert.Equal(6, merged.IndexOf(CreateTagHelper("TagHelper6"))); // Start of segment 4
+
+ // End of segments
+ Assert.Equal(0, merged.IndexOf(CreateTagHelper("TagHelper0"))); // End of segment 1
+ Assert.Equal(2, merged.IndexOf(CreateTagHelper("TagHelper2"))); // End of segment 2
+ Assert.Equal(5, merged.IndexOf(CreateTagHelper("TagHelper5"))); // End of segment 3
+ Assert.Equal(6, merged.IndexOf(CreateTagHelper("TagHelper6"))); // End of segment 4
+ }
+
+ [Fact]
+ public void MergedCollection_CopyTo_HandlesSegmentBoundaries()
+ {
+ // Arrange
+ var helpers1 = CreateTestTagHelpers(2);
+ var helpers2 = CreateTestTagHelpers(3, startIndex: 2);
+ var helpers3 = CreateTestTagHelpers(1, startIndex: 5);
+
+ var collection1 = TagHelperCollection.Create(helpers1);
+ var collection2 = TagHelperCollection.Create(helpers2);
+ var collection3 = TagHelperCollection.Create(helpers3);
+
+ var merged = TagHelperCollection.Merge(ImmutableArray.Create(collection1, collection2, collection3));
+ var destination = new TagHelperDescriptor[10];
+
+ // Act
+ merged.CopyTo(destination);
+
+ // Assert
+ Assert.Same(helpers1[0], destination[0]);
+ Assert.Same(helpers1[1], destination[1]);
+ Assert.Same(helpers2[0], destination[2]);
+ Assert.Same(helpers2[1], destination[3]);
+ Assert.Same(helpers2[2], destination[4]);
+ Assert.Same(helpers3[0], destination[5]);
+
+ // Remaining should be null
+ for (var i = 6; i < 10; i++)
+ {
+ Assert.Null(destination[i]);
+ }
+ }
+
+ [Fact]
+ public void MergedCollection_ComputeHashCode_IsConsistentWithContent()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(6).AsSpan();
+
+ // Create the same content using different merge strategies
+ var merged1 = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..2]),
+ TagHelperCollection.Create(helpers[2..6]));
+
+ var merged2 = TagHelperCollection.Merge(ImmutableArray.Create(
+ TagHelperCollection.Create(helpers[0..3]),
+ TagHelperCollection.Create(helpers[3..6])));
+
+ var arrayBacked = TagHelperCollection.Create(helpers);
+
+ // Act & Assert
+ Assert.Equal(arrayBacked.GetHashCode(), merged1.GetHashCode());
+ Assert.Equal(arrayBacked.GetHashCode(), merged2.GetHashCode());
+ Assert.Equal(merged1.GetHashCode(), merged2.GetHashCode());
+ }
+
+ [Fact]
+ public void MergedCollection_EqualsImplementation_WorksAcrossDifferentCollectionTypes()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(4).AsSpan();
+
+ var arrayBacked = TagHelperCollection.Create(helpers);
+ var twoItemMerged = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..2]),
+ TagHelperCollection.Create(helpers[2..4]));
+ var multiMerged = TagHelperCollection.Merge(ImmutableArray.Create(
+ TagHelperCollection.Create([helpers[0]]),
+ TagHelperCollection.Create([helpers[1]]),
+ TagHelperCollection.Create(helpers[2..4])));
+
+ // Act & Assert - All should be equal despite different internal structures
+ Assert.True(arrayBacked.Equals(twoItemMerged));
+ Assert.True(twoItemMerged.Equals(arrayBacked));
+ Assert.True(arrayBacked.Equals(multiMerged));
+ Assert.True(multiMerged.Equals(arrayBacked));
+ Assert.True(twoItemMerged.Equals(multiMerged));
+ Assert.True(multiMerged.Equals(twoItemMerged));
+ }
+
+ [Fact]
+ public void MergedCollection_DifferentInternalStructure_SameContent_ReturnsTrue()
+ {
+ // Arrange - Create collections with same content but different internal merge structure
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+
+ // First merged collection: [tagHelper1] + [tagHelper2, tagHelper3]
+ TagHelperCollection firstPart1 = [tagHelper1];
+ TagHelperCollection secondPart1 = [tagHelper2, tagHelper3];
+ var merged1 = TagHelperCollection.Merge(firstPart1, secondPart1);
+
+ // Second merged collection: [tagHelper1, tagHelper2] + [tagHelper3]
+ TagHelperCollection firstPart2 = [tagHelper1, tagHelper2];
+ TagHelperCollection secondPart2 = [tagHelper3];
+ var merged2 = TagHelperCollection.Merge(firstPart2, secondPart2);
+
+ // Act & Assert - Should be equal despite different merge structure
+ Assert.True(merged1.Equals(merged2));
+ Assert.True(merged2.Equals(merged1));
+ Assert.Equal(merged1.GetHashCode(), merged2.GetHashCode());
+
+ // Verify content is identical
+ Assert.Equal(3, merged1.Count);
+ Assert.Equal(3, merged2.Count);
+ Assert.Same(tagHelper1, merged1[0]);
+ Assert.Same(tagHelper2, merged1[1]);
+ Assert.Same(tagHelper3, merged1[2]);
+ Assert.Same(tagHelper1, merged2[0]);
+ Assert.Same(tagHelper2, merged2[1]);
+ Assert.Same(tagHelper3, merged2[2]);
+ }
+
+ [Fact]
+ public void TwoItemMergedCollection_DifferentInternalStructure_SameContent_ReturnsTrue()
+ {
+ // Arrange - Create two-item merged collections with same content but different internal structure
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+
+ // First: single + single
+ TagHelperCollection first1 = [tagHelper1];
+ TagHelperCollection second1 = [tagHelper2];
+ var merged1 = TagHelperCollection.Merge(first1, second1);
+
+ // Second: array + single (different internal collection types)
+ var arrayCollection = TagHelperCollection.Create([tagHelper1]);
+ TagHelperCollection singleCollection = [tagHelper2];
+ var merged2 = TagHelperCollection.Merge(arrayCollection, singleCollection);
+
+ // Act & Assert - Should be equal despite different internal structure
+ Assert.True(merged1.Equals(merged2));
+ Assert.True(merged2.Equals(merged1));
+ Assert.Equal(merged1.GetHashCode(), merged2.GetHashCode());
+
+ // Verify content is identical
+ Assert.Equal(2, merged1.Count);
+ Assert.Equal(2, merged2.Count);
+ Assert.Same(tagHelper1, merged1[0]);
+ Assert.Same(tagHelper2, merged1[1]);
+ Assert.Same(tagHelper1, merged2[0]);
+ Assert.Same(tagHelper2, merged2[1]);
+ }
+
+ [Fact]
+ public void MergedCollection_VsArrayCollection_SameContent_ReturnsTrue()
+ {
+ // Arrange - Create merged collection vs array-backed collection with same content
+ var tagHelpers = CreateTestTagHelpers(4).AsSpan();
+
+ // Create via merge
+ var part1 = TagHelperCollection.Create(tagHelpers[0..2]);
+ var part2 = TagHelperCollection.Create(tagHelpers[2..4]);
+ var merged = TagHelperCollection.Merge(part1, part2);
+
+ // Create directly from array
+ var arrayBacked = TagHelperCollection.Create(tagHelpers);
+
+ // Act & Assert - Should be equal despite different construction
+ Assert.True(merged.Equals(arrayBacked));
+ Assert.True(arrayBacked.Equals(merged));
+ Assert.Equal(merged.GetHashCode(), arrayBacked.GetHashCode());
+
+ // Verify content is identical
+ Assert.Equal(4, merged.Count);
+ Assert.Equal(4, arrayBacked.Count);
+ for (var i = 0; i < 4; i++)
+ {
+ Assert.Same(tagHelpers[i], merged[i]);
+ Assert.Same(tagHelpers[i], arrayBacked[i]);
+ }
+ }
+
+ [Fact]
+ public void MergedCollection_VsSingleItemCollection_SameContent_ReturnsTrue()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("Test");
+
+ // Create via merge of two empty parts (should result in single item)
+ TagHelperCollection part1 = [tagHelper];
+ var merged = TagHelperCollection.Merge(part1, TagHelperCollection.Empty);
+
+ // Create directly as single item
+ TagHelperCollection single = [tagHelper];
+
+ // Act & Assert - Should be equal despite different construction
+ Assert.True(merged.Equals(single));
+ Assert.True(single.Equals(merged));
+ Assert.Equal(merged.GetHashCode(), single.GetHashCode());
+
+ // Verify content is identical
+ Assert.Single(merged);
+ Assert.Single(single);
+ Assert.Same(tagHelper, merged[0]);
+ Assert.Same(tagHelper, single[0]);
+ }
+
+ [Fact]
+ public void MultiLevelMergedCollection_EqualityWorks_AcrossDifferentNestingLevels()
+ {
+ // Arrange - Create the same content through different nesting levels
+ var helpers = CreateTestTagHelpers(8);
+
+ // Flat merge: all 8 collections merged at once
+ var individualCollections = helpers.Select(h => TagHelperCollection.Create([h])).ToArray();
+ var flatMerged = TagHelperCollection.Merge(individualCollections.ToImmutableArray());
+
+ // Two-level merge: merge pairs, then merge the pairs
+ var pair1 = TagHelperCollection.Merge(individualCollections[0], individualCollections[1]);
+ var pair2 = TagHelperCollection.Merge(individualCollections[2], individualCollections[3]);
+ var pair3 = TagHelperCollection.Merge(individualCollections[4], individualCollections[5]);
+ var pair4 = TagHelperCollection.Merge(individualCollections[6], individualCollections[7]);
+ var twoLevelMerged = TagHelperCollection.Merge(ImmutableArray.Create(pair1, pair2, pair3, pair4));
+
+ // Three-level merge: merge pairs, then pairs of pairs
+ var quad1 = TagHelperCollection.Merge(pair1, pair2);
+ var quad2 = TagHelperCollection.Merge(pair3, pair4);
+ var threeLevelMerged = TagHelperCollection.Merge(quad1, quad2);
+
+ // Array-backed for comparison
+ var arrayBacked = TagHelperCollection.Create(helpers);
+
+ // Act & Assert - All should be equal despite different nesting structures
+ Assert.True(flatMerged.Equals(twoLevelMerged));
+ Assert.True(twoLevelMerged.Equals(threeLevelMerged));
+ Assert.True(threeLevelMerged.Equals(arrayBacked));
+ Assert.True(arrayBacked.Equals(flatMerged));
+
+ // Verify hash codes are equal
+ Assert.Equal(flatMerged.GetHashCode(), twoLevelMerged.GetHashCode());
+ Assert.Equal(twoLevelMerged.GetHashCode(), threeLevelMerged.GetHashCode());
+ Assert.Equal(threeLevelMerged.GetHashCode(), arrayBacked.GetHashCode());
+ }
+
+ [Fact]
+ public void MergedCollection_WithNestedMergedCollections_EqualityWorksCorrectly()
+ {
+ // Arrange - Create complex nested structure
+ var helpers = CreateTestTagHelpers(6);
+
+ // Create nested merged collection structure
+ var innerMerged1 = TagHelperCollection.Merge(
+ TagHelperCollection.Create([helpers[0]]),
+ TagHelperCollection.Create([helpers[1]]));
+
+ var innerMerged2 = TagHelperCollection.Merge(
+ TagHelperCollection.Create([helpers[2], helpers[3]]),
+ TagHelperCollection.Create([helpers[4], helpers[5]]));
+
+ var outerMerged = TagHelperCollection.Merge(innerMerged1, innerMerged2);
+
+ // Create equivalent flat structure
+ var flatMerged = TagHelperCollection.Merge(ImmutableArray.Create(
+ TagHelperCollection.Create([helpers[0]]),
+ TagHelperCollection.Create([helpers[1]]),
+ TagHelperCollection.Create([helpers[2], helpers[3]]),
+ TagHelperCollection.Create([helpers[4], helpers[5]])
+ ));
+
+ // Create array-backed equivalent
+ var arrayBacked = TagHelperCollection.Create(helpers);
+
+ // Act & Assert
+ Assert.True(outerMerged.Equals(flatMerged));
+ Assert.True(flatMerged.Equals(arrayBacked));
+ Assert.True(arrayBacked.Equals(outerMerged));
+
+ // Verify content integrity
+ Assert.Equal(6, outerMerged.Count);
+ Assert.Equal(6, flatMerged.Count);
+ Assert.Equal(6, arrayBacked.Count);
+
+ for (var i = 0; i < 6; i++)
+ {
+ Assert.Same(helpers[i], outerMerged[i]);
+ Assert.Same(helpers[i], flatMerged[i]);
+ Assert.Same(helpers[i], arrayBacked[i]);
+ }
+ }
+
+ [Fact]
+ public void MergedCollection_DifferentContent_SameStructure_ReturnsFalse()
+ {
+ // Arrange - Same merge structure but different content
+ var helpers1 = CreateTestTagHelpers(4).AsSpan();
+ var helpers2 = CreateTestTagHelpers(4, startIndex: 10).AsSpan(); // Different content
+
+ var part1a = TagHelperCollection.Create(helpers1[0..2]);
+ var part2a = TagHelperCollection.Create(helpers1[2..4]);
+ var merged1 = TagHelperCollection.Merge(part1a, part2a);
+
+ var part1b = TagHelperCollection.Create(helpers2[0..2]);
+ var part2b = TagHelperCollection.Create(helpers2[2..4]);
+ var merged2 = TagHelperCollection.Merge(part1b, part2b);
+
+ // Act & Assert - Should not be equal due to different content
+ Assert.False(merged1.Equals(merged2));
+ Assert.False(merged2.Equals(merged1));
+ Assert.NotEqual(merged1.GetHashCode(), merged2.GetHashCode());
+ }
+
+ [Fact]
+ public void MergedCollection_SameContentDifferentOrder_ReturnsFalse()
+ {
+ // Arrange - Same items but different order
+ var tagHelper1 = CreateTagHelper("Test1");
+ var tagHelper2 = CreateTagHelper("Test2");
+ var tagHelper3 = CreateTagHelper("Test3");
+
+ // First order: 1, 2, 3
+ var merged1 = TagHelperCollection.Merge(
+ TagHelperCollection.Create([tagHelper1]),
+ TagHelperCollection.Create([tagHelper2, tagHelper3]));
+
+ // Second order: 3, 2, 1
+ var merged2 = TagHelperCollection.Merge(
+ TagHelperCollection.Create([tagHelper3]),
+ TagHelperCollection.Create([tagHelper2, tagHelper1]));
+
+ // Act & Assert - Should not be equal due to different order
+ Assert.False(merged1.Equals(merged2));
+ Assert.False(merged2.Equals(merged1));
+ Assert.NotEqual(merged1.GetHashCode(), merged2.GetHashCode());
+
+ // Verify the order is actually different
+ Assert.Same(tagHelper1, merged1[0]);
+ Assert.Same(tagHelper2, merged1[1]);
+ Assert.Same(tagHelper3, merged1[2]);
+
+ Assert.Same(tagHelper3, merged2[0]);
+ Assert.Same(tagHelper2, merged2[1]);
+ Assert.Same(tagHelper1, merged2[2]);
+ }
+
+ [Fact]
+ public void MergedCollection_ChecksumBasedEquality_WorksWithLargeCollections()
+ {
+ // Arrange - Create large collections to test checksum-based equality path
+ var helpers = CreateTestTagHelpers(100).AsSpan();
+
+ // Create via different merge strategies
+ var merged1 = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..50]),
+ TagHelperCollection.Create(helpers[50..100]));
+
+ var merged2 = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..25]),
+ TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[25..75]),
+ TagHelperCollection.Create(helpers[75..100])));
+
+ var arrayBacked = TagHelperCollection.Create(helpers);
+
+ // Act & Assert - Large collections should use checksum-based equality
+ Assert.True(merged1.Equals(merged2));
+ Assert.True(merged2.Equals(arrayBacked));
+ Assert.True(arrayBacked.Equals(merged1));
+
+ // Hash codes should be equal due to checksum-based computation
+ Assert.Equal(merged1.GetHashCode(), merged2.GetHashCode());
+ Assert.Equal(merged2.GetHashCode(), arrayBacked.GetHashCode());
+ }
+
+ [Fact]
+ public void MergedCollection_TransitiveEquality_WorksCorrectly()
+ {
+ // Arrange - Test transitive property: if A == B and B == C, then A == C
+ var helpers = CreateTestTagHelpers(6).AsSpan();
+
+ var collectionA = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..2]),
+ TagHelperCollection.Create(helpers[2..6]));
+
+ var collectionB = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..3]),
+ TagHelperCollection.Create(helpers[3..6]));
+
+ var collectionC = TagHelperCollection.Create(helpers);
+
+ // Act & Assert - Test transitivity
+ Assert.True(collectionA.Equals(collectionB)); // A == B
+ Assert.True(collectionB.Equals(collectionC)); // B == C
+ Assert.True(collectionA.Equals(collectionC)); // Therefore A == C
+
+ // Test symmetry
+ Assert.True(collectionB.Equals(collectionA)); // B == A
+ Assert.True(collectionC.Equals(collectionB)); // C == B
+ Assert.True(collectionC.Equals(collectionA)); // C == A
+
+ // Test reflexivity
+ Assert.True(collectionA.Equals(collectionA));
+ Assert.True(collectionB.Equals(collectionB));
+ Assert.True(collectionC.Equals(collectionC));
+ }
+
+ [Fact]
+ public void MergedCollection_NullEquality_WorksCorrectly()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(3).AsSpan();
+ var merged = TagHelperCollection.Merge(
+ TagHelperCollection.Create([helpers[0]]),
+ TagHelperCollection.Create(helpers[1..3]));
+
+ // Act & Assert
+ Assert.False(merged.Equals(null));
+ Assert.False(merged.Equals((object?)null));
+ }
+
+ [Fact]
+ public void MergedCollection_EqualityWithDifferentTypes_WorksCorrectly()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(3).AsSpan();
+ var merged = TagHelperCollection.Merge(
+ TagHelperCollection.Create([helpers[0]]),
+ TagHelperCollection.Create(helpers[1..3]));
+
+ // Act & Assert - Should not equal different types
+ Assert.False(merged.Equals("not a collection"));
+ Assert.False(merged.Equals(42));
+ }
+
+ [Fact]
+ public void MergedCollection_EqualsObjectOverride_WorksCorrectly()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(3).AsSpan();
+ var merged1 = TagHelperCollection.Merge(
+ TagHelperCollection.Create([helpers[0]]),
+ TagHelperCollection.Create(helpers[1..3]));
+
+ var merged2 = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..2]),
+ TagHelperCollection.Create([helpers[2]]));
+
+ // Act & Assert - Test object.Equals override
+ Assert.True(merged1.Equals((object)merged2));
+ Assert.True(merged2.Equals((object)merged1));
+ Assert.True(merged1.Equals((object)merged1)); // Reflexivity
+ }
+
+ [Fact]
+ public void MergedCollection_EnumerationResetAndDispose_WorksCorrectly()
+ {
+ // Arrange
+ var helpers = CreateTestTagHelpers(6).AsSpan();
+ var merged = TagHelperCollection.Merge(ImmutableArray.Create(
+ TagHelperCollection.Create(helpers[0..2]),
+ TagHelperCollection.Create(helpers[2..4]),
+ TagHelperCollection.Create(helpers[4..6])));
+
+ // Act & Assert - Test enumerator lifecycle
+ using var enumerator = merged.GetEnumerator();
+
+ // Enumerate first few items
+ Assert.True(enumerator.MoveNext());
+ Assert.Same(helpers[0], enumerator.Current);
+ Assert.True(enumerator.MoveNext());
+ Assert.Same(helpers[1], enumerator.Current);
+
+ // Reset should work
+ enumerator.Reset();
+ Assert.True(enumerator.MoveNext());
+ Assert.Same(helpers[0], enumerator.Current);
+
+ // Dispose should work (multiple times)
+ enumerator.Dispose();
+ enumerator.Dispose(); // Should not throw
+ }
+
+ [Fact]
+ public void MergedCollection_IndexOfWithNestedMergedCollections_WorksCorrectly()
+ {
+ // Arrange - Create nested merged collections to test complex scenarios
+ var helpers = CreateTestTagHelpers(12).AsSpan();
+
+ var innerMerged1 = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[0..2]),
+ TagHelperCollection.Create(helpers[2..4]));
+ var innerMerged2 = TagHelperCollection.Merge(
+ TagHelperCollection.Create(helpers[4..6]),
+ TagHelperCollection.Create(helpers[6..8]));
+ var regularCollection = TagHelperCollection.Create(helpers[8..12]);
+
+ var outerMerged = TagHelperCollection.Merge(ImmutableArray.Create(
+ innerMerged1, innerMerged2, regularCollection));
+
+ // Act & Assert - Verify IndexOf works correctly for nested structure
+ for (var i = 0; i < 12; i++)
+ {
+ Assert.Equal(i, outerMerged.IndexOf(helpers[i]));
+ Assert.Same(helpers[i], outerMerged[i]);
+ }
+
+ // Test non-existent item
+ var nonExistent = CreateTagHelper("NonExistent");
+ Assert.Equal(-1, outerMerged.IndexOf(nonExistent));
+ }
+
+ [Fact]
+ public void MergedCollection_LargeNumberOfSmallSegments_PerformsWell()
+ {
+ // Arrange - Stress test with many small segments
+ var segments = new List();
+ var allHelpers = new List();
+
+ for (var i = 0; i < 50; i++)
+ {
+ var helper = CreateTagHelper($"Helper{i}");
+ segments.Add(TagHelperCollection.Create([helper]));
+ allHelpers.Add(helper);
+ }
+
+ var merged = TagHelperCollection.Merge(segments.ToImmutableArray());
+
+ // Act & Assert - Verify functionality with many segments
+ Assert.Equal(50, merged.Count);
+
+ // Test enumeration
+ var enumerated = new List();
+ foreach (var item in merged)
+ {
+ enumerated.Add(item);
+ }
+ Assert.Equal(allHelpers, enumerated);
+
+ // Test random access
+ for (var i = 0; i < 50; i += 5) // Test every 5th element
+ {
+ Assert.Same(allHelpers[i], merged[i]);
+ Assert.Equal(i, merged.IndexOf(allHelpers[i]));
+ }
+ }
+
+ [Fact]
+ public void Where_EmptyCollection_ReturnsEmpty()
+ {
+ // Arrange
+ var collection = TagHelperCollection.Empty;
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("Test", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, filtered);
+ }
+
+ [Fact]
+ public void Where_NoMatches_ReturnsEmpty()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("NonExistent", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, filtered);
+ }
+
+ [Fact]
+ public void Where_AllMatch_ReturnsSameCollection()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(3);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("TagHelper", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Equal(collection.Count, filtered.Count);
+ Assert.SameItems(tagHelpers, filtered);
+
+ // Verify the result has the same structure (should be optimized)
+ for (var i = 0; i < tagHelpers.Length; i++)
+ {
+ Assert.Same(tagHelpers[i], filtered[i]);
+ }
+ }
+
+ [Fact]
+ public void Where_PartialMatch_ReturnsFilteredCollection()
+ {
+ // Arrange
+ var tagHelper1 = CreateTagHelper("TestHelper1");
+ var tagHelper2 = CreateTagHelper("OtherHelper");
+ var tagHelper3 = CreateTagHelper("TestHelper3");
+ var tagHelpers = new[] { tagHelper1, tagHelper2, tagHelper3 };
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("Test", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Equal(2, filtered.Count);
+ Assert.Same(tagHelper1, filtered[0]);
+ Assert.Same(tagHelper3, filtered[1]);
+ Assert.Equal(0, filtered.IndexOf(tagHelper1));
+ Assert.Equal(1, filtered.IndexOf(tagHelper3));
+ Assert.True(filtered.Contains(tagHelper1));
+ Assert.True(filtered.Contains(tagHelper3));
+ Assert.False(filtered.Contains(tagHelper2));
+ }
+
+ [Fact]
+ public void Where_SingleItem_MatchingPredicate_ReturnsSingleItemCollection()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("TestHelper");
+ TagHelperCollection collection = [tagHelper];
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("Test", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Single(filtered);
+ Assert.Same(tagHelper, filtered[0]);
+ Assert.Equal(0, filtered.IndexOf(tagHelper));
+ Assert.True(filtered.Contains(tagHelper));
+ }
+
+ [Fact]
+ public void Where_SingleItem_NonMatchingPredicate_ReturnsEmpty()
+ {
+ // Arrange
+ var tagHelper = CreateTagHelper("TestHelper");
+ TagHelperCollection collection = [tagHelper];
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("Other", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Same(TagHelperCollection.Empty, filtered);
+ }
+
+ [Fact]
+ public void Where_MergedCollection_WorksCorrectly()
+ {
+ // Arrange
+ var firstHelpers = CreateTestTagHelpers(2);
+ var secondHelpers = new[] { CreateTagHelper("OtherHelper1"), CreateTagHelper("TestHelper") };
+ var first = TagHelperCollection.Create(firstHelpers);
+ var second = TagHelperCollection.Create(secondHelpers);
+ var merged = TagHelperCollection.Merge(first, second);
+
+ // Act
+ var filtered = merged.Where(h => h.Name.StartsWith("TagHelper", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Equal(2, filtered.Count); // 2 from first, 0 from second (neither "OtherHelper1" nor "TestHelper" starts with "TagHelper")
+ Assert.Same(firstHelpers[0], filtered[0]);
+ Assert.Same(firstHelpers[1], filtered[1]);
+ }
+
+ [Fact]
+ public void Where_LargeCollection_WorksCorrectly()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(100);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act - Filter for even-numbered helpers
+ var filtered = collection.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) % 2 == 0;
+ });
+
+ // Assert
+ Assert.Equal(50, filtered.Count); // TagHelper0, TagHelper2, ..., TagHelper98
+
+ // Verify the filtered items are correct
+ for (var i = 0; i < 50; i++)
+ {
+ var expectedIndex = i * 2;
+ Assert.Same(tagHelpers[expectedIndex], filtered[i]);
+ Assert.Equal(i, filtered.IndexOf(tagHelpers[expectedIndex]));
+ }
+ }
+
+ [Fact]
+ public void Where_ComplexPredicate_WorksCorrectly()
+ {
+ // Arrange
+ var shortHelper = CreateTagHelper("A");
+ var mediumHelper1 = CreateTagHelper("Medium1");
+ var mediumHelper2 = CreateTagHelper("Medium2");
+ var longHelper = CreateTagHelper("VeryLongHelperName");
+ var collection = TagHelperCollection.Create([shortHelper, mediumHelper1, mediumHelper2, longHelper]);
+
+ // Act
+ var filtered = collection.Where(h => h.Name.Length >= 6 && h.Name.Length <= 8);
+
+ // Assert
+ Assert.Equal(2, filtered.Count);
+ Assert.Same(mediumHelper1, filtered[0]);
+ Assert.Same(mediumHelper2, filtered[1]);
+ }
+
+ [Fact]
+ public void Where_ChainedFiltering_WorksCorrectly()
+ {
+ // Arrange
+ var helpers = new[]
+ {
+ CreateTagHelper("TestHelper1"),
+ CreateTagHelper("TestHelper2"),
+ CreateTagHelper("OtherHelper1"),
+ CreateTagHelper("TestHelper3"),
+ CreateTagHelper("OtherHelper2")
+ };
+ var collection = TagHelperCollection.Create(helpers);
+
+ // Act - Chain multiple Where operations
+ var filtered = collection
+ .Where(h => h.Name.StartsWith("Test", StringComparison.Ordinal))
+ .Where(h => !h.Name.EndsWith('2'));
+
+ // Assert
+ Assert.Equal(2, filtered.Count);
+ Assert.Same(helpers[0], filtered[0]); // TestHelper1
+ Assert.Same(helpers[3], filtered[1]); // TestHelper3
+ }
+
+ [Fact]
+ public void Where_PreservesSegmentStructure_OptimalCase()
+ {
+ // Arrange - Create a multi-segment collection where filtering preserves segment boundaries
+ var segment1Helpers = new[] { CreateTagHelper("Keep1"), CreateTagHelper("Keep2") };
+ var segment2Helpers = new[] { CreateTagHelper("Keep3"), CreateTagHelper("Keep4") };
+ var collection1 = TagHelperCollection.Create(segment1Helpers);
+ var collection2 = TagHelperCollection.Create(segment2Helpers);
+ var merged = TagHelperCollection.Merge(collection1, collection2);
+
+ // Act
+ var filtered = merged.Where(h => h.Name.StartsWith("Keep", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Equal(4, filtered.Count);
+ Assert.Same(segment1Helpers[0], filtered[0]);
+ Assert.Same(segment1Helpers[1], filtered[1]);
+ Assert.Same(segment2Helpers[0], filtered[2]);
+ Assert.Same(segment2Helpers[1], filtered[3]);
+
+ // Verify filtering performance by checking all items are accessible
+ for (var i = 0; i < 4; i++)
+ {
+ var helper = filtered[i];
+ Assert.Equal(i, filtered.IndexOf(helper));
+ Assert.True(filtered.Contains(helper));
+ }
+ }
+
+ [Fact]
+ public void Where_FragmentedSegments_CreatesOptimalSegments()
+ {
+ // Arrange - Create a scenario where filtering creates fragmented segments
+ var helpers = new[]
+ {
+ CreateTagHelper("Keep1"), // Keep
+ CreateTagHelper("Remove1"), // Remove
+ CreateTagHelper("Keep2"), // Keep
+ CreateTagHelper("Keep3"), // Keep
+ CreateTagHelper("Remove2"), // Remove
+ CreateTagHelper("Keep4") // Keep
+ };
+ var collection = TagHelperCollection.Create(helpers);
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("Keep", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Equal(4, filtered.Count);
+ Assert.Same(helpers[0], filtered[0]); // Keep1
+ Assert.Same(helpers[2], filtered[1]); // Keep2
+ Assert.Same(helpers[3], filtered[2]); // Keep3
+ Assert.Same(helpers[5], filtered[3]); // Keep4
+
+ // Verify all operations work correctly on fragmented result
+ Assert.Equal(0, filtered.IndexOf(helpers[0]));
+ Assert.Equal(1, filtered.IndexOf(helpers[2]));
+ Assert.Equal(2, filtered.IndexOf(helpers[3]));
+ Assert.Equal(3, filtered.IndexOf(helpers[5]));
+ Assert.Equal(-1, filtered.IndexOf(helpers[1])); // Removed item
+ Assert.Equal(-1, filtered.IndexOf(helpers[4])); // Removed item
+ }
+
+ [Fact]
+ public void Where_AlternatingPattern_CreatesMultipleSegments()
+ {
+ // Arrange - Create an alternating keep/remove pattern
+ var helpers = new TagHelperDescriptor[10];
+ for (var i = 0; i < 10; i++)
+ {
+ helpers[i] = CreateTagHelper(i % 2 == 0 ? $"Keep{i}" : $"Remove{i}");
+ }
+ var collection = TagHelperCollection.Create(helpers);
+
+ // Act
+ var filtered = collection.Where(h => h.Name.StartsWith("Keep", StringComparison.Ordinal));
+
+ // Assert
+ Assert.Equal(5, filtered.Count);
+ for (var i = 0; i < 5; i++)
+ {
+ var expectedIndex = i * 2;
+ Assert.Same(helpers[expectedIndex], filtered[i]);
+ }
+ }
+
+ [Fact]
+ public void Where_FilteredResult_SupportsAllOperations()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(6);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var filtered = collection.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ var index = int.Parse(nameIndex);
+ return index % 2 == 0; // Keep even indices: 0, 2, 4
+ });
+
+ // Assert
+ Assert.Equal(3, filtered.Count);
+
+ // Test indexer
+ Assert.Same(tagHelpers[0], filtered[0]);
+ Assert.Same(tagHelpers[2], filtered[1]);
+ Assert.Same(tagHelpers[4], filtered[2]);
+
+ // Test IndexOf
+ Assert.Equal(0, filtered.IndexOf(tagHelpers[0]));
+ Assert.Equal(1, filtered.IndexOf(tagHelpers[2]));
+ Assert.Equal(2, filtered.IndexOf(tagHelpers[4]));
+ Assert.Equal(-1, filtered.IndexOf(tagHelpers[1])); // Filtered out
+ Assert.Equal(-1, filtered.IndexOf(tagHelpers[3])); // Filtered out
+ Assert.Equal(-1, filtered.IndexOf(tagHelpers[5])); // Filtered out
+
+ // Test Contains
+ Assert.True(filtered.Contains(tagHelpers[0]));
+ Assert.True(filtered.Contains(tagHelpers[2]));
+ Assert.True(filtered.Contains(tagHelpers[4]));
+ Assert.False(filtered.Contains(tagHelpers[1]));
+ Assert.False(filtered.Contains(tagHelpers[3]));
+ Assert.False(filtered.Contains(tagHelpers[5]));
+
+ // Test CopyTo
+ var destination = new TagHelperDescriptor[5];
+ filtered.CopyTo(destination);
+ Assert.Same(tagHelpers[0], destination[0]);
+ Assert.Same(tagHelpers[2], destination[1]);
+ Assert.Same(tagHelpers[4], destination[2]);
+ Assert.Null(destination[3]);
+ Assert.Null(destination[4]);
+
+ // Test enumeration
+ var enumerated = new List();
+ foreach (var item in filtered)
+ {
+ enumerated.Add(item);
+ }
+ Assert.Equal(3, enumerated.Count);
+ Assert.Same(tagHelpers[0], enumerated[0]);
+ Assert.Same(tagHelpers[2], enumerated[1]);
+ Assert.Same(tagHelpers[4], enumerated[2]);
+ }
+
+ [Fact]
+ public void Where_FilteredResult_SupportsEquality()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+ var collection1 = TagHelperCollection.Create(tagHelpers);
+ var collection2 = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var filtered1 = collection1.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) < 2; // Keep 0, 1
+ });
+ var filtered2 = collection2.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) < 2; // Keep 0, 1
+ });
+
+ // Assert
+ Assert.True(filtered1.Equals(filtered2));
+ Assert.True(filtered2.Equals(filtered1));
+ Assert.Equal(filtered1.GetHashCode(), filtered2.GetHashCode());
+ }
+
+ [Fact]
+ public void Where_FilteredResult_DifferentContent_NotEqual()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+ var collection = TagHelperCollection.Create(tagHelpers);
+
+ // Act
+ var filtered1 = collection.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) < 2; // Keep 0, 1
+ });
+ var filtered2 = collection.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) >= 2; // Keep 2, 3
+ });
+
+ // Assert
+ Assert.False(filtered1.Equals(filtered2));
+ Assert.False(filtered2.Equals(filtered1));
+ Assert.NotEqual(filtered1.GetHashCode(), filtered2.GetHashCode());
+ }
+
+ [Fact]
+ public void Where_FilteredResult_ThrowsOnInvalidIndex()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var filtered = collection.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) < 2; // Keep 0, 1
+ });
+
+ // Act & Assert
+ Assert.Throws(() => filtered[-1]);
+ Assert.Throws(() => filtered[2]);
+ Assert.Throws(() => filtered[10]);
+ }
+
+ [Fact]
+ public void Where_FilteredResult_CopyToDestinationTooShort_ThrowsArgumentException()
+ {
+ // Arrange
+ var tagHelpers = CreateTestTagHelpers(4);
+ var collection = TagHelperCollection.Create(tagHelpers);
+ var filtered = collection.Where(h =>
+ {
+ var nameIndex = h.Name["TagHelper".Length..];
+ return int.Parse(nameIndex) < 3; // Keep 0, 1, 2
+ });
+ var destination = new TagHelperDescriptor[2]; // Too short
+
+ // Act & Assert
+ Assert.Throws(() => filtered.CopyTo(destination));
+ }
+}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.cs-diagnostics.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.cs-diagnostics.txt
index 17925588265..3b07e23dc6d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.cs-diagnostics.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.cs-diagnostics.txt
@@ -1,7 +1,4 @@
-// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(2,31): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
-// public async Task Foo()
-Diagnostic(ErrorCode.WRN_AsyncLacksAwaits, "Foo").WithLocation(2, 31),
-// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(14,55): error CS1525: Invalid expression term ';'
+// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(14,55): error CS1525: Invalid expression term ';'
// __o = await;
Diagnostic(ErrorCode.ERR_InvalidExprTerm, ";").WithArguments(";").WithLocation(14, 55),
// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(19,49): error CS1501: No overload for method 'Foo' takes 2 arguments
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.cs-diagnostics.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.cs-diagnostics.txt
index 2a1cc187c52..20f51a6d796 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.cs-diagnostics.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.cs-diagnostics.txt
@@ -1,7 +1,4 @@
-// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(2,31): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
-// public async Task Foo()
-Diagnostic(ErrorCode.WRN_AsyncLacksAwaits, "Foo").WithLocation(2, 31),
-// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(14,55): error CS1525: Invalid expression term ')'
+// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(14,55): error CS1525: Invalid expression term ')'
// await
Diagnostic(ErrorCode.ERR_InvalidExprTerm, "").WithArguments(")").WithLocation(14, 55),
// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml(19,49): error CS1501: No overload for method 'Foo' takes 2 arguments
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.cs-diagnostics.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.cs-diagnostics.txt
index 8abdb160933..c4b1e23d5f1 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.cs-diagnostics.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.cs-diagnostics.txt
@@ -4,9 +4,6 @@ Diagnostic(ErrorCode.ERR_BadAwaitWithoutVoidAsyncMethod, "await __tagHelperRunne
// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml(81,17): error CS4033: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
// await __tagHelperExecutionContext.SetOutputContentAsync();
Diagnostic(ErrorCode.ERR_BadAwaitWithoutVoidAsyncMethod, "await __tagHelperExecutionContext.SetOutputContentAsync()").WithLocation(81, 17),
-// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml(126,193): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
-// __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "__UniqueIdSuppressedForTesting__", async() => {
-Diagnostic(ErrorCode.WRN_AsyncLacksAwaits, "=>").WithLocation(126, 193),
// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml(142,9): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
// await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Diagnostic(ErrorCode.ERR_BadAwaitWithoutAsyncMethod, "await __tagHelperRunner.RunAsync(__tagHelperExecutionContext)").WithArguments("System.Threading.Tasks.Task").WithLocation(142, 9),
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt
index 45dc06bf2ca..de07c841928 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt
@@ -28,7 +28,7 @@
CSharpCode -
IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
CSharpCode - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
IntermediateToken - - CSharp - ;
CSharpCode -
IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt
index 668e0fe7fe4..18ccc635016 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt
@@ -3,3 +3,8 @@
Generated Location: (799:22,44 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (1950:51,12 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt
index 353bbbbec49..697dd51ef76 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt
@@ -31,7 +31,7 @@
CSharpCode -
IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
CSharpCode - (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
IntermediateToken - - CSharp - ;
CSharpCode -
IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt
index 45faf716a9b..a13a0f95e58 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt
@@ -8,3 +8,8 @@ Source Location: (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1075:32,44 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (2226:61,12 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.codegen.cs
new file mode 100644
index 00000000000..7f78810f9eb
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.codegen.cs
@@ -0,0 +1,73 @@
+//
+#pragma warning disable 1591
+namespace Test
+{
+ #line default
+ using global::System;
+ using global::System.Collections.Generic;
+ using global::System.Linq;
+ using global::System.Threading.Tasks;
+ using global::Microsoft.AspNetCore.Components;
+ #line default
+ #line hidden
+ [__PrivateComponentRenderModeAttribute]
+ #nullable restore
+ public partial class TestComponent<
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+T
+
+#line default
+#line hidden
+#nullable disable
+ > : global::Microsoft.AspNetCore.Components.ComponentBase
+ #nullable disable
+ {
+ #pragma warning disable 219
+ private void __RazorDirectiveTokenHelpers__() {
+ ((global::System.Action)(() => {
+ }
+ ))();
+ ((global::System.Action)(() => {
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+global::System.Object __typeHelper = nameof(Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer);
+
+#line default
+#line hidden
+#nullable disable
+ }
+ ))();
+ }
+ #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
+ }
+ file sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
+ {
+ #pragma warning disable 219
+ private void __RazorDirectiveTokenHelpers__() {
+ }
+ #pragma warning restore 219
+ #pragma warning disable 0414
+ private static object __o = null;
+ #pragma warning restore 0414
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+ Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+ ;
+ public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.ir.txt
new file mode 100644
index 00000000000..8b57f941b00
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.ir.txt
@@ -0,0 +1,35 @@
+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 - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components
+ CSharpCode -
+ IntermediateToken - - CSharp - [__PrivateComponentRenderModeAttribute]
+ ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - - T
+ DesignTimeDirective -
+ DirectiveToken - (11:0,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) - T
+ DirectiveToken - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ 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
+ ClassDeclaration - - file sealed - __PrivateComponentRenderModeAttribute - global::Microsoft.AspNetCore.Components.RenderModeAttribute -
+ DesignTimeDirective -
+ CSharpCode -
+ IntermediateToken - - CSharp - #pragma warning disable 0414
+ CSharpCode -
+ IntermediateToken - - CSharp - private static object __o = null;
+ CSharpCode -
+ IntermediateToken - - CSharp - #pragma warning restore 0414
+ CSharpCode -
+ IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+ CSharpCode - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - - CSharp - ;
+ CSharpCode -
+ IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.mappings.txt
new file mode 100644
index 00000000000..f4610091808
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.mappings.txt
@@ -0,0 +1,15 @@
+Source Location: (11:0,11 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|T|
+Generated Location: (507:17,0 [1] )
+|T|
+
+Source Location: (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (971:33,44 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
+Source Location: (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (2086:63,12 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.codegen.cs
new file mode 100644
index 00000000000..f5e7f7bc9ee
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.codegen.cs
@@ -0,0 +1,73 @@
+//
+#pragma warning disable 1591
+namespace Test
+{
+ #line default
+ using global::System;
+ using global::System.Collections.Generic;
+ using global::System.Linq;
+ using global::System.Threading.Tasks;
+ using global::Microsoft.AspNetCore.Components;
+ #line default
+ #line hidden
+ [__PrivateComponentRenderModeAttribute]
+ #nullable restore
+ public partial class TestComponent<
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+T
+
+#line default
+#line hidden
+#nullable disable
+ > : global::Microsoft.AspNetCore.Components.ComponentBase
+ #nullable disable
+ {
+ #pragma warning disable 219
+ private void __RazorDirectiveTokenHelpers__() {
+ ((global::System.Action)(() => {
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+global::System.Object __typeHelper = nameof(Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer);
+
+#line default
+#line hidden
+#nullable disable
+ }
+ ))();
+ ((global::System.Action)(() => {
+ }
+ ))();
+ }
+ #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
+ }
+ file sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
+ {
+ #pragma warning disable 219
+ private void __RazorDirectiveTokenHelpers__() {
+ }
+ #pragma warning restore 219
+ #pragma warning disable 0414
+ private static object __o = null;
+ #pragma warning restore 0414
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+ Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+ ;
+ public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.ir.txt
new file mode 100644
index 00000000000..5fee6bcbd11
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.ir.txt
@@ -0,0 +1,35 @@
+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 - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components
+ CSharpCode -
+ IntermediateToken - - CSharp - [__PrivateComponentRenderModeAttribute]
+ ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - - T
+ DesignTimeDirective -
+ DirectiveToken - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ DirectiveToken - (89:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) - T
+ 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
+ ClassDeclaration - - file sealed - __PrivateComponentRenderModeAttribute - global::Microsoft.AspNetCore.Components.RenderModeAttribute -
+ DesignTimeDirective -
+ CSharpCode -
+ IntermediateToken - - CSharp - #pragma warning disable 0414
+ CSharpCode -
+ IntermediateToken - - CSharp - private static object __o = null;
+ CSharpCode -
+ IntermediateToken - - CSharp - #pragma warning restore 0414
+ CSharpCode -
+ IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+ CSharpCode - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - - CSharp - ;
+ CSharpCode -
+ IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.mappings.txt
new file mode 100644
index 00000000000..354d7462dfd
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.mappings.txt
@@ -0,0 +1,15 @@
+Source Location: (89:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|T|
+Generated Location: (507:17,0 [1] )
+|T|
+
+Source Location: (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (903:30,44 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
+Source Location: (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (2086:63,12 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.codegen.cs
new file mode 100644
index 00000000000..fca2fa9975c
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.codegen.cs
@@ -0,0 +1,73 @@
+//
+#pragma warning disable 1591
+namespace Test
+{
+ #line default
+ using global::System;
+ using global::System.Collections.Generic;
+ using global::System.Linq;
+ using global::System.Threading.Tasks;
+ using global::Microsoft.AspNetCore.Components;
+ #line default
+ #line hidden
+ [global::Test.TestComponent.__PrivateComponentRenderModeAttribute]
+ #nullable restore
+ public partial class TestComponent<
+#nullable restore
+#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
+T
+
+#line default
+#line hidden
+#nullable disable
+ > : global::Microsoft.AspNetCore.Components.ComponentBase
+ #nullable disable
+ {
+ #pragma warning disable 219
+ private void __RazorDirectiveTokenHelpers__() {
+ ((global::System.Action)(() => {
+ }
+ ))();
+ ((global::System.Action)(() => {
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+global::System.Object __typeHelper = nameof(Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer);
+
+#line default
+#line hidden
+#nullable disable
+ }
+ ))();
+ }
+ #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
+ private sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
+ {
+ #pragma warning disable 219
+ private void __RazorDirectiveTokenHelpers__() {
+ }
+ #pragma warning restore 219
+ #pragma warning disable 0414
+ private static object __o = null;
+ #pragma warning restore 0414
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
+ Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+ ;
+ public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
+ }
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.ir.txt
new file mode 100644
index 00000000000..a9e3d2358df
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.ir.txt
@@ -0,0 +1,35 @@
+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 - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components
+ CSharpCode -
+ IntermediateToken - - CSharp - [global::Test.TestComponent.__PrivateComponentRenderModeAttribute]
+ ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - - T
+ DesignTimeDirective -
+ DirectiveToken - (11:0,11 [1] x:\dir\subdir\Test\TestComponent.cshtml) - T
+ DirectiveToken - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ 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
+ ClassDeclaration - - private sealed - __PrivateComponentRenderModeAttribute - global::Microsoft.AspNetCore.Components.RenderModeAttribute -
+ DesignTimeDirective -
+ CSharpCode -
+ IntermediateToken - - CSharp - #pragma warning disable 0414
+ CSharpCode -
+ IntermediateToken - - CSharp - private static object __o = null;
+ CSharpCode -
+ IntermediateToken - - CSharp - #pragma warning restore 0414
+ CSharpCode -
+ IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+ CSharpCode - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - - CSharp - ;
+ CSharpCode -
+ IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.mappings.txt
new file mode 100644
index 00000000000..f77b4850911
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.mappings.txt
@@ -0,0 +1,10 @@
+Source Location: (11:0,11 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|T|
+Generated Location: (534:17,0 [1] )
+|T|
+
+Source Location: (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (998:33,44 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitBooleanConversion/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitBooleanConversion/TestComponent.mappings.txt
index fc326d08245..495740dafda 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitBooleanConversion/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitBooleanConversion/TestComponent.mappings.txt
@@ -17,6 +17,11 @@ Generated Location: (1189:40,0 [42] )
private MyClass c = new();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1683:56,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|MyParameter|
Generated Location: (1864:60,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_Bind/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_Bind/TestComponent.mappings.txt
index b2cf70f9ed8..97f5596e678 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_Bind/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_Bind/TestComponent.mappings.txt
@@ -27,6 +27,11 @@ Generated Location: (1731:56,0 [42] )
private MyClass c = new();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2452:72,45 [11] )
+|MyComponent|
+
Source Location: (40:1,4 [13] x:\dir\subdir\Test\TestComponent.cshtml)
|BoolParameter|
Generated Location: (2632:76,0 [13] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown/TestComponent.mappings.txt
index 692b15c6aea..932f85a8306 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (26:0,26 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (26:0,26 [1] x:\dir\subdir\Test\TestComponent.cshtml)
|c|
Generated Location: (861:23,0 [1] )
|c|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown_Assignment/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown_Assignment/TestComponent.mappings.txt
index 8506231b90d..e6f578615b4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown_Assignment/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_BindUnknown_Assignment/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|c1 = c2|
Generated Location: (861:23,0 [7] )
|c1 = c2|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_CustomEvent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_CustomEvent/TestComponent.mappings.txt
index 8c97113d5e1..959d3f6e0e5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_CustomEvent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_CustomEvent/TestComponent.mappings.txt
@@ -32,6 +32,11 @@ Generated Location: (1757:64,0 [42] )
private MyClass c = new();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2453:80,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|MyParameter|
Generated Location: (2634:84,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_TypeInference/TestComponent.mappings.txt
index f3d9ba6e18b..398e3e9f530 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddAttribute_ImplicitStringConversion_TypeInference/TestComponent.mappings.txt
@@ -27,6 +27,11 @@ Generated Location: (1518:56,0 [51] )
private readonly MyClass c = new();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2149:72,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|MyParameter|
Generated Location: (2330:76,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_DynamicComponentName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_DynamicComponentName/TestComponent.mappings.txt
index c376d5fa3d5..72645f13861 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_DynamicComponentName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_DynamicComponentName/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (9:0,9 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+|dynamic|
+Generated Location: (703:19,49 [7] )
+|dynamic|
+
+Source Location: (9:0,9 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (876:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_EscapedComponentName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_EscapedComponentName/TestComponent.mappings.txt
index fc636663a76..1f2ebf00d52 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_EscapedComponentName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_EscapedComponentName/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (5:0,5 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|int|
+Generated Location: (704:19,50 [3] )
+|int|
+
+Source Location: (5:0,5 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (869:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_GlobalNamespace/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_GlobalNamespace/TestComponent.mappings.txt
index 64f9a0c51f9..7a75632b2a4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_GlobalNamespace/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_GlobalNamespace/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (698:19,44 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (874:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_WithNameof/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_WithNameof/TestComponent.mappings.txt
index 0e6b43d7c3a..0f37ae13914 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_WithNameof/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AddComponentParameter_WithNameof/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt
index f02bfe1b54a..f0e794b8df0 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt
index ac9f7fad38c..3eb0413482f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt
@@ -12,6 +12,11 @@ Generated Location: (1300:32,0 [65] )
public DateTime ParentValue { get; set; } = DateTime.Now;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1916:48,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|SomeParam|
Generated Location: (2106:52,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.mappings.txt
index 98be953f456..e3dc04306be 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.mappings.txt
@@ -12,6 +12,11 @@ Generated Location: (1300:32,0 [89] )
public IEnumerable ParentValue { get; set; } = new [] { DateTime.Now };
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2084:48,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|SomeParam|
Generated Location: (2274:52,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt
index 1fe81884eca..d303cbaa272 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt
index eb4a7854781..d20920e6f2f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt
index ea29ab07b34..11dd0e8d183 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt
index 01992557ddf..e89ecb1e93a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|ParentValue|
Generated Location: (861:23,0 [11] )
|ParentValue|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt
index e8d4440ec8e..287dd922777 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt
index e2a1b1b1b27..8160196ff97 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt
@@ -12,6 +12,11 @@ Generated Location: (1104:32,0 [65] )
public DateTime ParentValue { get; set; } = DateTime.Now;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1688:48,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|SomeParam|
Generated Location: (1878:52,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt
index 3a94fce9997..7113285199d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_DynamicComponentName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_DynamicComponentName/TestComponent.mappings.txt
index 0d5fcc2cce4..5dacd46daab 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_DynamicComponentName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_DynamicComponentName/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (15:0,15 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+|dynamic|
+Generated Location: (703:19,49 [7] )
+|dynamic|
+
+Source Location: (15:0,15 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (876:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_EscapedComponentName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_EscapedComponentName/TestComponent.mappings.txt
index ff86df204f7..e2b7b07ef59 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_EscapedComponentName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_EscapedComponentName/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (11:0,11 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|int|
+Generated Location: (704:19,50 [3] )
+|int|
+
+Source Location: (11:0,11 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (870:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_GlobalNamespaceComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_GlobalNamespaceComponent/TestComponent.mappings.txt
index b2dabfd1ac9..3e5eccb4f8e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_GlobalNamespaceComponent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_GlobalNamespaceComponent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (698:19,44 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (874:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_WithNameof/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_WithNameof/TestComponent.mappings.txt
index 7daa1a95a55..389163b2723 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_WithNameof/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties_WithNameof/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt
index 3ad1ed4ccd8..bd59285ba0d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|ParentValue|
Generated Location: (861:23,0 [11] )
|ParentValue|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt
index 6391db2862a..32a66edf688 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_Action/TestComponent.mappings.txt
index 1ae651b179d..fc49f964044 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_Action/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_ActionLambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_ActionLambda/TestComponent.mappings.txt
index 73db4055c37..8ce067dff57 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_ActionLambda/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_ActionLambda/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_AsyncLambdaProducesError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_AsyncLambdaProducesError/TestComponent.mappings.txt
index bc78a40eef2..a14f82d40df 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_AsyncLambdaProducesError/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_AsyncLambdaProducesError/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback/TestComponent.mappings.txt
index b7073694cb7..e808284674e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesAction/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesAction/TestComponent.mappings.txt
index 441550dee99..df0ca974a3f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesAction/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesAction/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesFunction/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesFunction/TestComponent.mappings.txt
index 6d6b59173c9..0db4700c2ee 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesFunction/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_EventCallback_ReceivesFunction/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningDelegate/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningDelegate/TestComponent.mappings.txt
index 6ad7c6c4259..c8226d5bf34 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningDelegate/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningDelegate/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningLambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningLambda/TestComponent.mappings.txt
index 59ca2eadbbe..d466948acae 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningLambda/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithAfter_TaskReturningLambda/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_Action/TestComponent.mappings.txt
index 17dbb1926fe..8afaba576ed 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_Action/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ActionLambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ActionLambda/TestComponent.mappings.txt
index 4869616d0f8..54496f50286 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ActionLambda/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ActionLambda/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback/TestComponent.mappings.txt
index b87605cb8ff..596737257b8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesAction/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesAction/TestComponent.mappings.txt
index 2be57a01987..caae9716bbc 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesAction/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesAction/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesFunction/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesFunction/TestComponent.mappings.txt
index 5ceb247b2a0..99fd10fb269 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesFunction/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_EventCallback_ReceivesFunction/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ProducesErrorOnOlderLanguageVersions/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ProducesErrorOnOlderLanguageVersions/TestComponent.mappings.txt
index 6744de090ab..700d2aec9b4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ProducesErrorOnOlderLanguageVersions/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_ProducesErrorOnOlderLanguageVersions/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (875:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningDelegate/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningDelegate/TestComponent.mappings.txt
index f993cc40585..256fe716b15 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningDelegate/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningDelegate/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningLambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningLambda/TestComponent.mappings.txt
index 6ba6adcfabf..2aed5837cf6 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningLambda/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithGetSet_TaskReturningLambda/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (884:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt
index 24815817773..21143b12259 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (17:0,17 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+|InputText|
+Generated Location: (703:19,49 [9] )
+|InputText|
+
+Source Location: (17:0,17 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (880:23,0 [5] )
|Value|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt
index 1eff1864ea2..4df718c4213 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (21:0,21 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (21:0,21 [3] x:\dir\subdir\Test\TestComponent.cshtml)
|int|
Generated Location: (799:22,0 [3] )
|int|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt
index 9f1a445d76d..f06ce399db8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CustomValue|
Generated Location: (799:22,0 [11] )
|CustomValue|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt
index 517e8be91eb..cf74939fc68 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CustomValue|
Generated Location: (799:22,0 [11] )
|CustomValue|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt
index 9a1f381e4f7..b55ffba03fb 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|CustomValue|
Generated Location: (799:22,0 [11] )
|CustomValue|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt
index 8958c2be569..792956101ff 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt
@@ -21,6 +21,11 @@ Generated Location: (1343:40,0 [82] )
public void Update() { }
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1872:58,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2072:62,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt
index b68e8e7fd34..0efab8f2111 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt
@@ -21,6 +21,11 @@ Generated Location: (1405:40,0 [147] )
public void UpdateValue(CustomValue value) => ParentValue = value;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2031:58,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2231:62,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt
index df7365e58d2..7a6a87f8c58 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt
@@ -19,6 +19,11 @@ Generated Location: (1405:40,0 [138] )
public EventCallback UpdateValue { get; set; }
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2022:57,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2222:61,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt
index 598bda4ebc5..bc96434895e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt
@@ -21,6 +21,11 @@ Generated Location: (1405:40,0 [175] )
public Task UpdateValue(CustomValue value) { ParentValue = value; return Task.CompletedTask; }
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2059:58,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2259:62,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.mappings.txt
index 85e1a1854d8..b2509e48e58 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.mappings.txt
@@ -13,6 +13,11 @@ Source Location: (87:0,87 [2] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1266:41,0 [2] )
|; |
+Source Location: (93:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1371:47,49 [11] )
+|MyComponent|
+
Source Location: (105:1,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Header|
Generated Location: (1552:51,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.mappings.txt
index 85e1a1854d8..b2509e48e58 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.mappings.txt
@@ -13,6 +13,11 @@ Source Location: (87:0,87 [2] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1266:41,0 [2] )
|; |
+Source Location: (93:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1371:47,49 [11] )
+|MyComponent|
+
Source Location: (105:1,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Header|
Generated Location: (1552:51,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CaptureParametersConstraint/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CaptureParametersConstraint/TestComponent.mappings.txt
index 796a76d02e2..784edc0feee 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CaptureParametersConstraint/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CaptureParametersConstraint/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (857:23,0 [27] )
|new MyClass()|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1653:44,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Param|
Generated Location: (1843:48,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.mappings.txt
index 2f6201059bb..8601e716318 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.mappings.txt
@@ -8,13 +8,28 @@ Source Location: (59:1,24 [7] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1345:34,0 [7] )
|"Hello"|
+Source Location: (1:0,1 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+|ParentOne|
+Generated Location: (2512:61,45 [9] )
+|ParentOne|
+
Source Location: (11:0,11 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2704:65,0 [5] )
|Value|
+Source Location: (40:1,5 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+|ParentTwo|
+Generated Location: (3362:81,45 [9] )
+|ParentTwo|
+
Source Location: (50:1,15 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (3554:85,0 [5] )
|Value|
+Source Location: (80:2,9 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+|Child|
+Generated Location: (4158:101,45 [5] )
+|Child|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Explicit/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Explicit/TestComponent.mappings.txt
index d19c84ee2e3..750743d1dd5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Explicit/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Explicit/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (703:19,49 [4] )
+|Grid|
+
+Source Location: (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|DateTime|
Generated Location: (792:22,0 [8] )
|DateTime|
@@ -13,3 +18,13 @@ Source Location: (32:0,32 [23] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1334:39,0 [23] )
|Array.Empty()|
+Source Location: (59:0,59 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2249:62,45 [6] )
+|Column|
+
+Source Location: (69:0,69 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2536:67,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ExplicitOverride/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ExplicitOverride/TestComponent.mappings.txt
index b24a640801a..d4ed6a038c8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ExplicitOverride/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ExplicitOverride/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (703:19,49 [4] )
+|Grid|
+
+Source Location: (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|DateTime|
Generated Location: (792:22,0 [8] )
|DateTime|
@@ -13,6 +18,11 @@ Source Location: (32:0,32 [23] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1334:39,0 [23] )
|Array.Empty()|
+Source Location: (59:0,59 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (1610:46,54 [6] )
+|Column|
+
Source Location: (73:0,73 [19] x:\dir\subdir\Test\TestComponent.cshtml)
|System.TimeZoneInfo|
Generated Location: (1701:49,0 [19] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested/TestComponent.mappings.txt
index fb2c73260a9..27d0635870d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (850:23,0 [24] )
|() => new List()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1881:46,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (2056:50,0 [4] )
|Data|
+Source Location: (48:1,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|GridColumn|
+Generated Location: (2802:66,45 [10] )
+|GridColumn|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary/TestComponent.mappings.txt
index 610bc45b6fd..46df2b97d08 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (850:23,0 [33] )
|() => new Dictionary()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1907:46,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (2082:50,0 [4] )
|Data|
+Source Location: (57:1,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|GridColumn|
+Generated Location: (2879:66,45 [10] )
+|GridColumn|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_02/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_02/TestComponent.mappings.txt
index 3059d1b3ceb..18b913f512e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_02/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_02/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (850:23,0 [33] )
|() => new Dictionary()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1912:46,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (2087:50,0 [4] )
|Data|
+Source Location: (57:1,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|GridColumn|
+Generated Location: (2899:66,45 [10] )
+|GridColumn|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_03/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_03/TestComponent.mappings.txt
index d7d695c3c25..cef8fc47b48 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_03/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_03/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (850:23,0 [27] )
|new Dictionary()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1880:46,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (2055:50,0 [4] )
|Data|
+Source Location: (51:1,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|GridColumn|
+Generated Location: (2789:66,45 [10] )
+|GridColumn|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_Dynamic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_Dynamic/TestComponent.mappings.txt
index 843b5a3441d..ec549ee1b8e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_Dynamic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericArgumentNested_Dictionary_Dynamic/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (850:23,0 [33] )
|new Dictionary()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1884:46,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (2059:50,0 [4] )
|Data|
+Source Location: (57:1,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|GridColumn|
+Generated Location: (2787:66,45 [10] )
+|GridColumn|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.mappings.txt
index a5c61c26647..f9be09194e5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.mappings.txt
@@ -8,8 +8,18 @@ Source Location: (50:0,50 [12] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1403:33,25 [12] )
|context.Year|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (2160:56,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2343:60,0 [5] )
|Items|
+Source Location: (42:0,42 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (3146:76,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.mappings.txt
index 5c8e99104a8..732b05d7ef8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.mappings.txt
@@ -8,11 +8,21 @@ Source Location: (63:0,63 [11] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1345:33,0 [11] )
|x => x.Year|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (2050:54,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2233:58,0 [5] )
|Items|
+Source Location: (42:0,42 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (3019:74,45 [6] )
+|Column|
+
Source Location: (49:0,49 [10] x:\dir\subdir\Test\TestComponent.cshtml)
|SomeLambda|
Generated Location: (3225:78,0 [10] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.mappings.txt
index 55aade47d69..d8aa127d667 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (703:19,49 [4] )
+|Grid|
+
+Source Location: (13:0,13 [15] x:\dir\subdir\Test\TestComponent.cshtml)
|WeatherForecast|
Generated Location: (792:22,0 [15] )
|WeatherForecast|
@@ -8,6 +13,11 @@ Source Location: (39:0,39 [30] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1019:31,0 [30] )
|Array.Empty()|
+Source Location: (106:2,9 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2082:54,45 [6] )
+|Column|
+
Source Location: (126:2,29 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|FieldName|
Generated Location: (2337:59,0 [9] )
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 7c0ad4cc7f7..f029be6bc40 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [13] )
|using Models;|
+Source Location: (19:2,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (820:24,49 [4] )
+|Grid|
+
Source Location: (31:2,13 [15] x:\dir\subdir\Test\TestComponent.cshtml)
|WeatherForecast|
Generated Location: (909:27,0 [15] )
@@ -13,6 +18,11 @@ Source Location: (57:2,39 [30] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1136:36,0 [30] )
|Array.Empty()|
+Source Location: (124:4,9 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2224:59,45 [6] )
+|Column|
+
Source Location: (144:4,29 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|FieldName|
Generated Location: (2479:64,0 [9] )
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 f64f98645ff..3644c99c8e8 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [13] )
|using Models;|
+Source Location: (17:1,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (820:24,49 [4] )
+|Grid|
+
Source Location: (29:1,13 [15] x:\dir\subdir\Test\TestComponent.cshtml)
|WeatherForecast|
Generated Location: (909:27,0 [15] )
@@ -13,6 +18,11 @@ Source Location: (55:1,39 [30] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1136:36,0 [30] )
|Array.Empty()|
+Source Location: (122:3,9 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2240:59,45 [6] )
+|Column|
+
Source Location: (142:3,29 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|FieldName|
Generated Location: (2495:64,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.mappings.txt
index cdbe8392a5c..38ce05e0966 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (703:19,49 [4] )
+|Grid|
+
+Source Location: (13:0,13 [15] x:\dir\subdir\Test\TestComponent.cshtml)
|WeatherForecast|
Generated Location: (792:22,0 [15] )
|WeatherForecast|
@@ -8,6 +13,11 @@ Source Location: (39:0,39 [30] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1019:31,0 [30] )
|Array.Empty()|
+Source Location: (106:2,9 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2075:54,45 [6] )
+|Column|
+
Source Location: (126:2,29 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|FieldName|
Generated Location: (2330:59,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.mappings.txt
index 7b46f15e11a..783c6f51901 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.mappings.txt
@@ -3,8 +3,23 @@
Generated Location: (854:23,0 [23] )
|Array.Empty()|
+Source Location: (46:0,46 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|Passthrough|
+Generated Location: (1195:30,58 [11] )
+|Passthrough|
+
+Source Location: (1:0,1 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|Ancestor|
+Generated Location: (2206:51,45 [8] )
+|Ancestor|
+
Source Location: (10:0,10 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2398:55,0 [5] )
|Items|
+Source Location: (59:0,59 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+|Child|
+Generated Location: (3122:71,45 [5] )
+|Child|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.mappings.txt
index cc45c286efa..9127561ce93 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.mappings.txt
@@ -13,6 +13,11 @@ Source Location: (133:1,29 [23] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1680:41,0 [23] )
|new[] { 'a', 'b', 'c' }|
+Source Location: (1:0,1 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Parent|
+Generated Location: (2503:63,45 [6] )
+|Parent|
+
Source Location: (8:0,8 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (2720:67,0 [4] )
@@ -23,6 +28,11 @@ Source Location: (75:0,75 [5] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (2978:76,0 [5] )
|Other|
+Source Location: (109:1,5 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+|Child|
+Generated Location: (4012:93,45 [5] )
+|Child|
+
Source Location: (115:1,11 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|ChildOnlyItems|
Generated Location: (4252:97,0 [14] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.mappings.txt
index 6e56cf0909c..351f390ddc5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (830:22,0 [23] )
|Array.Empty()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1480:41,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (1663:45,0 [5] )
|Items|
+Source Location: (42:0,42 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2057:56,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Explicit/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Explicit/TestComponent.mappings.txt
index d19c84ee2e3..42bedd05315 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Explicit/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Explicit/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (703:19,49 [4] )
+|Grid|
+
+Source Location: (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|DateTime|
Generated Location: (792:22,0 [8] )
|DateTime|
@@ -13,3 +18,8 @@ Source Location: (32:0,32 [23] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1334:39,0 [23] )
|Array.Empty()|
+Source Location: (59:0,59 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (1990:60,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.mappings.txt
index 07e6f873093..bbfde11c413 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.mappings.txt
@@ -3,8 +3,23 @@
Generated Location: (850:23,0 [23] )
|Array.Empty()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (2009:47,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2192:51,0 [5] )
|Items|
+Source Location: (42:0,42 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2913:67,45 [6] )
+|Column|
+
+Source Location: (52:0,52 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (3248:72,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.mappings.txt
index a64b450019f..6d362ba1ec1 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.mappings.txt
@@ -8,11 +8,21 @@ Source Location: (66:0,66 [13] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1316:33,0 [13] )
|"Some string"|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (2023:54,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2206:58,0 [5] )
|Items|
+Source Location: (42:0,42 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2882:74,45 [6] )
+|Column|
+
Source Location: (49:0,49 [13] x:\dir\subdir\Test\TestComponent.cshtml)
|OverrideParam|
Generated Location: (3070:78,0 [13] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.mappings.txt
index 8d731b4cf42..f410d247b61 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.mappings.txt
@@ -8,13 +8,38 @@ Source Location: (54:1,21 [37] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1342:34,0 [37] )
|System.Threading.Thread.CurrentThread|
+Source Location: (1:0,1 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|TreeNode|
+Generated Location: (4002:78,45 [8] )
+|TreeNode|
+
Source Location: (10:0,10 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (4194:82,0 [4] )
|Item|
+Source Location: (38:1,5 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|TreeNode|
+Generated Location: (4854:98,45 [8] )
+|TreeNode|
+
Source Location: (47:1,14 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (5046:102,0 [4] )
|Item|
+Source Location: (104:2,9 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|TreeNode|
+Generated Location: (5703:118,45 [8] )
+|TreeNode|
+
+Source Location: (128:3,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|TreeNode|
+Generated Location: (6268:129,45 [8] )
+|TreeNode|
+
+Source Location: (184:6,5 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|TreeNode|
+Generated Location: (6759:139,45 [8] )
+|TreeNode|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.mappings.txt
index d77abcf4c27..83da3aa09a3 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.mappings.txt
@@ -8,8 +8,18 @@ Source Location: (59:2,28 [21] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1019:30,0 [21] )
|new MyClass()|
+Source Location: (32:2,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|ParentComponent|
+Generated Location: (2082:53,57 [15] )
+|ParentComponent|
+
Source Location: (48:2,17 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (2292:57,0 [9] )
|Parameter|
+Source Location: (89:3,5 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+|ChildComponent|
+Generated Location: (2953:73,57 [14] )
+|ChildComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.mappings.txt
index aa194e64609..dc35de0ad88 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.mappings.txt
@@ -3,6 +3,16 @@
Generated Location: (850:23,0 [23] )
|Array.Empty()|
+Source Location: (42:0,42 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (1187:30,58 [6] )
+|Column|
+
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1868:47,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2051:51,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.mappings.txt
index 08399705f57..cead203068d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (861:23,0 [6] )
|(1, 2)|
+Source Location: (1:0,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|ParentComponent|
+Generated Location: (1843:46,45 [15] )
+|ParentComponent|
+
Source Location: (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (2041:50,0 [9] )
|Parameter|
+Source Location: (43:1,5 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+|ChildComponent|
+Generated Location: (2636:66,45 [14] )
+|ChildComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.mappings.txt
index 70722389f90..40d734f0bf8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.mappings.txt
@@ -23,8 +23,18 @@ Source Location: (78:1,13 [9] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1940:60,0 [9] )
|parentKey|
+Source Location: (66:1,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (2629:80,45 [4] )
+|Grid|
+
Source Location: (89:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (2813:84,0 [5] )
|Items|
+Source Location: (131:2,5 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (3680:101,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.mappings.txt
index 1d8f7b98b58..b92c0985486 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.mappings.txt
@@ -3,8 +3,18 @@
Generated Location: (850:23,0 [29] )
|new Dictionary()|
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|Grid|
+Generated Location: (1776:45,45 [4] )
+|Grid|
+
Source Location: (6:0,6 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Items|
Generated Location: (1983:49,0 [5] )
|Items|
+Source Location: (48:0,48 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Column|
+Generated Location: (2667:65,45 [6] )
+|Column|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_AtSpecifiedInRazorFileForTypeParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_AtSpecifiedInRazorFileForTypeParameter/TestComponent.mappings.txt
index 243d3b8dae8..494a820ee83 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_AtSpecifiedInRazorFileForTypeParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_AtSpecifiedInRazorFileForTypeParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (7:0,7 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|C|
+Generated Location: (703:19,49 [1] )
+|C|
+
+Source Location: (7:0,7 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (788:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic/TestComponent.mappings.txt
index 07c1fdbe6bf..f4dce11c0c0 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (799:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt
index 5c858a09195..55984cf11d4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (799:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt
index acc1e254ed8..7c6d86d92d9 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (799:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt
index 271c7e1e1e2..fa9ffd7452d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt
@@ -17,6 +17,11 @@ Generated Location: (1339:40,0 [21] )
string Value;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1839:56,45 [11] )
+|MyComponent|
+
Source Location: (30:0,30 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2037:60,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt
index 984477a5083..c041551ffe0 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt
@@ -17,11 +17,21 @@ Generated Location: (1409:42,0 [21] )
string Value;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1874:58,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2072:62,0 [4] )
|Item|
+Source Location: (34:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2582:73,45 [11] )
+|MyComponent|
+
Source Location: (52:1,19 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2780:77,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.mappings.txt
index dfbc7b81986..57e1c0a2d8a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (799:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.mappings.txt
index 5bccfa66ffc..4ef70b43ef7 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.mappings.txt
@@ -8,6 +8,11 @@ Source Location: (38:1,8 [17] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1102:31,25 [17] )
|context.ToLower()|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1740:51,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1938:55,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.mappings.txt
index 5ec19ffb6f7..5871b4ba9a5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (799:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.mappings.txt
index 83a7707fa63..880b5253f9e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.mappings.txt
@@ -8,6 +8,11 @@ Source Location: (37:0,37 [2] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (994:30,0 [2] )
|17|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1498:47,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1696:51,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.mappings.txt
index c79b887e47f..eaf4f8e1b10 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (837:22,0 [4] )
|"hi"|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1301:39,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1499:43,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.mappings.txt
index ab7009a89c0..d85358c8472 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.mappings.txt
@@ -13,16 +13,31 @@ Source Location: (93:2,21 [6] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1461:42,0 [6] )
|"bye!"|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1927:59,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2125:63,0 [4] )
|Item|
+Source Location: (32:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2475:73,45 [11] )
+|MyComponent|
+
Source Location: (44:1,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2673:77,0 [4] )
|Item|
+Source Location: (73:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (3023:87,45 [11] )
+|MyComponent|
+
Source Location: (85:2,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (3221:91,0 [4] )
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 625e2ec6820..8950ff0ac52 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
@@ -19,6 +19,11 @@ Generated Location: (1104:36,0 [69] )
{
|
+Source Location: (179:7,9 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1270:44,45 [11] )
+|MyComponent|
+
Source Location: (195:8,0 [7] x:\dir\subdir\Test\TestComponent.cshtml)
| }
|
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 1171bbd3388..f2cbe145c5d 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
@@ -14,6 +14,11 @@ Generated Location: (887:26,0 [42] )
{
|
+Source Location: (105:4,9 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1030:34,49 [11] )
+|MyComponent|
+
Source Location: (121:5,0 [7] x:\dir\subdir\Test\TestComponent.cshtml)
| }
|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.mappings.txt
index fbfb0c0b8ca..fa3af8d78e4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (20:0,20 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (20:0,20 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (799:22,0 [6] )
|string|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.mappings.txt
index 7b9d32ef19b..a1ae2475d76 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.mappings.txt
@@ -18,6 +18,11 @@ Source Location: (159:3,3 [29] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1575:50,25 [29] )
|System.Math.Max(0, item.Item)|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2443:70,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2659:74,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.mappings.txt
index 94c646bf5d7..e9b49dc360d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.mappings.txt
@@ -13,6 +13,11 @@ Source Location: (103:2,16 [7] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1315:40,25 [7] )
|context|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1996:59,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2194:63,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Simple/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Simple/TestComponent.mappings.txt
new file mode 100644
index 00000000000..b5b73dd3642
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Simple/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.mappings.txt
index 921c305e44c..c93f3f5e8db 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyAttr|
Generated Location: (884:23,0 [6] )
|MyAttr|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.mappings.txt
new file mode 100644
index 00000000000..b5b73dd3642
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.mappings.txt
new file mode 100644
index 00000000000..b5b73dd3642
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
index 94c96b14b11..c5e3c529054 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.mappings.txt
index f15706a320f..4ddbe517db6 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (28:0,28 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (28:0,28 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|context|
Generated Location: (997:23,25 [7] )
|context|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.mappings.txt
index e9caeb22f6a..9843184c756 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|StringProperty|
Generated Location: (884:23,0 [14] )
|StringProperty|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.mappings.txt
index 708adf16209..31ab17b56c8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyAttr|
Generated Location: (884:23,0 [6] )
|MyAttr|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.mappings.txt
index 72cb45e83be..97032dca2b6 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyAttr|
Generated Location: (884:23,0 [6] )
|MyAttr|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.mappings.txt
index 72cb45e83be..97032dca2b6 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyAttr|
Generated Location: (884:23,0 [6] )
|MyAttr|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
index 9e81c5f14dc..45e49a43271 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.mappings.txt
index 36f4b7660ab..547559b262a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml)
|43.ToString()|
Generated Location: (947:24,0 [13] )
|43.ToString()|
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 dfc8c3bb5e4..e824da9d01b 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
@@ -8,3 +8,8 @@ Source Location: (23:1,6 [20] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (749:26,0 [20] )
|"/AnotherRoute/{id}"|
+Source Location: (46:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1204:39,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.mappings.txt
index 10e3337479b..ff4c82ba82c 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (18:1,4 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (18:1,4 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|IntProperty|
Generated Location: (883:23,0 [11] )
|IntProperty|
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 4fa8548079e..abbb1739e5a 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+|DynamicElement|
+Generated Location: (855:25,49 [14] )
+|DynamicElement|
+
Source Location: (70:1,26 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (1153:29,0 [7] )
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 a757122c03c..beb1c79c79d 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
@@ -3,11 +3,31 @@
Generated Location: (372:12,0 [17] )
|using AnotherTest|
+Source Location: (23:2,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|HeaderComponent|
+Generated Location: (831:25,49 [15] )
+|HeaderComponent|
+
+Source Location: (88:5,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|FooterComponent|
+Generated Location: (1208:32,56 [15] )
+|FooterComponent|
+
Source Location: (119:6,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|context|
Generated Location: (1502:36,25 [7] )
|context|
+Source Location: (158:8,1 [20] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test.HeaderComponent|
+Generated Location: (1750:46,44 [20] )
+|Test.HeaderComponent|
+
+Source Location: (233:11,1 [27] x:\dir\subdir\Test\TestComponent.cshtml)
+|AnotherTest.FooterComponent|
+Generated Location: (2122:53,44 [27] )
+|AnotherTest.FooterComponent|
+
Source Location: (276:12,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|context|
Generated Location: (2433:57,26 [7] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.mappings.txt
index f1a67c9fd9f..814865744e1 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (15:0,15 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|CoolnessMeter|
+Generated Location: (703:19,49 [13] )
+|CoolnessMeter|
+
+Source Location: (15:0,15 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|Coolness|
Generated Location: (888:23,0 [8] )
|Coolness|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter/TestComponent.mappings.txt
index 2609d6c9677..636d5004cc7 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (812:22,24 [8] )
|TestBool|
+Source Location: (31:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1032:30,49 [13] )
+|TestComponent|
+
Source Location: (45:2,15 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|TestBool|
Generated Location: (1217:34,0 [8] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter_Minimized/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter_Minimized/TestComponent.mappings.txt
index d53ce74b8e7..0d60688cfcc 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter_Minimized/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithBooleanParameter_Minimized/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (812:22,24 [8] )
|TestBool|
+Source Location: (31:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1032:30,49 [13] )
+|TestComponent|
+
Source Location: (45:2,15 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|TestBool|
Generated Location: (1217:34,0 [8] )
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 fc1bc97692d..5424a61b5e3 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
@@ -38,6 +38,11 @@ Generated Location: (1848:66,0 [268] )
List items = new List() { tag1, tag2 };
|
+Source Location: (14:1,1 [13] x:\dir\subdir\Test\UseTestComponent.cshtml)
+|TestComponent|
+Generated Location: (2844:88,45 [13] )
+|TestComponent|
+
Source Location: (28:1,15 [5] x:\dir\subdir\Test\UseTestComponent.cshtml)
|Item1|
Generated Location: (3083:92,0 [5] )
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 fc1bc97692d..5424a61b5e3 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
@@ -38,6 +38,11 @@ Generated Location: (1848:66,0 [268] )
List items = new List() { tag1, tag2 };
|
+Source Location: (14:1,1 [13] x:\dir\subdir\Test\UseTestComponent.cshtml)
+|TestComponent|
+Generated Location: (2844:88,45 [13] )
+|TestComponent|
+
Source Location: (28:1,15 [5] x:\dir\subdir\Test\UseTestComponent.cshtml)
|Item1|
Generated Location: (3083:92,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDecimalParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDecimalParameter/TestComponent.mappings.txt
index f50c7d66b95..35b3c50b2d3 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDecimalParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDecimalParameter/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (812:22,24 [11] )
|TestDecimal|
+Source Location: (34:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1035:30,49 [13] )
+|TestComponent|
+
Source Location: (48:2,15 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|TestDecimal|
Generated Location: (1220:34,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDynamicParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDynamicParameter/TestComponent.mappings.txt
index 2070d090666..73ce907c6b0 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDynamicParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithDynamicParameter/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (812:22,24 [11] )
|TestDynamic|
+Source Location: (34:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1035:30,49 [13] )
+|TestComponent|
+
Source Location: (48:2,15 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|TestDynamic|
Generated Location: (1220:34,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTupleParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTupleParameter/TestComponent.mappings.txt
index e1507a1b339..25ba502e633 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTupleParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTupleParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (105:4,15 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (91:4,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (105:4,15 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Gutter|
Generated Location: (888:23,0 [6] )
|Gutter|
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 0d3fb39c7be..ef94c92a259 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
@@ -38,6 +38,11 @@ Generated Location: (1866:66,0 [208] )
Tag[] items3() => new [] { tag };
|
+Source Location: (14:1,1 [13] x:\dir\subdir\Test\UseTestComponent.cshtml)
+|TestComponent|
+Generated Location: (2678:85,45 [13] )
+|TestComponent|
+
Source Location: (28:1,15 [6] x:\dir\subdir\Test\UseTestComponent.cshtml)
|Items1|
Generated Location: (2883:89,0 [6] )
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 9cba9469875..fd60212d497 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
@@ -31,6 +31,11 @@ Generated Location: (1688:58,0 [176] )
List<(string, int)> items2 = new List<(string, int)>() { item2 };
|
+Source Location: (14:1,1 [13] x:\dir\subdir\Test\UseTestComponent.cshtml)
+|TestComponent|
+Generated Location: (2455:76,45 [13] )
+|TestComponent|
+
Source Location: (28:1,15 [5] x:\dir\subdir\Test\UseTestComponent.cshtml)
|Item1|
Generated Location: (2678:80,0 [5] )
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 046a170062f..bc826356e1b 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
@@ -40,6 +40,11 @@ Generated Location: (1828:65,0 [169] )
public RenderFragment<(MyClass I1, MyStruct I2, TParam P)> Template { get; set; }
|
+Source Location: (213:11,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (2528:85,45 [13] )
+|TestComponent|
+
Source Location: (227:11,15 [10] x:\dir\subdir\Test\TestComponent.cshtml)
|InferParam|
Generated Location: (2734:89,0 [10] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple_ExplicitGenericArguments/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple_ExplicitGenericArguments/TestComponent.mappings.txt
index 468cb65949a..ac7088fde4a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple_ExplicitGenericArguments/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameterValueTuple_ExplicitGenericArguments/TestComponent.mappings.txt
@@ -18,6 +18,11 @@ Source Location: (61:1,18 [21] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (981:39,0 [21] )
|where TValue : struct|
+Source Location: (87:3,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1310:49,49 [13] )
+|TestComponent|
+
Source Location: (122:3,36 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|decimal|
Generated Location: (1408:52,0 [7] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute/TestComponent.mappings.txt
index 511a568cbcc..7d411b28d13 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|StringProperty|
Generated Location: (884:23,0 [14] )
|StringProperty|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_02/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_02/TestComponent.mappings.txt
index 511a568cbcc..7d411b28d13 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_02/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_02/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|StringProperty|
Generated Location: (884:23,0 [14] )
|StringProperty|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_03/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_03/TestComponent.mappings.txt
index df7687f3876..967e77146ca 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_03/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_ComplexContentInAttribute_03/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|StringProperty|
Generated Location: (884:23,0 [14] )
|StringProperty|
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
index bba3a009bea..8e616c9fe00 100644
--- 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
@@ -8,3 +8,8 @@ Source Location: (36:1,1 [17] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (515:18,0 [17] )
|using Foo = Test3|
+Source Location: (56:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (974:31,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MatchingIsCaseSensitive/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MatchingIsCaseSensitive/TestComponent.mappings.txt
index 5b4cb92abc6..24679dad327 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MatchingIsCaseSensitive/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MatchingIsCaseSensitive/TestComponent.mappings.txt
@@ -1,4 +1,14 @@
-Source Location: (47:2,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (35:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (894:22,49 [11] )
+|MyComponent|
+
+Source Location: (47:2,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|intproperty|
Generated Location: (1075:26,0 [11] )
|IntProperty|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MultipleComponentsDifferByCase/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MultipleComponentsDifferByCase/TestComponent.mappings.txt
index 7a1049b1e95..6474bec48a2 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MultipleComponentsDifferByCase/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_MultipleComponentsDifferByCase/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|IntProperty|
Generated Location: (884:23,0 [11] )
|IntProperty|
@@ -8,6 +13,11 @@ Source Location: (26:0,26 [1] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1150:31,0 [1] )
|1|
+Source Location: (34:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|Mycomponent|
+Generated Location: (1362:39,49 [11] )
+|Mycomponent|
+
Source Location: (46:1,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|IntProperty|
Generated Location: (1543:43,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.mappings.txt
new file mode 100644
index 00000000000..0c98a8ce048
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_InImports/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+|Counter|
+Generated Location: (1089:38,53 [7] )
+|Counter|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.mappings.txt
index d297d378f91..15c3efb55bf 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_NamespaceDirective_OverrideImports/Counter.mappings.txt
@@ -3,3 +3,8 @@
Generated Location: (145:5,0 [8] )
|New.Test|
+Source Location: (22:1,1 [8] x:\dir\subdir\Test\Pages/Counter.razor)
+|Counter2|
+Generated Location: (1088:38,53 [8] )
+|Counter2|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.mappings.txt
index 244c54efd3f..1e29d7d8dbd 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (14:1,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+|Counter|
+Generated Location: (703:19,49 [7] )
+|Counter|
+
+Source Location: (14:1,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
|if (true)
{
|
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 513c60ea68a..1753287e41b 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
@@ -13,6 +13,11 @@ Source Location: (192:3,61 [3] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1332:37,0 [3] )
|123|
+Source Location: (293:6,5 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+|TemplatedComponent|
+Generated Location: (1730:46,49 [18] )
+|TemplatedComponent|
+
Source Location: (318:6,30 [20] x:\dir\subdir\Test\TestComponent.cshtml)
|myComponentReference|
Generated Location: (2186:54,0 [20] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_NoValueSpecified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_NoValueSpecified/TestComponent.mappings.txt
new file mode 100644
index 00000000000..5c41a9922de
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_NoValueSpecified/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [39] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredChildContent|
+Generated Location: (703:19,49 [39] )
+|ComponentWithEditorRequiredChildContent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecified/TestComponent.mappings.txt
new file mode 100644
index 00000000000..5c41a9922de
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecified/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [39] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredChildContent|
+Generated Location: (703:19,49 [39] )
+|ComponentWithEditorRequiredChildContent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecifiedAsText_WithoutName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecifiedAsText_WithoutName/TestComponent.mappings.txt
new file mode 100644
index 00000000000..5c41a9922de
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecifiedAsText_WithoutName/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [39] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredChildContent|
+Generated Location: (703:19,49 [39] )
+|ComponentWithEditorRequiredChildContent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecified_WithoutName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecified_WithoutName/TestComponent.mappings.txt
new file mode 100644
index 00000000000..5c41a9922de
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredChildContent_ValueSpecified_WithoutName/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [39] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredChildContent|
+Generated Location: (703:19,49 [39] )
+|ComponentWithEditorRequiredChildContent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredNamedChildContent_NoValueSpecified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredNamedChildContent_NoValueSpecified/TestComponent.mappings.txt
new file mode 100644
index 00000000000..5c41a9922de
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredNamedChildContent_NoValueSpecified/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [39] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredChildContent|
+Generated Location: (703:19,49 [39] )
+|ComponentWithEditorRequiredChildContent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredNamedChildContent_ValueSpecified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredNamedChildContent_ValueSpecified/TestComponent.mappings.txt
new file mode 100644
index 00000000000..5c41a9922de
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredNamedChildContent_ValueSpecified/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [39] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredChildContent|
+Generated Location: (703:19,49 [39] )
+|ComponentWithEditorRequiredChildContent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_NoValueSpecified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_NoValueSpecified/TestComponent.mappings.txt
new file mode 100644
index 00000000000..d921b1ae903
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_NoValueSpecified/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredParameters|
+Generated Location: (703:19,49 [37] )
+|ComponentWithEditorRequiredParameters|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecified/TestComponent.mappings.txt
index 15fec8d0b07..b7d6f4e3911 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecified/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecified/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (39:0,39 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredParameters|
+Generated Location: (703:19,49 [37] )
+|ComponentWithEditorRequiredParameters|
+
+Source Location: (39:0,39 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Property1|
Generated Location: (936:23,0 [9] )
|Property1|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecifiedUsingBind/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecifiedUsingBind/TestComponent.mappings.txt
index e51e016bdd3..1107f509eab 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecifiedUsingBind/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValueSpecifiedUsingBind/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (45:0,45 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredParameters|
+Generated Location: (703:19,49 [37] )
+|ComponentWithEditorRequiredParameters|
+
+Source Location: (45:0,45 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Property1|
Generated Location: (936:23,0 [9] )
|Property1|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValuesSpecifiedUsingSplatting/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValuesSpecifiedUsingSplatting/TestComponent.mappings.txt
index 2cf7ca3909b..310779e209e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValuesSpecifiedUsingSplatting/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEditorRequiredParameter_ValuesSpecifiedUsingSplatting/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (54:0,54 [32] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithEditorRequiredParameters|
+Generated Location: (703:19,49 [37] )
+|ComponentWithEditorRequiredParameters|
+
+Source Location: (54:0,54 [32] x:\dir\subdir\Test\TestComponent.cshtml)
|new Dictionary()|
Generated Location: (1073:23,0 [32] )
|new Dictionary()|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEscapedParameterName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEscapedParameterName/TestComponent.mappings.txt
index dce07277ced..0b8c098421d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEscapedParameterName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithEscapedParameterName/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|class|
Generated Location: (887:23,1 [5] )
|class|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.mappings.txt
new file mode 100644
index 00000000000..70504f755f4
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.mappings.txt
@@ -0,0 +1,15 @@
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (18:1,1 [16] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test.MyComponent|
+Generated Location: (858:22,44 [16] )
+|Test.MyComponent|
+
+Source Location: (40:2,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test2.MyComponent2|
+Generated Location: (1018:25,44 [18] )
+|Test2.MyComponent2|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
index 0076986efef..3bf4ecd2182 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImplicitLambdaEventHandler/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (54:2,7 [87] x:\dir\subdir\Test\TestComponent.cshtml)
|
private int counter;
private void Increment() {
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.mappings.txt
new file mode 100644
index 00000000000..4d406d1fe0c
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+|Counter|
+Generated Location: (1097:39,49 [7] )
+|Counter|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithInitOnlyParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithInitOnlyParameter/TestComponent.mappings.txt
index 3dd1f28e91a..b2bcb2756e2 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithInitOnlyParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithInitOnlyParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Prop|
Generated Location: (884:23,0 [4] )
|Prop|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt
index 9422bff7e9d..c2da8cd0e18 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (40:0,40 [12] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (40:0,40 [12] x:\dir\subdir\Test\TestComponent.cshtml)
|someDate.Day|
Generated Location: (980:25,0 [12] )
|someDate.Day|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt
index 1ae220ae4b8..e1269dc4061 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|123 + 456|
Generated Location: (1211:29,0 [9] )
|123 + 456|
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
index cb4951e79a2..ab159c49673 100644
--- 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
@@ -8,11 +8,21 @@ Source Location: (1:0,1 [10] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (513:19,0 [10] )
|using Test|
+Source Location: (40:3,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|HeaderComponent|
+Generated Location: (965:32,49 [15] )
+|HeaderComponent|
+
Source Location: (56:3,17 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Header|
Generated Location: (1154:36,0 [6] )
|Header|
+Source Location: (93:5,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|FooterComponent|
+Generated Location: (1386:44,56 [15] )
+|FooterComponent|
+
Source Location: (109:5,17 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Footer|
Generated Location: (1582:48,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableActionParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableActionParameter/TestComponent.mappings.txt
index a09bb965918..9fd6a933430 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableActionParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableActionParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (29:0,29 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [27] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithNullableAction|
+Generated Location: (703:19,49 [27] )
+|ComponentWithNullableAction|
+
+Source Location: (29:0,29 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|NullableAction|
Generated Location: (916:23,0 [14] )
|NullableAction|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableRenderFragmentParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableRenderFragmentParameter/TestComponent.mappings.txt
index 3063c1dff0d..327daa92f31 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableRenderFragmentParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithNullableRenderFragmentParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (37:0,37 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [35] x:\dir\subdir\Test\TestComponent.cshtml)
+|ComponentWithNullableRenderFragment|
+Generated Location: (703:19,49 [35] )
+|ComponentWithNullableRenderFragment|
+
+Source Location: (37:0,37 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|Header|
Generated Location: (932:23,0 [6] )
|Header|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt
index 3100cc31eec..5b24d9814fc 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (40:0,40 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (40:0,40 [10] x:\dir\subdir\Test\TestComponent.cshtml)
|myInstance|
Generated Location: (1019:25,0 [10] )
|myInstance|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable/TestComponent.mappings.txt
index 45b8654223c..ba32772e929 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (21:0,21 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|myComponent|
Generated Location: (875:23,0 [11] )
|myComponent|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.mappings.txt
index b9847f8c6aa..c67269c3d49 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.mappings.txt
@@ -19,6 +19,11 @@ Generated Location: (1257:42,0 [114] )
public void Use() { System.GC.KeepAlive(myComponent); }
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1829:59,45 [11] )
+|MyComponent|
+
Source Location: (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|MyParameter|
Generated Location: (2019:63,0 [11] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt
index 38255405803..30c9f017faf 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [10] x:\dir\subdir\Test\TestComponent.cshtml)
|myInstance|
Generated Location: (1250:29,0 [10] )
|myInstance|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat/TestComponent.mappings.txt
index 2f70475da93..6b39ed0885d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (51:0,51 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (51:0,51 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|someAttributes|
Generated Location: (1125:24,0 [14] )
|someAttributes|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ExplicitExpression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ExplicitExpression/TestComponent.mappings.txt
index cf669038d3e..a87482e72aa 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ExplicitExpression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ExplicitExpression/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (53:0,53 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (53:0,53 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|someAttributes|
Generated Location: (1125:24,0 [14] )
|someAttributes|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.mappings.txt
index 3bd696a8af1..4984101fb2b 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.mappings.txt
@@ -17,6 +17,11 @@ Generated Location: (1203:40,0 [93] )
private Dictionary someAttributes = new Dictionary();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1815:56,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2005:60,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ImplicitExpression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ImplicitExpression/TestComponent.mappings.txt
index ba7912a32c6..df996e13067 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ImplicitExpression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithSplat_ImplicitExpression/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (52:0,52 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (52:0,52 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|someAttributes|
Generated Location: (1125:24,0 [14] )
|someAttributes|
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 41b92897113..1e233d56cd3 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
@@ -13,3 +13,13 @@ Source Location: (23:1,6 [20] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (871:32,0 [20] )
|"/AnotherRoute/{id}"|
+Source Location: (60:3,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1326:45,49 [11] )
+|MyComponent|
+
+Source Location: (77:4,1 [12] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent2|
+Generated Location: (1487:48,50 [12] )
+|MyComponent2|
+
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
index ef93efe911a..2616ce7a396 100644
--- 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
@@ -8,3 +8,8 @@ Source Location: (15:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (494:18,0 [11] )
|using Test3|
+Source Location: (29:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (947:31,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithWriteOnlyParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithWriteOnlyParameter/TestComponent.mappings.txt
index 3dd1f28e91a..b2bcb2756e2 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithWriteOnlyParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithWriteOnlyParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Prop|
Generated Location: (884:23,0 [4] )
|Prop|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError/TestComponent.mappings.txt
index aee5de94f20..13be66a2cb8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|Message|
Generated Location: (884:23,0 [7] )
|Message|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt
index d1ca801dd40..a9d91666efc 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|Message|
Generated Location: (884:23,0 [7] )
|Message|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt
index 3fb5998d483..fbe7f42e7ce 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|MessageChanged|
Generated Location: (884:23,0 [14] )
|MessageChanged|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt
index 5587b5952ad..499389d9cc8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (38:0,38 [17] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (38:0,38 [17] x:\dir\subdir\Test\TestComponent.cshtml)
|MessageExpression|
Generated Location: (884:23,0 [17] )
|MessageExpression|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_Multiple/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_Multiple/TestComponent.mappings.txt
index aee5de94f20..13be66a2cb8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_Multiple/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_Multiple/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|Message|
Generated Location: (884:23,0 [7] )
|Message|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_WeaklyTyped/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_WeaklyTyped/TestComponent.mappings.txt
new file mode 100644
index 00000000000..b5b73dd3642
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_WeaklyTyped/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Duplicate_RenderMode/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Duplicate_RenderMode/TestComponent.mappings.txt
index 93432e31893..060b9ddbd42 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Duplicate_RenderMode/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Duplicate_RenderMode/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (895:23,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EmptyRootNamespace/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EmptyRootNamespace/TestComponent.mappings.txt
new file mode 100644
index 00000000000..ed9d17a45bc
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EmptyRootNamespace/TestComponent.mappings.txt
@@ -0,0 +1,10 @@
+Source Location: (21:1,1 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|Component1|
+Generated Location: (751:19,44 [10] )
+|Component1|
+
+Source Location: (37:2,1 [17] x:\dir\subdir\Test\TestComponent.cshtml)
+|Shared.Component2|
+Generated Location: (905:22,44 [17] )
+|Shared.Component2|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.mappings.txt
index f85ca7aa75c..f414f64a699 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.mappings.txt
@@ -12,6 +12,11 @@ Generated Location: (1288:32,0 [64] )
string[] Selected { get; set; } = Array.Empty();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1925:48,45 [11] )
+|MyComponent|
+
Source Location: (19:0,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2123:52,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType/TestComponent.mappings.txt
index 6d62119024d..2cf680058a8 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (16:0,16 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (16:0,16 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyType|
Generated Location: (799:22,0 [6] )
|MyType|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType_MethodGroup/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType_MethodGroup/TestComponent.mappings.txt
index 15d22296209..35ea68144e1 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType_MethodGroup/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_ExplicitType_MethodGroup/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (16:0,16 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (16:0,16 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyType|
Generated Location: (799:22,0 [6] )
|MyType|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.mappings.txt
index d2985a41102..a36d4bb0477 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.mappings.txt
@@ -7,6 +7,11 @@ Generated Location: (783:23,0 [28] )
private int counter;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1257:39,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (1463:43,0 [7] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.mappings.txt
index 7e5e43de5a9..5551fa69c29 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.mappings.txt
@@ -7,3 +7,8 @@ Generated Location: (783:23,0 [28] )
private int counter;
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1222:39,45 [11] )
+|MyComponent|
+
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 2be87acfaf0..3e85fa5a703 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (855:25,49 [11] )
+|MyComponent|
+
Source Location: (57:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (1036:29,0 [7] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
index 9bfc98acdcf..7a1e2ca39d7 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
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 c9eec819a28..da3c2994c59 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (855:25,49 [11] )
+|MyComponent|
+
Source Location: (57:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (1036:29,0 [7] )
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 8d6ae294b6b..663ff360122 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (855:25,49 [11] )
+|MyComponent|
+
Source Location: (57:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (1036:29,0 [7] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
index 7108b3258d7..cf2be9d0007 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
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 21307e42d2b..b225e2aa1b6 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
@@ -3,6 +3,11 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (855:25,49 [11] )
+|MyComponent|
+
Source Location: (57:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (1036:29,0 [7] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.mappings.txt
index cafda797e6a..b3f76ae9a77 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.mappings.txt
index 4d3475d6d60..867a2aef578 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.mappings.txt
index f9a8b09c611..42cf1839b53 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.mappings.txt
index 9a1fbff6cf0..c62a9daebc5 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.mappings.txt
index 81c6fcdabc9..5b85c0bb504 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|OnClick|
Generated Location: (884:23,0 [7] )
|OnClick|
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 83be993fd5e..eb4cad7e7b3 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
@@ -3,11 +3,21 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (855:25,49 [13] )
+|TestComponent|
+
Source Location: (84:1,40 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
Generated Location: (1186:30,0 [9] )
|() => { }|
+Source Location: (131:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1490:39,49 [13] )
+|TestComponent|
+
Source Location: (170:2,40 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
Generated Location: (1821:44,0 [9] )
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 da9f4220c29..488e3caa229 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
@@ -42,11 +42,21 @@ Generated Location: (2388:80,0 [52] )
[Parameter] public T Parameter { get; set; }
|
+Source Location: (59:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (2955:96,45 [13] )
+|TestComponent|
+
Source Location: (140:2,82 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (3358:103,0 [9] )
|Parameter|
+Source Location: (159:3,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (3833:113,45 [13] )
+|TestComponent|
+
Source Location: (245:3,87 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (4236:120,0 [9] )
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 10733e3ec4b..2830d00cded 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
@@ -42,11 +42,21 @@ Generated Location: (2388:80,0 [52] )
[Parameter] public T Parameter { get; set; }
|
+Source Location: (59:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (2955:96,45 [13] )
+|TestComponent|
+
Source Location: (140:2,82 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (3346:103,0 [9] )
|Parameter|
+Source Location: (159:3,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (3829:113,45 [13] )
+|TestComponent|
+
Source Location: (245:3,87 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (4220:120,0 [9] )
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 665e504a344..98f933310d9 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
@@ -3,11 +3,21 @@
Generated Location: (372:12,0 [41] )
|using Microsoft.AspNetCore.Components.Web|
+Source Location: (45:1,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (855:25,49 [13] )
+|TestComponent|
+
Source Location: (84:1,40 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
Generated Location: (1187:30,0 [9] )
|() => { }|
+Source Location: (131:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1493:39,49 [13] )
+|TestComponent|
+
Source Location: (170:2,40 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
Generated Location: (1825:44,0 [9] )
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 25ed0987d2e..c872f1c9540 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
@@ -8,11 +8,21 @@ Source Location: (75:1,31 [9] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1146:30,0 [9] )
|() => { }|
+Source Location: (110:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1555:40,49 [13] )
+|TestComponent|
+
Source Location: (161:3,35 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
Generated Location: (2060:47,0 [9] )
|() => { }|
+Source Location: (200:4,5 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (2507:57,54 [13] )
+|TestComponent|
+
Source Location: (255:5,39 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|() => { }|
Generated Location: (3034:64,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt
index b4173905812..1be7d59af40 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Action/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [6] )
|TParam|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (851:27,49 [11] )
+|MyComponent|
+
Source Location: (40:1,21 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|TParam|
Generated Location: (947:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt
index eb30bcbc7e3..f93912f9c41 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_EventCallback/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [6] )
|TParam|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (851:27,49 [11] )
+|MyComponent|
+
Source Location: (40:1,21 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|TParam|
Generated Location: (947:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt
index ce35563e522..2793f3737ee 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericBindToGenericComponent_ExplicitType_WithGetSet_Function/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [6] )
|TParam|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (851:27,49 [11] )
+|MyComponent|
+
Source Location: (40:1,21 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|TParam|
Generated Location: (947:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt
index ce392ded33a..0bc75f02517 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_ExplicitType_WithAfter_Action/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [6] )
|TParam|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (851:27,49 [11] )
+|MyComponent|
+
Source Location: (40:1,21 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|TParam|
Generated Location: (947:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt
index 4fbc1b895f8..9c35a816e3b 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.mappings.txt
@@ -26,6 +26,11 @@ Generated Location: (1491:48,0 [79] )
public void Update() { }
|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2017:66,45 [11] )
+|MyComponent|
+
Source Location: (38:1,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2217:70,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt
index 6886fc84d8c..55dd47414da 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.mappings.txt
@@ -26,6 +26,11 @@ Generated Location: (1553:48,0 [128] )
public void UpdateValue(TParam value) { ParentValue = value; }
|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2160:66,45 [11] )
+|MyComponent|
+
Source Location: (38:1,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2360:70,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt
index d08c43f4646..eb2ee6aa5b0 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.mappings.txt
@@ -24,6 +24,11 @@ Generated Location: (1553:48,0 [118] )
public EventCallback UpdateValue { get; set; }
|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2150:65,45 [11] )
+|MyComponent|
+
Source Location: (38:1,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2350:69,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt
index e0ca795cbd6..d6b33596834 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.mappings.txt
@@ -26,6 +26,11 @@ Generated Location: (1553:48,0 [155] )
public Task UpdateValue(TParam value) { ParentValue = value; return Task.CompletedTask; }
|
+Source Location: (20:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2187:66,45 [11] )
+|MyComponent|
+
Source Location: (38:1,19 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (2387:70,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentMultipleTypeParamUsage/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentMultipleTypeParamUsage/TestComponent.mappings.txt
index 381fc4471b6..d11b989a55a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentMultipleTypeParamUsage/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentMultipleTypeParamUsage/TestComponent.mappings.txt
@@ -8,6 +8,11 @@ Source Location: (29:1,11 [6] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (620:24,0 [6] )
|TItem2|
+Source Location: (168:10,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (997:35,49 [13] )
+|TestComponent|
+
Source Location: (202:10,35 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (1097:38,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression/TestComponent.mappings.txt
index 2dc326461b9..1f79098c02d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [5] )
|TItem|
+Source Location: (89:6,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (850:27,49 [13] )
+|TestComponent|
+
Source Location: (111:6,23 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (948:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression2/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression2/TestComponent.mappings.txt
index 252f4ee99a7..add78b4342b 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression2/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeParamUsageWithImplicitExpression2/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [5] )
|TItem|
+Source Location: (89:6,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (850:27,49 [13] )
+|TestComponent|
+
Source Location: (112:6,24 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (948:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsage/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsage/TestComponent.mappings.txt
index 48162741197..abb05a91912 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsage/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsage/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [5] )
|TItem|
+Source Location: (89:6,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (850:27,49 [13] )
+|TestComponent|
+
Source Location: (110:6,22 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|string|
Generated Location: (948:30,0 [6] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWhitespace/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWhitespace/TestComponent.mappings.txt
index 703b596644a..2df17407965 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWhitespace/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWhitespace/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [5] )
|TItem|
+Source Location: (89:6,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (850:27,49 [13] )
+|TestComponent|
+
Source Location: (110:6,22 [10] x:\dir\subdir\Test\TestComponent.cshtml)
| string |
Generated Location: (948:30,0 [10] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithGenericType/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithGenericType/TestComponent.mappings.txt
index 93bc1c3475b..742d4fceb65 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithGenericType/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithGenericType/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (474:16,0 [5] )
|TItem|
+Source Location: (89:6,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (850:27,49 [13] )
+|TestComponent|
+
Source Location: (110:6,22 [21] x:\dir\subdir\Test\TestComponent.cshtml)
|TestComponent|
Generated Location: (948:30,0 [21] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithInference/TestComponent.mappings.txt
index 8586ee8b31f..130a3b53fcd 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponentTypeUsageWithInference/TestComponent.mappings.txt
@@ -19,6 +19,11 @@ Generated Location: (1184:40,0 [58] )
public TItem MyItem { get; set; }
|
+Source Location: (89:6,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1639:57,45 [13] )
+|TestComponent|
+
Source Location: (103:6,15 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|MyItem|
Generated Location: (1841:61,0 [6] )
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 30e422cc98a..47b6a746319 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
@@ -8,6 +8,11 @@ Source Location: (11:0,11 [6] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (595:22,0 [6] )
|TChild|
+Source Location: (33:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (972:33,49 [11] )
+|MyComponent|
+
Source Location: (52:2,20 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|TChild|
Generated Location: (1068:36,0 [6] )
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 cdca58b2a0b..f6c688ce3d6 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
@@ -29,6 +29,11 @@ Generated Location: (1553:54,0 [138] )
[Parameter] public EventCallback MyChildEvent { get; set; }
|
+Source Location: (33:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2167:71,45 [11] )
+|MyComponent|
+
Source Location: (45:2,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2365:75,0 [4] )
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 c486eb8f2c6..96969cbee3b 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
@@ -13,6 +13,11 @@ Source Location: (44:1,31 [13] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1187:36,0 [13] )
|(int x) => {}|
+Source Location: (14:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1742:53,45 [11] )
+|MyComponent|
+
Source Location: (26:1,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1940:57,0 [4] )
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 479997d5071..c329d84bec9 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
@@ -18,6 +18,11 @@ Source Location: (79:2,31 [26] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1283:41,0 [26] )
|(IEnumerable x) => {}|
+Source Location: (49:2,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1899:58,45 [11] )
+|MyComponent|
+
Source Location: (61:2,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2097:62,0 [4] )
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 d6a6111ba10..d7463f06929 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
@@ -13,6 +13,11 @@ Source Location: (44:1,31 [7] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1213:36,0 [7] )
|x => {}|
+Source Location: (14:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1781:53,45 [11] )
+|MyComponent|
+
Source Location: (26:1,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1979:57,0 [4] )
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 842cda3d95a..8ea7d9b449a 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
@@ -13,6 +13,11 @@ Source Location: (44:1,31 [7] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1302:36,0 [7] )
|x => {}|
+Source Location: (14:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1983:53,45 [11] )
+|MyComponent|
+
Source Location: (26:1,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2181:57,0 [4] )
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 c0aa1d96bcf..55f8a8ce682 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
@@ -13,6 +13,11 @@ Source Location: (44:1,31 [7] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1187:36,0 [7] )
|x => {}|
+Source Location: (14:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1729:53,45 [11] )
+|MyComponent|
+
Source Location: (26:1,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1927:57,0 [4] )
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 401c5557f8a..a09f5966704 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
@@ -22,6 +22,11 @@ Generated Location: (1321:46,0 [38] )
MyClass Hello = new MyClass();
|
+Source Location: (21:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1802:62,45 [11] )
+|MyComponent|
+
Source Location: (33:1,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2000:66,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveType/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveType/TestComponent.mappings.txt
index ff319969729..b1debb15ac1 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveType/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveType/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (20:0,20 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (20:0,20 [10] x:\dir\subdir\Test\TestComponent.cshtml)
|CustomType|
Generated Location: (799:22,0 [10] )
|CustomType|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.mappings.txt
index c6d377f54de..3cc7c810359 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.mappings.txt
@@ -8,6 +8,11 @@ Source Location: (38:0,38 [18] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1064:30,25 [18] )
|context.ToString()|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1677:49,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1875:53,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_TypeParameterOrdering/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_TypeParameterOrdering/TestComponent.mappings.txt
index 0a33557d3fc..e3a7b980757 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_TypeParameterOrdering/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_TypeParameterOrdering/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (37:0,37 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (37:0,37 [18] x:\dir\subdir\Test\TestComponent.cshtml)
|IComposedInterface|
Generated Location: (799:22,0 [18] )
|IComposedInterface|
@@ -18,6 +23,11 @@ Source Location: (70:0,70 [15] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1482:47,0 [15] )
|_componentValue|
+Source Location: (92:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2224:56,49 [11] )
+|MyComponent|
+
Source Location: (114:1,23 [18] x:\dir\subdir\Test\TestComponent.cshtml)
|IComposedInterface|
Generated Location: (2320:59,0 [18] )
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 4884032ea02..982daf749b3 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
@@ -8,6 +8,11 @@ Source Location: (37:1,24 [1] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (958:28,0 [1] )
|1|
+Source Location: (14:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1444:46,45 [11] )
+|MyComponent|
+
Source Location: (26:1,13 [9] x:\dir\subdir\Test\TestComponent.cshtml)
|Parameter|
Generated Location: (1634:50,0 [9] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_CreatesDiagnostic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_CreatesDiagnostic/TestComponent.mappings.txt
index 5d649aaf94b..30a75cacf6f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_CreatesDiagnostic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_CreatesDiagnostic/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml)
|int|
Generated Location: (799:22,0 [3] )
|int|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.mappings.txt
index 2092c343fd4..7e68915e162 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.mappings.txt
@@ -19,6 +19,11 @@ Generated Location: (1249:42,0 [90] )
public void Foo() { System.GC.KeepAlive(_my); }
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1809:59,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (2007:63,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.mappings.txt
index 5a01b576210..9786106dcad 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.mappings.txt
@@ -8,6 +8,11 @@ Source Location: (43:1,8 [17] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1107:31,25 [17] )
|context.ToLower()|
+Source Location: (1:0,1 [16] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test.MyComponent|
+Generated Location: (1745:51,40 [16] )
+|Test.MyComponent|
+
Source Location: (18:0,18 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1948:55,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt
index 155a6923fb5..a91f4e793f3 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml)
|int|
Generated Location: (799:22,0 [3] )
|int|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt
index f5c85016a03..c9a0f2b87ca 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt
@@ -17,6 +17,11 @@ Generated Location: (1198:41,0 [47] )
private object _someKey = new object();
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1667:57,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (1865:61,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_01/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_01/TestComponent.mappings.txt
index acddc46cbae..a3d79f656c4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_01/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_01/TestComponent.mappings.txt
@@ -27,16 +27,31 @@ Generated Location: (2082:59,0 [39] )
private string value1 = "true";
|
+Source Location: (49:2,1 [15] x:\dir\subdir\Test\TestComponent.cshtml)
+|InputRadioGroup|
+Generated Location: (2977:75,78 [15] )
+|InputRadioGroup|
+
Source Location: (71:2,23 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (3218:79,0 [5] )
|Value|
+Source Location: (93:3,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|InputRadio|
+Generated Location: (4153:92,78 [10] )
+|InputRadio|
+
Source Location: (104:3,16 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (4384:96,0 [5] )
|Value|
+Source Location: (132:4,5 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|InputRadio|
+Generated Location: (4942:106,78 [10] )
+|InputRadio|
+
Source Location: (143:4,16 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Value|
Generated Location: (5173:110,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_02/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_02/TestComponent.mappings.txt
index e47bea3a94d..5a6b54c4013 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_02/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericInference_DynamicallyAccessedMembers_02/TestComponent.mappings.txt
@@ -22,6 +22,11 @@ Generated Location: (1343:48,0 [31] )
private string s = "x";
|
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (2163:64,45 [11] )
+|MyComponent|
+
Source Location: (13:0,13 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|P1|
Generated Location: (2371:68,0 [2] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericTypeCheck/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericTypeCheck/TestComponent.mappings.txt
index 419d824f7ea..c0f90c27fbc 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericTypeCheck/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericTypeCheck/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (15:0,15 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (15:0,15 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Data|
Generated Location: (888:23,0 [4] )
|Data|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.mappings.txt
index b01cda0ae12..4d920ae37ce 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddAttribute/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|PlaceHolder|
Generated Location: (875:23,0 [11] )
|Placeholder|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddComponentParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddComponentParameter/TestComponent.mappings.txt
index 70756d5b4e6..80b6c49b1df 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddComponentParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_AddComponentParameter/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|PlaceHolder|
Generated Location: (884:23,0 [11] )
|Placeholder|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind/TestComponent.mappings.txt
index 376104183be..d1e315dde4d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|PlaceHolder|
Generated Location: (884:23,0 [11] )
|Placeholder|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_02/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_02/TestComponent.mappings.txt
index 1ed51a1dc34..11e38c340aa 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_02/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_02/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (33:0,33 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (33:0,33 [1] x:\dir\subdir\Test\TestComponent.cshtml)
|s|
Generated Location: (873:23,0 [1] )
|s|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_03/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_03/TestComponent.mappings.txt
index 05e5eedb366..4cb7901f419 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_03/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Bind_03/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (36:0,36 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (36:0,36 [1] x:\dir\subdir\Test\TestComponent.cshtml)
|s|
Generated Location: (871:23,0 [1] )
|s|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Multiple/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Multiple/TestComponent.mappings.txt
index 70756d5b4e6..80b6c49b1df 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Multiple/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ImplicitStringConversion_ParameterCasing_Multiple/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|PlaceHolder|
Generated Location: (884:23,0 [11] )
|Placeholder|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/InvalidCode_EmptyTransition/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/InvalidCode_EmptyTransition/TestComponent.mappings.txt
index 9fd658c338a..0c8a9dd49c9 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/InvalidCode_EmptyTransition/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/InvalidCode_EmptyTransition/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (36:2,1 [0] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (36:2,1 [0] x:\dir\subdir\Test\TestComponent.cshtml)
||
Generated Location: (994:25,24 [0] )
||
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt
index 582141bcaa6..33dccb729fa 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (48:1,26 [12] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+|SomeOtherComponent|
+Generated Location: (703:19,49 [18] )
+|SomeOtherComponent|
+
+Source Location: (48:1,26 [12] x:\dir\subdir\Test\TestComponent.cshtml)
|DateTime.Now|
Generated Location: (1082:25,25 [12] )
|DateTime.Now|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt
index 733b264e120..68eda2d474e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_LeadingWhiteSpace_WithComponent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (48:1,26 [12] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+|SomeOtherComponent|
+Generated Location: (703:19,49 [18] )
+|SomeOtherComponent|
+
+Source Location: (48:1,26 [12] x:\dir\subdir\Test\TestComponent.cshtml)
|DateTime.Now|
Generated Location: (1143:26,25 [12] )
|DateTime.Now|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithComponent/TestComponent.mappings.txt
new file mode 100644
index 00000000000..6404ea9cae1
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Legacy_3_1_TrailingWhiteSpace_WithComponent/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (19:2,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+|SomeOtherComponent|
+Generated Location: (773:20,49 [18] )
+|SomeOtherComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleChildContentMatchingComponentName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleChildContentMatchingComponentName/TestComponent.mappings.txt
new file mode 100644
index 00000000000..8f963bdd7a4
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleChildContentMatchingComponentName/TestComponent.mappings.txt
@@ -0,0 +1,10 @@
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (81:4,1 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+|Header|
+Generated Location: (1276:30,49 [6] )
+|Header|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.mappings.txt
index 0dd7d436906..ca24cc86255 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (55:2,14 [6] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (55:2,14 [6] x:\dir\subdir\Test\TestComponent.cshtml)
|"bye!"|
Generated Location: (1161:27,25 [6] )
|"bye!"|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NamespaceWithSurrogatePair/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NamespaceWithSurrogatePair/TestComponent.mappings.txt
new file mode 100644
index 00000000000..a3409a4fd23
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NamespaceWithSurrogatePair/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (21:1,1 [10] x:\dir\subdir\Test\TestComponent.cshtml)
+|Component1|
+Generated Location: (793:20,59 [10] )
+|Component1|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NonGenericComponent_WithGenericEventHandler/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NonGenericComponent_WithGenericEventHandler/TestComponent.mappings.txt
index a358475d932..cd2631f59bb 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NonGenericComponent_WithGenericEventHandler/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/NonGenericComponent_WithGenericEventHandler/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (703:19,49 [11] )
+|MyComponent|
+
+Source Location: (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Item|
Generated Location: (884:23,0 [4] )
|Item|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.mappings.txt
index 8c257869b9b..b203182dc26 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.mappings.txt
@@ -18,6 +18,11 @@ Source Location: (107:0,107 [2] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1565:51,0 [2] )
|; |
+Source Location: (113:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1670:57,49 [11] )
+|MyComponent|
+
Source Location: (125:1,13 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|Template|
Generated Location: (1851:61,0 [8] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.mappings.txt
index 63a212472e1..4c671ee983d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.mappings.txt
@@ -5,6 +5,11 @@ Generated Location: (735:21,0 [45] )
|
RenderFragment p = (person) => |
+Source Location: (54:1,50 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (970:30,54 [11] )
+|MyComponent|
+
Source Location: (66:1,62 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Name|
Generated Location: (1156:34,0 [4] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.mappings.txt
index a09e678c6ac..091f7998232 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.mappings.txt
@@ -5,6 +5,11 @@ Generated Location: (735:21,0 [45] )
|
RenderFragment p = (person) => |
+Source Location: (54:1,50 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (970:30,54 [11] )
+|MyComponent|
+
Source Location: (66:1,62 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|Name|
Generated Location: (1156:34,0 [4] )
@@ -22,6 +27,11 @@ Generated Location: (1690:53,0 [3] )
|;
|
+Source Location: (100:3,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1794:59,49 [11] )
+|MyComponent|
+
Source Location: (116:4,2 [15] x:\dir\subdir\Test\TestComponent.cshtml)
|"hello, world!"|
Generated Location: (2051:63,25 [15] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.mappings.txt
index 2179ff2f540..4bbf40a8735 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.mappings.txt
@@ -13,6 +13,11 @@ Source Location: (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1252:41,0 [2] )
|; |
+Source Location: (79:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1357:47,49 [11] )
+|MyComponent|
+
Source Location: (91:1,13 [14] x:\dir\subdir\Test\TestComponent.cshtml)
|PersonTemplate|
Generated Location: (1538:51,0 [14] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.mappings.txt
index 31a8715d912..473d8a060cf 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.mappings.txt
@@ -8,6 +8,11 @@ Source Location: (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml)
Generated Location: (1012:32,0 [2] )
|; |
+Source Location: (51:1,1 [11] x:\dir\subdir\Test\TestComponent.cshtml)
+|MyComponent|
+Generated Location: (1117:38,49 [11] )
+|MyComponent|
+
Source Location: (72:1,22 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|template|
Generated Location: (1276:42,0 [8] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt
index 6f29ef98852..f698d3a7a5c 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [7] x:\dir\subdir\Test\TestComponent.cshtml)
+|Counter|
+Generated Location: (703:19,49 [7] )
+|Counter|
+
+Source Location: (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml)
|y|
Generated Location: (853:23,0 [1] )
|y|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt
index d787010f724..bb1d7a16228 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+|User|
+Generated Location: (703:19,49 [4] )
+|User|
+
+Source Location: (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml)
|UserName|
Generated Location: (853:23,0 [8] )
|UserName|
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 62a314b52ff..b91cd9a3277 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
@@ -3,6 +3,11 @@
Generated Location: (504:16,0 [3] )
|"/"|
+Source Location: (68:6,1 [12] x:\dir\subdir\Test\TestComponent.cshtml)
+|SurveyPrompt|
+Generated Location: (1052:30,49 [12] )
+|SurveyPrompt|
+
Source Location: (81:6,14 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Title|
Generated Location: (1235:34,0 [5] )
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 62a314b52ff..b91cd9a3277 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
@@ -3,6 +3,11 @@
Generated Location: (504:16,0 [3] )
|"/"|
+Source Location: (68:6,1 [12] x:\dir\subdir\Test\TestComponent.cshtml)
+|SurveyPrompt|
+Generated Location: (1052:30,49 [12] )
+|SurveyPrompt|
+
Source Location: (81:6,14 [5] x:\dir\subdir\Test\TestComponent.cshtml)
|Title|
Generated Location: (1235:34,0 [5] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Existing_Attributes/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Existing_Attributes/TestComponent.mappings.txt
index d04dd17a216..a781685404f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Existing_Attributes/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Existing_Attributes/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (15:0,15 [2] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (15:0,15 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|P2|
Generated Location: (888:23,0 [2] )
|P2|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Expression/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Expression/TestComponent.mappings.txt
index c027541242f..9c2963cf2a4 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Expression/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_Expression/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (30:0,30 [38] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (30:0,30 [38] x:\dir\subdir\Test\TestComponent.cshtml)
|new MyRenderMode() { Extra = "Hello" }|
Generated Location: (895:23,0 [38] )
|new MyRenderMode() { Extra = "Hello" }|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_SimpleIdentifier/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_SimpleIdentifier/TestComponent.mappings.txt
index 93432e31893..060b9ddbd42 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_SimpleIdentifier/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Attribute_With_SimpleIdentifier/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (895:23,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Child_Components/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Child_Components/TestComponent.mappings.txt
index 77eb7b5e552..2f227cf75e6 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Child_Components/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Child_Components/TestComponent.mappings.txt
@@ -1,28 +1,58 @@
-Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (895:23,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (101:1,5 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1212:31,54 [13] )
+|TestComponent|
+
Source Location: (128:1,32 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (1411:35,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (205:2,9 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1741:43,58 [13] )
+|TestComponent|
+
Source Location: (232:2,36 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (1945:47,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (326:4,2 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (2476:61,54 [13] )
+|TestComponent|
+
Source Location: (353:4,29 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (2675:65,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (430:5,9 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (3005:73,58 [13] )
+|TestComponent|
+
Source Location: (457:5,36 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (3209:77,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (536:6,9 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (3600:87,58 [13] )
+|TestComponent|
+
Source Location: (563:6,36 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (3805:91,0 [64] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.codegen.cs
index 09254ae367b..21583a385ae 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.codegen.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.codegen.cs
@@ -22,7 +22,15 @@ protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.
#pragma warning restore 1998
private sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
{
- private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl => Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line (1,13)-(1,77) "x:\dir\subdir\Test\TestComponent.cshtml"
+Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+
;
public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt
index 09fb15ec983..dd168de9614 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.ir.txt
@@ -13,7 +13,7 @@
CSharpCode -
IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
CSharpCode - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
IntermediateToken - - CSharp - ;
CSharpCode -
IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt
new file mode 100644
index 00000000000..f43427c96e2
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_FullyQualified/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (1100:27,0 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.codegen.cs
index aad4143b641..973716b765a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.codegen.cs
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.codegen.cs
@@ -29,7 +29,15 @@ protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.
#pragma warning restore 1998
private sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
{
- private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl => Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line (3,13)-(3,77) "x:\dir\subdir\Test\TestComponent.cshtml"
+Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+
;
public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
}
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt
index 05166e87312..94b04eb6e6b 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.ir.txt
@@ -13,7 +13,7 @@
CSharpCode -
IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
CSharpCode - (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
- IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
IntermediateToken - - CSharp - ;
CSharpCode -
IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt
index 2d3d9bb71c1..f4bd9529513 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithNamespaces/TestComponent.mappings.txt
@@ -3,3 +3,8 @@
Generated Location: (146:5,0 [16] )
|Custom.Namespace|
+Source Location: (43:2,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (1258:34,0 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.codegen.cs
new file mode 100644
index 00000000000..c976239e20b
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.codegen.cs
@@ -0,0 +1,47 @@
+//
+#pragma warning disable 1591
+namespace Test
+{
+ #line default
+ using global::System;
+ using global::System.Collections.Generic;
+ using global::System.Linq;
+ using global::System.Threading.Tasks;
+ using global::Microsoft.AspNetCore.Components;
+ #line default
+ #line hidden
+ [__PrivateComponentRenderModeAttribute]
+ #nullable restore
+ public partial class TestComponent<
+#nullable restore
+#line (1,12)-(1,13) "x:\dir\subdir\Test\TestComponent.cshtml"
+T
+
+#line default
+#line hidden
+#nullable disable
+ > : global::Microsoft.AspNetCore.Components.ComponentBase
+ #nullable disable
+ {
+ #pragma warning disable 1998
+ protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
+ {
+ }
+ #pragma warning restore 1998
+ }
+ file sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
+ {
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line (2,13)-(2,77) "x:\dir\subdir\Test\TestComponent.cshtml"
+Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+
+ ;
+ public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.ir.txt
new file mode 100644
index 00000000000..89b6b2a3930
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.ir.txt
@@ -0,0 +1,19 @@
+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 - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components
+ CSharpCode -
+ IntermediateToken - - CSharp - [__PrivateComponentRenderModeAttribute]
+ ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - - T
+ MethodDeclaration - - protected override - void - BuildRenderTree
+ ClassDeclaration - - file sealed - __PrivateComponentRenderModeAttribute - global::Microsoft.AspNetCore.Components.RenderModeAttribute -
+ CSharpCode -
+ IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+ CSharpCode - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - - CSharp - ;
+ CSharpCode -
+ IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.mappings.txt
new file mode 100644
index 00000000000..87aeafd088c
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam/TestComponent.mappings.txt
@@ -0,0 +1,10 @@
+Source Location: (11:0,11 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|T|
+Generated Location: (519:17,0 [1] )
+|T|
+
+Source Location: (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (1208:36,0 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.codegen.cs
new file mode 100644
index 00000000000..f717453f37f
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.codegen.cs
@@ -0,0 +1,47 @@
+//
+#pragma warning disable 1591
+namespace Test
+{
+ #line default
+ using global::System;
+ using global::System.Collections.Generic;
+ using global::System.Linq;
+ using global::System.Threading.Tasks;
+ using global::Microsoft.AspNetCore.Components;
+ #line default
+ #line hidden
+ [__PrivateComponentRenderModeAttribute]
+ #nullable restore
+ public partial class TestComponent<
+#nullable restore
+#line (2,12)-(2,13) "x:\dir\subdir\Test\TestComponent.cshtml"
+T
+
+#line default
+#line hidden
+#nullable disable
+ > : global::Microsoft.AspNetCore.Components.ComponentBase
+ #nullable disable
+ {
+ #pragma warning disable 1998
+ protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
+ {
+ }
+ #pragma warning restore 1998
+ }
+ file sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
+ {
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+#nullable restore
+#line (1,13)-(1,77) "x:\dir\subdir\Test\TestComponent.cshtml"
+Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+
+#line default
+#line hidden
+#nullable disable
+
+ ;
+ public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.ir.txt
new file mode 100644
index 00000000000..82e79475ddc
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.ir.txt
@@ -0,0 +1,19 @@
+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 - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components
+ CSharpCode -
+ IntermediateToken - - CSharp - [__PrivateComponentRenderModeAttribute]
+ ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - - T
+ MethodDeclaration - - protected override - void - BuildRenderTree
+ ClassDeclaration - - file sealed - __PrivateComponentRenderModeAttribute - global::Microsoft.AspNetCore.Components.RenderModeAttribute -
+ CSharpCode -
+ IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+ CSharpCode - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - - CSharp - ;
+ CSharpCode -
+ IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.mappings.txt
new file mode 100644
index 00000000000..69a8af45042
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_First/TestComponent.mappings.txt
@@ -0,0 +1,10 @@
+Source Location: (89:1,11 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|T|
+Generated Location: (519:17,0 [1] )
+|T|
+
+Source Location: (12:0,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Generated Location: (1208:36,0 [64] )
+|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.codegen.cs
new file mode 100644
index 00000000000..2dcf885600f
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.codegen.cs
@@ -0,0 +1,39 @@
+//
+#pragma warning disable 1591
+namespace Test
+{
+ #line default
+ using global::System;
+ using global::System.Collections.Generic;
+ using global::System.Linq;
+ using global::System.Threading.Tasks;
+ using global::Microsoft.AspNetCore.Components;
+ #line default
+ #line hidden
+ [global::Test.TestComponent.__PrivateComponentRenderModeAttribute]
+ #nullable restore
+ public partial class TestComponent<
+#nullable restore
+#line (1,12)-(1,13) "x:\dir\subdir\Test\TestComponent.cshtml"
+T
+
+#line default
+#line hidden
+#nullable disable
+ > : global::Microsoft.AspNetCore.Components.ComponentBase
+ #nullable disable
+ {
+ #pragma warning disable 1998
+ protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
+ {
+ }
+ #pragma warning restore 1998
+ private sealed class __PrivateComponentRenderModeAttribute : global::Microsoft.AspNetCore.Components.RenderModeAttribute
+ {
+ private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl => Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ ;
+ public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
+ }
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.ir.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.ir.txt
new file mode 100644
index 00000000000..15e90cdcf64
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.ir.txt
@@ -0,0 +1,19 @@
+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 - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components
+ CSharpCode -
+ IntermediateToken - - CSharp - [global::Test.TestComponent.__PrivateComponentRenderModeAttribute]
+ ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - - T
+ MethodDeclaration - - protected override - void - BuildRenderTree
+ ClassDeclaration - - private sealed - __PrivateComponentRenderModeAttribute - global::Microsoft.AspNetCore.Components.RenderModeAttribute -
+ CSharpCode -
+ IntermediateToken - - CSharp - private static global::Microsoft.AspNetCore.Components.IComponentRenderMode ModeImpl =>
+ CSharpCode - (26:1,12 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+ IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer
+ IntermediateToken - - CSharp - ;
+ CSharpCode -
+ IntermediateToken - - CSharp - public override global::Microsoft.AspNetCore.Components.IComponentRenderMode Mode => ModeImpl;
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.mappings.txt
new file mode 100644
index 00000000000..97b5870256a
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Directive_WithTypeParam_Razor9/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (11:0,11 [1] x:\dir\subdir\Test\TestComponent.cshtml)
+|T|
+Generated Location: (546:17,0 [1] )
+|T|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Multiple_Components/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Multiple_Components/TestComponent.mappings.txt
index 3c78aca2813..2f48379ee25 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Multiple_Components/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_Multiple_Components/TestComponent.mappings.txt
@@ -1,8 +1,18 @@
-Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (28:0,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (895:23,0 [64] )
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
+Source Location: (99:1,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (1231:33,49 [13] )
+|TestComponent|
+
Source Location: (126:1,28 [64] x:\dir\subdir\Test\TestComponent.cshtml)
|Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer|
Generated Location: (1426:37,0 [64] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Disabled/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Disabled/TestComponent.mappings.txt
index 6b3789ae474..c4cac0f1d3f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Disabled/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Disabled/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (28:0,28 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (28:0,28 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|null|
Generated Location: (895:23,0 [4] )
|null|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Enabled/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Enabled/TestComponent.mappings.txt
index 6b3789ae474..c4cac0f1d3f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Enabled/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Null_Nullable_Enabled/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (28:0,28 [4] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (28:0,28 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|null|
Generated Location: (895:23,0 [4] )
|null|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Nullable_Receiver/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Nullable_Receiver/TestComponent.mappings.txt
index b8fd30484dd..b9ebe4d7b2b 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Nullable_Receiver/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Nullable_Receiver/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (291:9,30 [20] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (262:9,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (291:9,30 [20] x:\dir\subdir\Test\TestComponent.cshtml)
|Container.RenderMode|
Generated Location: (897:23,0 [20] )
|Container.RenderMode|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Ternary/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Ternary/TestComponent.mappings.txt
index 1a1c9293c01..5968c23850a 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Ternary/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_Ternary/TestComponent.mappings.txt
@@ -1,4 +1,9 @@
-Source Location: (30:0,30 [78] x:\dir\subdir\Test\TestComponent.cshtml)
+Source Location: (1:0,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (703:19,49 [13] )
+|TestComponent|
+
+Source Location: (30:0,30 [78] x:\dir\subdir\Test\TestComponent.cshtml)
|true ? Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer : null|
Generated Location: (896:23,0 [78] )
|true ? Microsoft.AspNetCore.Components.Web.RenderMode.InteractiveServer : null|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.mappings.txt
index 5a28ba16584..c01a444eb61 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.mappings.txt
@@ -27,6 +27,11 @@ Generated Location: (1630:56,0 [67] )
[Parameter] public TRenderMode RenderModeParam { get; set;}
|
+Source Location: (100:2,1 [13] x:\dir\subdir\Test\TestComponent.cshtml)
+|TestComponent|
+Generated Location: (2273:73,45 [13] )
+|TestComponent|
+
Source Location: (144:2,45 [15] x:\dir\subdir\Test\TestComponent.cshtml)
|RenderModeParam|
Generated Location: (2487:77,0 [15] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.mappings.txt
new file mode 100644
index 00000000000..6404ea9cae1
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.mappings.txt
@@ -0,0 +1,5 @@
+Source Location: (19:2,1 [18] x:\dir\subdir\Test\TestComponent.cshtml)
+|SomeOtherComponent|
+Generated Location: (773:20,49 [18] )
+|SomeOtherComponent|
+
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName/TestComponent.mappings.txt
index ff36719db7e..8d67377612f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (320:11,0 [37] )
|using Microsoft.AspNetCore.Components|
+Source Location: (43:2,1 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|Col|
+Generated Location: (799:24,49 [3] )
+|Col|
+
Source Location: (66:3,2 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
|
@@ -10,6 +15,11 @@ Generated Location: (1148:32,0 [2] )
|
|
+Source Location: (73:4,5 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|Col|
+Generated Location: (1251:38,49 [3] )
+|Col|
+
Source Location: (77:4,9 [51] x:\dir\subdir\Test\TestComponent.cshtml)
|in code block
RenderFragment template = |
@@ -17,6 +27,11 @@ Generated Location: (1384:42,0 [51] )
|in code block
RenderFragment template = |
+Source Location: (130:5,32 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|Col|
+Generated Location: (1574:50,54 [3] )
+|Col|
+
Source Location: (134:5,36 [20] x:\dir\subdir\Test\TestComponent.cshtml)
|in template;
|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_FullyQualified/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_FullyQualified/TestComponent.mappings.txt
index 3e559ac80a5..bd47bcd043f 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_FullyQualified/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_FullyQualified/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (320:11,0 [37] )
|using Microsoft.AspNetCore.Components|
+Source Location: (43:2,1 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test.Col|
+Generated Location: (794:24,44 [8] )
+|Test.Col|
+
Source Location: (76:3,2 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
|
@@ -10,11 +15,21 @@ Generated Location: (1148:32,0 [2] )
|
|
+Source Location: (83:4,5 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test.Col|
+Generated Location: (1246:38,44 [8] )
+|Test.Col|
+
Source Location: (118:5,0 [30] x:\dir\subdir\Test\TestComponent.cshtml)
| RenderFragment template = |
Generated Location: (1605:46,0 [30] )
| RenderFragment template = |
+Source Location: (150:5,32 [8] x:\dir\subdir\Test\TestComponent.cshtml)
+|Test.Col|
+Generated Location: (1769:53,49 [8] )
+|Test.Col|
+
Source Location: (181:5,63 [3] x:\dir\subdir\Test\TestComponent.cshtml)
|;
|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_SelfClosing/TestComponent.mappings.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_SelfClosing/TestComponent.mappings.txt
index a2fc0fa4645..4dfb654c4b0 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_SelfClosing/TestComponent.mappings.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/VoidTagName_SelfClosing/TestComponent.mappings.txt
@@ -3,6 +3,11 @@
Generated Location: (320:11,0 [37] )
|using Microsoft.AspNetCore.Components|
+Source Location: (43:2,1 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|Col|
+Generated Location: (799:24,49 [3] )
+|Col|
+
Source Location: (53:3,2 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
|
@@ -10,11 +15,21 @@ Generated Location: (930:28,0 [2] )
|
|
+Source Location: (60:4,5 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|Col|
+Generated Location: (1033:34,49 [3] )
+|Col|
+
Source Location: (68:5,0 [30] x:\dir\subdir\Test\TestComponent.cshtml)
| RenderFragment template = |
Generated Location: (1165:38,0 [30] )
| RenderFragment template = |
+Source Location: (100:5,32 [3] x:\dir\subdir\Test\TestComponent.cshtml)
+|Col|
+Generated Location: (1334:45,54 [3] )
+|Col|
+
Source Location: (106:5,38 [3] x:\dir\subdir\Test\TestComponent.cshtml)
|;
|
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression.cspans.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression.cspans.txt
new file mode 100644
index 00000000000..4735a170f25
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression.cspans.txt
@@ -0,0 +1,6 @@
+Markup span at (0:0,0 [0] ) - Parent: Markup block at (0:0,0 [92] )
+Transition span at (0:0,0 [1] ) - Parent: Statement block at (0:0,0 [92] )
+MetaCode span at (1:0,1 [1] ) - Parent: Statement block at (0:0,0 [92] )
+Code span at (2:0,2 [89] ) - Parent: Statement block at (0:0,0 [92] )
+MetaCode span at (91:6,0 [1] ) - Parent: Statement block at (0:0,0 [92] )
+Markup span at (92:6,1 [0] ) - Parent: Markup block at (0:0,0 [92] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression.stree.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression.stree.txt
new file mode 100644
index 00000000000..c12ad43af9b
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression.stree.txt
@@ -0,0 +1,52 @@
+RazorDocument - [0..92)::92 - [@{LF var val = 0 switchLF {LF 0 => "value",LF _ => "no value"LF };LF}]
+ MarkupBlock - [0..92)::92
+ MarkupTextLiteral - [0..0)::0 - [] - Gen
+ Marker;[];
+ CSharpCodeBlock - [0..92)::92
+ CSharpStatement - [0..92)::92
+ CSharpTransition - [0..1)::1 - Gen
+ Transition;[@];
+ CSharpStatementBody - [1..92)::91
+ RazorMetaCode - [1..2)::1 - Gen
+ LeftBrace;[{];
+ CSharpCodeBlock - [2..91)::89
+ CSharpStatementLiteral - [2..91)::89 - [LF var val = 0 switchLF {LF 0 => "value",LF _ => "no value"LF };LF] - Gen
+ NewLine;[LF];
+ Whitespace;[ ];
+ Keyword;[var];
+ Whitespace;[ ];
+ Identifier;[val];
+ Whitespace;[ ];
+ Assign;[=];
+ Whitespace;[ ];
+ NumericLiteral;[0];
+ Whitespace;[ ];
+ Keyword;[switch];
+ NewLine;[LF];
+ Whitespace;[ ];
+ LeftBrace;[{];
+ NewLine;[LF];
+ Whitespace;[ ];
+ NumericLiteral;[0];
+ Whitespace;[ ];
+ CSharpOperator;[=>];
+ Whitespace;[ ];
+ StringLiteral;["value"];
+ Comma;[,];
+ NewLine;[LF];
+ Whitespace;[ ];
+ Keyword;[_];
+ Whitespace;[ ];
+ CSharpOperator;[=>];
+ Whitespace;[ ];
+ StringLiteral;["no value"];
+ NewLine;[LF];
+ Whitespace;[ ];
+ RightBrace;[}];
+ Semicolon;[;];
+ NewLine;[LF];
+ RazorMetaCode - [91..92)::1 - Gen
+ RightBrace;[}];
+ MarkupTextLiteral - [92..92)::0 - [] - Gen
+ Marker;[];
+ EndOfFile;[];
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.cspans.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.cspans.txt
new file mode 100644
index 00000000000..c01f9850b2a
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.cspans.txt
@@ -0,0 +1,4 @@
+Markup span at (0:0,0 [0] ) - Parent: Markup block at (0:0,0 [86] )
+Transition span at (0:0,0 [1] ) - Parent: Statement block at (0:0,0 [86] )
+MetaCode span at (1:0,1 [1] ) - Parent: Statement block at (0:0,0 [86] )
+Code span at (2:0,2 [84] ) - Parent: Statement block at (0:0,0 [86] )
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.diag.txt
new file mode 100644
index 00000000000..bcd37730bb1
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.diag.txt
@@ -0,0 +1 @@
+(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.stree.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.stree.txt
new file mode 100644
index 00000000000..cb8363db2ba
--- /dev/null
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SwitchExpression_Incomplete.stree.txt
@@ -0,0 +1,50 @@
+RazorDocument - [0..86)::86 - [@{LF var val = 0 switchLF {LF 0 => "value"LFLF var val2 = "value2";LF}]
+ MarkupBlock - [0..86)::86
+ MarkupTextLiteral - [0..0)::0 - [] - Gen
+ Marker;[];
+ CSharpCodeBlock - [0..86)::86
+ CSharpStatement - [0..86)::86
+ CSharpTransition - [0..1)::1 - Gen
+ Transition;[@];
+ CSharpStatementBody - [1..86)::85
+ RazorMetaCode - [1..2)::1 - Gen
+ LeftBrace;[{];
+ CSharpCodeBlock - [2..86)::84
+ CSharpStatementLiteral - [2..86)::84 - [LF var val = 0 switchLF {LF 0 => "value"LFLF var val2 = "value2";LF}] - Gen