From f25734acf4123e400a29ce474fe9c753e702514b Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Sun, 26 May 2019 12:43:13 -0700 Subject: [PATCH] Support parsing directive attributes - Part 2/2 (dotnet/aspnetcore-tooling#619) * Support parsing directive attributes \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/5eb8ef43eb7785509b594e8f01ac7e70d996b3b7 --- ...undAttributeDescriptorBuilderExtensions.cs | 13 + .../src/BoundAttributeDescriptorExtensions.cs | 14 +- .../src/ClassifiedSpanVisitor.cs | 19 +- .../src/ComponentResources.resx | 4 +- .../Components/ComponentBindLoweringPass.cs | 22 +- .../ComponentEventHandlerLoweringPass.cs | 13 +- .../Components/ComponentKeyLoweringPass.cs | 2 +- .../src/Components/ComponentMetadata.cs | 2 + .../ComponentReferenceCaptureLoweringPass.cs | 2 +- .../DefaultBoundAttributeDescriptorBuilder.cs | 39 +- ...faultRazorIntermediateNodeLoweringPhase.cs | 176 +++++++- .../src/DefaultRequiredAttributeDescriptor.cs | 6 +- ...faultRequiredAttributeDescriptorBuilder.cs | 28 +- .../ComponentAttributeIntermediateNode.cs | 11 +- ...elperAttributeParameterIntermediateNode.cs | 3 + .../TagHelperPropertyIntermediateNode.cs | 3 + .../src/Legacy/HtmlMarkupParser.cs | 9 +- .../src/Legacy/TagHelperBlockRewriter.cs | 176 +++++++- .../src/RazorDiagnosticFactory.cs | 58 +++ .../src/RazorParserFeatureFlags.cs | 13 +- .../src/RequiredAttributeDescriptor.cs | 2 + .../src/RequiredAttributeDescriptorBuilder.cs | 4 + ...redAttributeDescriptorBuilderExtensions.cs | 23 + .../RequiredAttributeDescriptorExtensions.cs | 23 + .../src/Resources.resx | 9 + .../Syntax.xml.Internal.Generated.cs | 373 ++++++++++++++++ .../Generated/Syntax.xml.Main.Generated.cs | 96 ++++ .../Generated/Syntax.xml.Syntax.Generated.cs | 421 ++++++++++++++++++ ...imizedTagHelperDirectiveAttributeSyntax.cs | 46 ++ ...MarkupTagHelperDirectiveAttributeSyntax.cs | 46 ++ .../src/Syntax/Syntax.xml | 23 + .../src/Syntax/SyntaxKind.cs | 2 + .../src/TagHelperAttributeInfo.cs | 10 +- .../ComponentBindIntegrationTest.cs | 10 +- .../ComponentCodeGenerationTestBase.cs | 128 +++--- .../test/Legacy/HtmlAttributeTest.cs | 12 + .../test/Legacy/TagHelperBlockRewriterTest.cs | 95 +++- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 12 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.ir.txt | 22 +- .../TestComponent.mappings.txt | 12 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.ir.txt | 28 +- .../TestComponent.mappings.txt | 12 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../Component_WithKey/TestComponent.ir.txt | 20 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 26 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../Component_WithRef/TestComponent.ir.txt | 20 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 34 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 22 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 22 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 28 +- .../TestComponent.mappings.txt | 12 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 30 +- .../TestComponent.mappings.txt | 12 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 26 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 4 +- .../Element_WithKey/TestComponent.codegen.cs | 2 +- .../Element_WithKey/TestComponent.ir.txt | 24 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../Element_WithRef/TestComponent.codegen.cs | 2 +- .../Element_WithRef/TestComponent.ir.txt | 24 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.ir.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../Regression_597/TestComponent.codegen.cs | 2 +- .../Regression_597/TestComponent.ir.txt | 20 +- .../Regression_597/TestComponent.mappings.txt | 8 +- .../Regression_609/TestComponent.codegen.cs | 4 +- .../Regression_609/TestComponent.ir.txt | 26 +- .../Regression_609/TestComponent.mappings.txt | 12 +- .../Regression_784/TestComponent.codegen.cs | 4 +- .../Regression_784/TestComponent.ir.txt | 30 +- .../Regression_784/TestComponent.mappings.txt | 12 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.ir.txt | 24 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../Component_WithKey/TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../Component_WithRef/TestComponent.ir.txt | 12 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 14 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 20 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 4 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 22 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 18 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 9 +- .../TestComponent.diagnostics.txt | 2 +- .../TestComponent.ir.txt | 18 +- .../Element_WithKey/TestComponent.codegen.cs | 2 +- .../Element_WithKey/TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.mappings.txt | 8 +- .../Element_WithRef/TestComponent.codegen.cs | 2 +- .../Element_WithRef/TestComponent.ir.txt | 16 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.ir.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 10 +- .../TestComponent.mappings.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 6 +- .../TestComponent.ir.txt | 4 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.mappings.txt | 8 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.ir.txt | 8 +- .../TestComponent.mappings.txt | 8 +- .../Regression_597/TestComponent.codegen.cs | 2 +- .../Regression_597/TestComponent.ir.txt | 12 +- .../Regression_597/TestComponent.mappings.txt | 4 +- .../Regression_609/TestComponent.codegen.cs | 4 +- .../Regression_609/TestComponent.ir.txt | 18 +- .../Regression_609/TestComponent.mappings.txt | 4 +- .../Regression_784/TestComponent.codegen.cs | 4 +- .../Regression_784/TestComponent.ir.txt | 22 +- .../Regression_784/TestComponent.mappings.txt | 4 +- ...rsesDirectiveAttributesAsMarkup.cspans.txt | 7 + ...arsesDirectiveAttributesAsMarkup.stree.txt | 34 ++ ...AttributesWithParameterAsMarkup.cspans.txt | 7 + ...eAttributesWithParameterAsMarkup.stree.txt | 34 ++ ...es_ComponentDirectiveAttributes.cspans.txt | 5 + ...tes_ComponentDirectiveAttributes.stree.txt | 45 ++ ...es_ComponentDirectiveAttributes.tspans.txt | 1 + ...zedComponentDirectiveAttributes.cspans.txt | 3 + ...mizedComponentDirectiveAttributes.diag.txt | 2 + ...izedComponentDirectiveAttributes.stree.txt | 29 ++ ...zedComponentDirectiveAttributes.tspans.txt | 1 + .../src/BindTagHelperDescriptorProvider.cs | 32 +- ...EventHandlerTagHelperDescriptorProvider.cs | 12 +- .../src/KeyTagHelperDescriptorProvider.cs | 6 +- .../src/RefTagHelperDescriptorProvider.cs | 6 +- .../BindTagHelperDescriptorProviderTest.cs | 72 +-- ...tHandlerTagHelperDescriptorProviderTest.cs | 11 +- .../KeyTagHelperDescriptorProviderTest.cs | 6 +- .../RefTagHelperDescriptorProviderTest.cs | 6 +- .../Language/Legacy/ParserTestBase.cs | 26 +- 421 files changed, 3476 insertions(+), 1626 deletions(-) create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilderExtensions.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorExtensions.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupMinimizedTagHelperDirectiveAttributeSyntax.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupTagHelperDirectiveAttributeSyntax.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.tspans.txt diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorBuilderExtensions.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorBuilderExtensions.cs index d253429102..ac01e48aa1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorBuilderExtensions.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNetCore.Razor.Language.Components; namespace Microsoft.AspNetCore.Razor.Language { @@ -52,6 +53,18 @@ namespace Microsoft.AspNetCore.Razor.Language builder.IndexerValueTypeName = valueTypeName; } + public static bool IsDirectiveAttribute(this BoundAttributeDescriptorBuilder builder) + { + if (builder == null) + { + throw new ArgumentNullException(nameof(builder)); + } + + return + builder.Metadata.TryGetValue(ComponentMetadata.Common.DirectiveAttribute, out var value) && + string.Equals(bool.TrueString, value); + } + public static void SetPropertyName(this BoundAttributeParameterDescriptorBuilder builder, string propertyName) { if (builder == null) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorExtensions.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorExtensions.cs index 5b5fbbf1ea..42a83b368c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorExtensions.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/BoundAttributeDescriptorExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Components; namespace Microsoft.AspNetCore.Razor.Language { @@ -51,6 +51,18 @@ namespace Microsoft.AspNetCore.Razor.Language return isIndexerNameMatch && attribute.IsIndexerBooleanProperty; } + internal static bool IsDirectiveAttribute(this BoundAttributeDescriptor attribute) + { + if (attribute == null) + { + throw new ArgumentNullException(nameof(attribute)); + } + + return + attribute.Metadata.TryGetValue(ComponentMetadata.Common.DirectiveAttribute, out var value) && + string.Equals(bool.TrueString, value); + } + public static bool IsDefaultKind(this BoundAttributeParameterDescriptor parameter) { if (parameter == null) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ClassifiedSpanVisitor.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ClassifiedSpanVisitor.cs index 73f5d1fa11..81edb96152 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ClassifiedSpanVisitor.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ClassifiedSpanVisitor.cs @@ -140,9 +140,11 @@ namespace Microsoft.AspNetCore.Razor.Language { foreach (var child in node.Attributes) { - if (child is MarkupTagHelperAttributeSyntax attribute) + if (child is MarkupTagHelperAttributeSyntax || + child is MarkupTagHelperDirectiveAttributeSyntax || + child is MarkupMinimizedTagHelperDirectiveAttributeSyntax) { - Visit(attribute); + Visit(child); } } } @@ -169,6 +171,19 @@ namespace Microsoft.AspNetCore.Razor.Language Visit(node.Value); } + public override void VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + Visit(node.Transition); + Visit(node.Colon); + Visit(node.Value); + } + + public override void VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + Visit(node.Transition); + Visit(node.Colon); + } + public override void VisitMarkupMinimizedAttributeBlock(MarkupMinimizedAttributeBlockSyntax node) { WriteBlock(node, BlockKindInternal.Markup, n => diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx index 016d32c0c5..8b9c27a0de 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx @@ -139,13 +139,13 @@ Specifies a format to convert the value specified by the '{0}' attribute. The format string can currently only be used with expressions of type <code>DateTime</code>. - Binds the provided expression to an attribute and a change event, based on the naming of the bind attribute. For example: <code>bind-value="..."</code> and <code>bind-value:event="onchange"</code> will assign the current value of the expression to the 'value' attribute, and assign a delegate that attempts to set the value to the 'onchange' attribute. + Binds the provided expression to an attribute and a change event, based on the naming of the bind attribute. For example: <code>@bind-value="..."</code> and <code>@bind-value:event="onchange"</code> will assign the current value of the expression to the 'value' attribute, and assign a delegate that attempts to set the value to the 'onchange' attribute. Specifies the event handler name to attach for change notifications for the value provided by the '{0}' attribute. - Specifies a format to convert the value specified by the corresponding bind attribute. For example: <code>bind-value:format="..."</code> will apply a format string to the value specified in <code>bind-value="..."</code>. The format string can currently only be used with expressions of type <code>DateTime</code>. + Specifies a format to convert the value specified by the corresponding bind attribute. For example: <code>@bind-value:format="..."</code> will apply a format string to the value specified in <code>@bind-value="..."</code>. The format string can currently only be used with expressions of type <code>DateTime</code>. Specifies the parameter name for the '{0}' child content expression. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentBindLoweringPass.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentBindLoweringPass.cs index 990c3d35f5..c2d601dfc5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentBindLoweringPass.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentBindLoweringPass.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components return; } - // For each bind *usage* we need to rewrite the tag helper node to map to basic constructs. + // For each @bind *usage* we need to rewrite the tag helper node to map to basic constructs. var references = documentNode.FindDescendantReferences(); var parameterReferences = documentNode.FindDescendantReferences(); @@ -47,10 +47,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Components ProcessDuplicates(parent); } - // First, collect all the non-parameterized bind or bind-* attributes. + // First, collect all the non-parameterized @bind or @bind-* attributes. // The dict key is a tuple of (parent, attributeName) to differentiate attributes with the same name in two different elements. // We don't have to worry about duplicate bound attributes in the same element - // like, , because IR lowering takes care of that. + // like, , because IR lowering takes care of that. var bindEntries = new Dictionary<(IntermediateNode, string), BindEntry>(); for (var i = 0; i < references.Count; i++) { @@ -64,13 +64,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Components continue; } - if (node.TagHelper.IsBindTagHelper() && node.AttributeName.StartsWith("bind")) + if (node.TagHelper.IsBindTagHelper() && node.IsDirectiveAttribute) { bindEntries[(parent, node.AttributeName)] = new BindEntry(reference); } } - // Now collect all the parameterized attributes and store them along with their corresponding bind or bind-* attributes. + // Now collect all the parameterized attributes and store them along with their corresponding @bind or @bind-* attributes. for (var i = 0; i < parameterReferences.Count; i++) { var parameterReference = parameterReferences[i]; @@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components continue; } - if (node.TagHelper.IsBindTagHelper() && node.AttributeName.StartsWith("bind")) + if (node.TagHelper.IsBindTagHelper() && node.IsDirectiveAttribute) { // Check if this tag contains a corresponding non-parameterized bind node. if (!bindEntries.TryGetValue((parent, node.AttributeNameWithoutParameter), out var entry)) @@ -183,7 +183,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components } } - // Also treat the general as a 'fallback' for that case and remove it. + // Also treat the general as a 'fallback' for that case and remove it. // This is a workaround for a limitation where you can't write a tag helper that binds only // when a specific attribute is **not** present. if (attribute != null && @@ -246,10 +246,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Components // For the nodes that are related to the bind-attribute rewrite them to look like a set of // 'normal' HTML attributes similar to the following transformation. // - // Input: + // Input: // Output: // - // This means that the expression that appears inside of 'bind' must be an LValue or else + // This means that the expression that appears inside of '@bind' must be an LValue or else // there will be errors. In general the errors that come from C# in this case are good enough // to understand the problem. // @@ -463,7 +463,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components valueAttributeName = null; changeAttributeName = null; - if (!attributeName.StartsWith("bind")) + if (!attributeName.StartsWith("@bind")) { return false; } @@ -473,7 +473,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components changeAttributeName = GetAttributeContent(bindEntry.BindEventNode)?.Content?.Trim('"'); } - if (attributeName == "bind") + if (attributeName == "@bind") { return true; } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs index 74ceb8c236..3e7666a021 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs @@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components continue; } - if (node.TagHelper.IsEventHandlerTagHelper()) + if (node.TagHelper.IsEventHandlerTagHelper() && node.IsDirectiveAttribute) { reference.Replace(RewriteUsage(reference.Parent, node)); } @@ -147,6 +147,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Components tokens.Insert(i + 1, original[i]); } + var attributeName = node.AttributeName; + if (node.IsDirectiveAttribute && attributeName.StartsWith("@")) + { + // Directive attributes start with a "@" but we don't want that to be included in the output attribute name. + // E.g, should result in the creation of 'onclick' attribute. + attributeName = attributeName.Substring(1); + } if (parent is MarkupElementIntermediateNode) { var result = new HtmlAttributeIntermediateNode() @@ -155,10 +162,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Components { [ComponentMetadata.Common.OriginalAttributeName] = node.AttributeName, }, - AttributeName = node.AttributeName, + AttributeName = attributeName, Source = node.Source, - Prefix = node.AttributeName + "=\"", + Prefix = attributeName + "=\"", Suffix = "\"", }; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentKeyLoweringPass.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentKeyLoweringPass.cs index 7dad9740d5..d4394a04f5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentKeyLoweringPass.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentKeyLoweringPass.cs @@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components var reference = references[i]; var node = (TagHelperPropertyIntermediateNode)reference.Node; - if (node.TagHelper.IsKeyTagHelper()) + if (node.TagHelper.IsKeyTagHelper() && node.IsDirectiveAttribute) { reference.Replace(RewriteUsage(reference.Parent, node)); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentMetadata.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentMetadata.cs index dc620c8f4f..217ae776e6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentMetadata.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentMetadata.cs @@ -50,6 +50,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Components public static class Common { public static readonly string OriginalAttributeName = "Common.OriginalAttributeName"; + + public static readonly string DirectiveAttribute = "Common.DirectiveAttribute"; } public static class Bind diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentReferenceCaptureLoweringPass.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentReferenceCaptureLoweringPass.cs index aa66e07c8d..a962b96f72 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentReferenceCaptureLoweringPass.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentReferenceCaptureLoweringPass.cs @@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components var reference = references[i]; var node = (TagHelperPropertyIntermediateNode)reference.Node; - if (node.TagHelper.IsRefTagHelper()) + if (node.TagHelper.IsRefTagHelper() && node.IsDirectiveAttribute) { reference.Replace(RewriteUsage(@class, reference.Parent, node)); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultBoundAttributeDescriptorBuilder.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultBoundAttributeDescriptorBuilder.cs index 8bf57e156a..a44c2570db 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultBoundAttributeDescriptorBuilder.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultBoundAttributeDescriptorBuilder.cs @@ -158,6 +158,7 @@ namespace Microsoft.AspNetCore.Razor.Language // data-* attributes are explicitly not implemented by user agents and are not intended for use on // the server; therefore it's invalid for TagHelpers to bind to them. const string DataDashPrefix = "data-"; + var isDirectiveAttribute = this.IsDirectiveAttribute(); if (string.IsNullOrWhiteSpace(Name)) { @@ -182,14 +183,29 @@ namespace Microsoft.AspNetCore.Razor.Language yield return diagnostic; } - foreach (var character in Name) + var name = Name; + if (isDirectiveAttribute && name.StartsWith("@")) + { + name = name.Substring(1); + } + else if (isDirectiveAttribute) + { + var diagnostic = RazorDiagnosticFactory.CreateTagHelper_InvalidBoundDirectiveAttributeName( + _parent.GetDisplayName(), + GetDisplayName(), + Name); + + yield return diagnostic; + } + + foreach (var character in name) { if (char.IsWhiteSpace(character) || HtmlConventions.InvalidNonWhitespaceHtmlCharacters.Contains(character)) { var diagnostic = RazorDiagnosticFactory.CreateTagHelper_InvalidBoundAttributeName( _parent.GetDisplayName(), GetDisplayName(), - Name, + name, character); yield return diagnostic; @@ -218,14 +234,29 @@ namespace Microsoft.AspNetCore.Razor.Language } else { - foreach (var character in IndexerAttributeNamePrefix) + var indexerPrefix = IndexerAttributeNamePrefix; + if (isDirectiveAttribute && indexerPrefix.StartsWith("@")) + { + indexerPrefix = indexerPrefix.Substring(1); + } + else if (isDirectiveAttribute) + { + var diagnostic = RazorDiagnosticFactory.CreateTagHelper_InvalidBoundDirectiveAttributePrefix( + _parent.GetDisplayName(), + GetDisplayName(), + indexerPrefix); + + yield return diagnostic; + } + + foreach (var character in indexerPrefix) { if (char.IsWhiteSpace(character) || HtmlConventions.InvalidNonWhitespaceHtmlCharacters.Contains(character)) { var diagnostic = RazorDiagnosticFactory.CreateTagHelper_InvalidBoundAttributePrefix( _parent.GetDisplayName(), GetDisplayName(), - IndexerAttributeNamePrefix, + indexerPrefix, character); yield return diagnostic; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs index ebbc8b9148..05fd4b54e7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorIntermediateNodeLoweringPhase.cs @@ -1646,7 +1646,10 @@ namespace Microsoft.AspNetCore.Razor.Language { foreach (var child in node.Attributes) { - if (child is MarkupTagHelperAttributeSyntax || child is MarkupMinimizedTagHelperAttributeSyntax) + if (child is MarkupTagHelperAttributeSyntax || + child is MarkupMinimizedTagHelperAttributeSyntax || + child is MarkupTagHelperDirectiveAttributeSyntax || + child is MarkupMinimizedTagHelperDirectiveAttributeSyntax) { Visit(child); } @@ -1672,30 +1675,114 @@ namespace Microsoft.AspNetCore.Razor.Language { foreach (var associatedDescriptor in associatedDescriptors) { - var associatedAttributeDescriptor = associatedDescriptor.BoundAttributes.First(a => + if (TagHelperMatchingConventions.TryGetFirstBoundAttributeMatch( + attributeName, + associatedDescriptor, + out var associatedAttributeDescriptor, + out var indexerMatch, + out _, + out _)) { - return TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, a); - }); + var expectsBooleanValue = associatedAttributeDescriptor.ExpectsBooleanValue(attributeName); - var expectsBooleanValue = associatedAttributeDescriptor.ExpectsBooleanValue(attributeName); + if (!expectsBooleanValue) + { + // We do not allow minimized non-boolean bound attributes. + return; + } - if (!expectsBooleanValue) - { - // We do not allow minimized non-boolean bound attributes. - return; + var setTagHelperProperty = new TagHelperPropertyIntermediateNode() + { + AttributeName = attributeName, + BoundAttribute = associatedAttributeDescriptor, + TagHelper = associatedDescriptor, + AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure, + Source = null, + IsIndexerNameMatch = indexerMatch, + }; + + _builder.Add(setTagHelperProperty); } + } + } + else + { + var addHtmlAttribute = new TagHelperHtmlAttributeIntermediateNode() + { + AttributeName = attributeName, + AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure + }; - var setTagHelperProperty = new TagHelperPropertyIntermediateNode() + _builder.Add(addHtmlAttribute); + } + } + + public override void VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + if (!_featureFlags.AllowMinimizedBooleanTagHelperAttributes) + { + // Minimized attributes are not valid for non-boolean bound attributes. TagHelperBlockRewriter + // has already logged an error if it was a non-boolean bound attribute; so we can skip. + return; + } + + var element = node.FirstAncestorOrSelf(); + var descriptors = element.TagHelperInfo.BindingResult.Descriptors; + var attributeName = node.FullName; + var associatedDescriptors = descriptors.Where(descriptor => + descriptor.BoundAttributes.Any(attributeDescriptor => TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, attributeDescriptor))); + + if (associatedDescriptors.Any() && _renderedBoundAttributeNames.Add(attributeName)) + { + foreach (var associatedDescriptor in associatedDescriptors) + { + if (TagHelperMatchingConventions.TryGetFirstBoundAttributeMatch( + attributeName, + associatedDescriptor, + out var associatedAttributeDescriptor, + out var indexerMatch, + out var parameterMatch, + out var associatedAttributeParameterDescriptor)) { - AttributeName = attributeName, - BoundAttribute = associatedAttributeDescriptor, - TagHelper = associatedDescriptor, - AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure, - Source = null, - IsIndexerNameMatch = TagHelperMatchingConventions.SatisfiesBoundAttributeIndexer(attributeName, associatedAttributeDescriptor), - }; + var expectsBooleanValue = associatedAttributeDescriptor.ExpectsBooleanValue(attributeName); - _builder.Add(setTagHelperProperty); + if (!expectsBooleanValue) + { + // We do not allow minimized non-boolean bound attributes. + return; + } + + IntermediateNode attributeNode; + if (parameterMatch && + TagHelperMatchingConventions.TryGetBoundAttributeParameter(attributeName, out var attributeNameWithoutParameter, out _)) + { + attributeNode = new TagHelperAttributeParameterIntermediateNode() + { + AttributeName = attributeName, + AttributeNameWithoutParameter = attributeNameWithoutParameter, + BoundAttributeParameter = associatedAttributeParameterDescriptor, + BoundAttribute = associatedAttributeDescriptor, + TagHelper = associatedDescriptor, + IsIndexerNameMatch = indexerMatch, + AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure, + Source = null, + }; + } + else + { + attributeNode = new TagHelperPropertyIntermediateNode() + { + AttributeName = attributeName, + BoundAttribute = associatedAttributeDescriptor, + TagHelper = associatedDescriptor, + AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure, + Source = null, + IsIndexerNameMatch = indexerMatch, + }; + } + + _builder.Add(attributeNode); + } } } else @@ -1716,6 +1803,57 @@ namespace Microsoft.AspNetCore.Razor.Language var descriptors = element.TagHelperInfo.BindingResult.Descriptors; var attributeName = node.Name.GetContent(); var attributeValueNode = node.Value; + var associatedDescriptors = descriptors.Where(descriptor => + descriptor.BoundAttributes.Any(attributeDescriptor => TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, attributeDescriptor))); + + if (associatedDescriptors.Any() && _renderedBoundAttributeNames.Add(attributeName)) + { + foreach (var associatedDescriptor in associatedDescriptors) + { + if (TagHelperMatchingConventions.TryGetFirstBoundAttributeMatch( + attributeName, + associatedDescriptor, + out var associatedAttributeDescriptor, + out var indexerMatch, + out _, + out _)) + { + var setTagHelperProperty = new TagHelperPropertyIntermediateNode() + { + AttributeName = attributeName, + BoundAttribute = associatedAttributeDescriptor, + TagHelper = associatedDescriptor, + AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure, + Source = BuildSourceSpanFromNode(attributeValueNode), + IsIndexerNameMatch = indexerMatch, + }; + + _builder.Push(setTagHelperProperty); + VisitAttributeValue(attributeValueNode); + _builder.Pop(); + } + } + } + else + { + var addHtmlAttribute = new TagHelperHtmlAttributeIntermediateNode() + { + AttributeName = attributeName, + AttributeStructure = node.TagHelperAttributeInfo.AttributeStructure + }; + + _builder.Push(addHtmlAttribute); + VisitAttributeValue(attributeValueNode); + _builder.Pop(); + } + } + + public override void VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + var element = node.FirstAncestorOrSelf(); + var descriptors = element.TagHelperInfo.BindingResult.Descriptors; + var attributeName = node.FullName; + var attributeValueNode = node.Value; var associatedDescriptors = descriptors.Where(descriptor => descriptor.BoundAttributes.Any(attributeDescriptor => TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, attributeDescriptor))); @@ -1734,7 +1872,7 @@ namespace Microsoft.AspNetCore.Razor.Language { IntermediateNode attributeNode; if (parameterMatch && - TagHelperMatchingConventions.TryGetBoundAttributeParameter(attributeName, out var attributeNameWithoutParameter, out var _)) + TagHelperMatchingConventions.TryGetBoundAttributeParameter(attributeName, out var attributeNameWithoutParameter, out _)) { attributeNode = new TagHelperAttributeParameterIntermediateNode() { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptor.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptor.cs index 8802abcf7a..13228d130b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptor.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptor.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Collections.Generic; + namespace Microsoft.AspNetCore.Razor.Language { internal class DefaultRequiredAttributeDescriptor : RequiredAttributeDescriptor @@ -11,7 +13,8 @@ namespace Microsoft.AspNetCore.Razor.Language string value, ValueComparisonMode valueComparison, string displayName, - RazorDiagnostic[] diagnostics) + RazorDiagnostic[] diagnostics, + Dictionary metadata) { Name = name; NameComparison = nameComparison; @@ -19,6 +22,7 @@ namespace Microsoft.AspNetCore.Razor.Language ValueComparison = valueComparison; DisplayName = displayName; Diagnostics = diagnostics; + Metadata = metadata; } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptorBuilder.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptorBuilder.cs index 5b611b7b20..a3e7472598 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptorBuilder.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRequiredAttributeDescriptorBuilder.cs @@ -10,6 +10,7 @@ namespace Microsoft.AspNetCore.Razor.Language internal class DefaultRequiredAttributeDescriptorBuilder : RequiredAttributeDescriptorBuilder { private RazorDiagnosticCollection _diagnostics; + private readonly Dictionary _metadata = new Dictionary(); public override string Name { get; set; } @@ -32,6 +33,8 @@ namespace Microsoft.AspNetCore.Razor.Language } } + public override IDictionary Metadata => _metadata; + public RequiredAttributeDescriptor Build() { var validationDiagnostics = Validate(); @@ -41,18 +44,24 @@ namespace Microsoft.AspNetCore.Razor.Language diagnostics.UnionWith(_diagnostics); } - var displayName = NameComparisonMode == RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch ? string.Concat(Name, "...") : Name; + var displayName = GetDisplayName(); var rule = new DefaultRequiredAttributeDescriptor( Name, NameComparisonMode, Value, ValueComparisonMode, displayName, - diagnostics?.ToArray() ?? Array.Empty()); + diagnostics?.ToArray() ?? Array.Empty(), + new Dictionary(Metadata)); return rule; } + private string GetDisplayName() + { + return NameComparisonMode == RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch ? string.Concat(Name, "...") : Name; + } + private IEnumerable Validate() { if (string.IsNullOrWhiteSpace(Name)) @@ -63,7 +72,20 @@ namespace Microsoft.AspNetCore.Razor.Language } else { - foreach (var character in Name) + var name = Name; + var isDirectiveAttribute = this.IsDirectiveAttribute(); + if (isDirectiveAttribute && name.StartsWith("@")) + { + name = name.Substring(1); + } + else if (isDirectiveAttribute) + { + var diagnostic = RazorDiagnosticFactory.CreateTagHelper_InvalidRequiredDirectiveAttributeName(GetDisplayName(), Name); + + yield return diagnostic; + } + + foreach (var character in name) { if (char.IsWhiteSpace(character) || HtmlConventions.InvalidNonWhitespaceHtmlCharacters.Contains(character)) { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/ComponentAttributeIntermediateNode.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/ComponentAttributeIntermediateNode.cs index d5b94bde14..2d2766b7b3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/ComponentAttributeIntermediateNode.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/ComponentAttributeIntermediateNode.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Razor.Language.CodeGeneration; using Microsoft.AspNetCore.Razor.Language.Components; namespace Microsoft.AspNetCore.Razor.Language.Intermediate @@ -42,7 +41,15 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate throw new ArgumentNullException(nameof(propertyNode)); } - AttributeName = propertyNode.AttributeName; + var attributeName = propertyNode.AttributeName; + if (propertyNode.IsDirectiveAttribute && attributeName.StartsWith("@")) + { + // Directive attributes start with a "@" but we don't want that to be included in the output attribute name. + // E.g, should result in the creation of 'onclick' attribute. + attributeName = attributeName.Substring(1); + } + + AttributeName = attributeName; AttributeStructure = propertyNode.AttributeStructure; BoundAttribute = propertyNode.BoundAttribute; PropertyName = propertyNode.BoundAttribute.GetPropertyName(); diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperAttributeParameterIntermediateNode.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperAttributeParameterIntermediateNode.cs index 91466e44b0..06d03f5c3b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperAttributeParameterIntermediateNode.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperAttributeParameterIntermediateNode.cs @@ -23,6 +23,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate public bool IsIndexerNameMatch { get; set; } + public bool IsDirectiveAttribute => BoundAttribute?.IsDirectiveAttribute() ?? false; + public override void Accept(IntermediateNodeVisitor visitor) { if (visitor == null) @@ -41,6 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate formatter.WriteProperty(nameof(AttributeStructure), AttributeStructure.ToString()); formatter.WriteProperty(nameof(BoundAttribute), BoundAttribute?.DisplayName); formatter.WriteProperty(nameof(BoundAttributeParameter), BoundAttributeParameter?.DisplayName); + formatter.WriteProperty(nameof(IsDirectiveAttribute), IsDirectiveAttribute.ToString()); formatter.WriteProperty(nameof(TagHelper), TagHelper?.DisplayName); } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperPropertyIntermediateNode.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperPropertyIntermediateNode.cs index 1a755fe6f9..409c86014f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperPropertyIntermediateNode.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Intermediate/TagHelperPropertyIntermediateNode.cs @@ -19,6 +19,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate public bool IsIndexerNameMatch { get; set; } + public bool IsDirectiveAttribute => BoundAttribute?.IsDirectiveAttribute() ?? false; + public override void Accept(IntermediateNodeVisitor visitor) { if (visitor == null) @@ -36,6 +38,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate formatter.WriteProperty(nameof(AttributeName), AttributeName); formatter.WriteProperty(nameof(AttributeStructure), AttributeStructure.ToString()); formatter.WriteProperty(nameof(BoundAttribute), BoundAttribute?.DisplayName); + formatter.WriteProperty(nameof(IsDirectiveAttribute), IsDirectiveAttribute.ToString()); formatter.WriteProperty(nameof(IsIndexerNameMatch), IsIndexerNameMatch.ToString()); formatter.WriteProperty(nameof(TagHelper), TagHelper?.DisplayName); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs index 8e58813518..ed3e705216 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs @@ -1088,8 +1088,15 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy private bool TryParseAttributeName(out IEnumerable nameTokens) { nameTokens = Enumerable.Empty(); - if (At(SyntaxKind.Transition) || At(SyntaxKind.RazorCommentTransition)) + // + // We are currently here + // If we encounter a transition (@) here, it can be parsed as CSharp or Markup depending on the feature flag. + // For example, in Components, we want to parse it as Markup so we can support directive attributes. + // + if (Context.FeatureFlags.AllowCSharpInMarkupAttributeArea && + (At(SyntaxKind.Transition) || At(SyntaxKind.RazorCommentTransition))) { + // If we get here, there is CSharp in the attribute area. Don't try to parse the name. return false; } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/TagHelperBlockRewriter.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/TagHelperBlockRewriter.cs index 1516bfc4c3..d2dc97749d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/TagHelperBlockRewriter.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/TagHelperBlockRewriter.cs @@ -176,16 +176,27 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy var result = CreateTryParseResult(attributeBlock.Name.GetContent(), descriptors, processedBoundAttributeNames); result.AttributeStructure = AttributeStructure.Minimized; - var rewritten = SyntaxFactory.MarkupMinimizedTagHelperAttribute( - attributeBlock.NamePrefix, - attributeBlock.Name); - rewritten = rewritten.WithTagHelperAttributeInfo( - new TagHelperAttributeInfo(result.AttributeName, result.AttributeStructure, result.IsBoundAttribute)); + if (result.IsDirectiveAttribute) + { + // Directive attributes have a different syntax. + result.RewrittenAttribute = RewriteToMinimizedDirectiveAttribute(attributeBlock, result); - result.RewrittenAttribute = rewritten; + return result; + } + else + { + var rewritten = SyntaxFactory.MarkupMinimizedTagHelperAttribute( + attributeBlock.NamePrefix, + attributeBlock.Name); - return result; + rewritten = rewritten.WithTagHelperAttributeInfo( + new TagHelperAttributeInfo(result.AttributeName, parameterName: null, result.AttributeStructure, result.IsBoundAttribute, isDirectiveAttribute: false)); + + result.RewrittenAttribute = rewritten; + + return result; + } } private static TryParseResult TryParseAttribute( @@ -238,9 +249,84 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy } var rewrittenValue = RewriteAttributeValue(result, attributeValue); - var rewritten = SyntaxFactory.MarkupTagHelperAttribute( + if (result.IsDirectiveAttribute) + { + // Directive attributes have a different syntax. + result.RewrittenAttribute = RewriteToDirectiveAttribute(attributeBlock, result, rewrittenValue); + + return result; + } + else + { + var rewritten = SyntaxFactory.MarkupTagHelperAttribute( + attributeBlock.NamePrefix, + attributeBlock.Name, + attributeBlock.NameSuffix, + attributeBlock.EqualsToken, + attributeBlock.ValuePrefix, + rewrittenValue, + attributeBlock.ValueSuffix); + + rewritten = rewritten.WithTagHelperAttributeInfo( + new TagHelperAttributeInfo(result.AttributeName, parameterName: null, result.AttributeStructure, result.IsBoundAttribute, isDirectiveAttribute: false)); + + + result.RewrittenAttribute = rewritten; + + return result; + } + } + + private static MarkupTagHelperDirectiveAttributeSyntax RewriteToDirectiveAttribute( + MarkupAttributeBlockSyntax attributeBlock, + TryParseResult result, + MarkupTagHelperAttributeValueSyntax rewrittenValue) + { + // + // Consider, + // We're now going to rewrite @bind:param from a regular MarkupAttributeBlock to a MarkupTagHelperDirectiveAttribute. + // We need to split the name "@bind:param" into four parts, + // @ - Transition (MetaCode) + // bind - Name (Text) + // : - Colon (MetaCode) + // param - ParameterName (Text) + // + var attributeName = result.AttributeName; + var attributeNameSyntax = attributeBlock.Name; + var transition = SyntaxFactory.RazorMetaCode( + new SyntaxList(SyntaxFactory.MissingToken(SyntaxKind.Transition))); + RazorMetaCodeSyntax colon = null; + MarkupTextLiteralSyntax parameterName = null; + if (attributeName.StartsWith("@")) + { + attributeName = attributeName.Substring(1); + var attributeNameToken = SyntaxFactory.Token(SyntaxKind.Text, attributeName); + attributeNameSyntax = SyntaxFactory.MarkupTextLiteral().AddLiteralTokens(attributeNameToken); + + var transitionToken = SyntaxFactory.Token(SyntaxKind.Transition, "@"); + transition = SyntaxFactory.RazorMetaCode(new SyntaxList(transitionToken)); + } + + if (attributeName.IndexOf(':') != -1) + { + var segments = attributeName.Split(new[] { ':' }, 2); + + var attributeNameToken = SyntaxFactory.Token(SyntaxKind.Text, segments[0]); + attributeNameSyntax = SyntaxFactory.MarkupTextLiteral().AddLiteralTokens(attributeNameToken); + + var colonToken = SyntaxFactory.Token(SyntaxKind.Colon, ":"); + colon = SyntaxFactory.RazorMetaCode(new SyntaxList(colonToken)); + + var parameterNameToken = SyntaxFactory.Token(SyntaxKind.Text, segments[1]); + parameterName = SyntaxFactory.MarkupTextLiteral().AddLiteralTokens(parameterNameToken); + } + + var rewritten = SyntaxFactory.MarkupTagHelperDirectiveAttribute( attributeBlock.NamePrefix, - attributeBlock.Name, + transition, + attributeNameSyntax, + colon, + parameterName, attributeBlock.NameSuffix, attributeBlock.EqualsToken, attributeBlock.ValuePrefix, @@ -248,11 +334,65 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy attributeBlock.ValueSuffix); rewritten = rewritten.WithTagHelperAttributeInfo( - new TagHelperAttributeInfo(result.AttributeName, result.AttributeStructure, result.IsBoundAttribute)); + new TagHelperAttributeInfo(result.AttributeName, parameterName?.GetContent(), result.AttributeStructure, result.IsBoundAttribute, isDirectiveAttribute: true)); - result.RewrittenAttribute = rewritten; + return rewritten; + } - return result; + private static MarkupMinimizedTagHelperDirectiveAttributeSyntax RewriteToMinimizedDirectiveAttribute( + MarkupMinimizedAttributeBlockSyntax attributeBlock, + TryParseResult result) + { + // + // Consider, + // We're now going to rewrite @bind:param from a regular MarkupAttributeBlock to a MarkupTagHelperDirectiveAttribute. + // We need to split the name "@bind:param" into four parts, + // @ - Transition (MetaCode) + // bind - Name (Text) + // : - Colon (MetaCode) + // param - ParameterName (Text) + // + var attributeName = result.AttributeName; + var attributeNameSyntax = attributeBlock.Name; + var transition = SyntaxFactory.RazorMetaCode( + new SyntaxList(SyntaxFactory.MissingToken(SyntaxKind.Transition))); + RazorMetaCodeSyntax colon = null; + MarkupTextLiteralSyntax parameterName = null; + if (attributeName.StartsWith("@")) + { + attributeName = attributeName.Substring(1); + var attributeNameToken = SyntaxFactory.Token(SyntaxKind.Text, attributeName); + attributeNameSyntax = SyntaxFactory.MarkupTextLiteral().AddLiteralTokens(attributeNameToken); + + var transitionToken = SyntaxFactory.Token(SyntaxKind.Transition, "@"); + transition = SyntaxFactory.RazorMetaCode(new SyntaxList(transitionToken)); + } + + if (attributeName.IndexOf(':') != -1) + { + var segments = attributeName.Split(new[] { ':' }, 2); + + var attributeNameToken = SyntaxFactory.Token(SyntaxKind.Text, segments[0]); + attributeNameSyntax = SyntaxFactory.MarkupTextLiteral().AddLiteralTokens(attributeNameToken); + + var colonToken = SyntaxFactory.Token(SyntaxKind.Colon, ":"); + colon = SyntaxFactory.RazorMetaCode(new SyntaxList(colonToken)); + + var parameterNameToken = SyntaxFactory.Token(SyntaxKind.Text, segments[1]); + parameterName = SyntaxFactory.MarkupTextLiteral().AddLiteralTokens(parameterNameToken); + } + + var rewritten = SyntaxFactory.MarkupMinimizedTagHelperDirectiveAttribute( + attributeBlock.NamePrefix, + transition, + attributeNameSyntax, + colon, + parameterName); + + rewritten = rewritten.WithTagHelperAttributeInfo( + new TagHelperAttributeInfo(result.AttributeName, parameterName?.GetContent(), result.AttributeStructure, result.IsBoundAttribute, isDirectiveAttribute: true)); + + return rewritten; } private static MarkupTagHelperAttributeValueSyntax RewriteAttributeValue(TryParseResult result, RazorBlockSyntax attributeValue) @@ -301,6 +441,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy var isBoundNonStringAttribute = false; var isBoundBooleanAttribute = false; var isMissingDictionaryKey = false; + var isDirectiveAttribute = false; foreach (var descriptor in descriptors) { @@ -327,6 +468,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy name.Length == firstBoundAttribute.IndexerNamePrefix.Length; } + isDirectiveAttribute = firstBoundAttribute.IsDirectiveAttribute(); + break; } } @@ -345,7 +488,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy IsBoundNonStringAttribute = isBoundNonStringAttribute, IsBoundBooleanAttribute = isBoundBooleanAttribute, IsMissingDictionaryKey = isMissingDictionaryKey, - IsDuplicateAttribute = isDuplicateAttribute + IsDuplicateAttribute = isDuplicateAttribute, + IsDirectiveAttribute = isDirectiveAttribute }; } @@ -355,6 +499,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy { return tagHelperAttribute.Value?.GetContent(); } + else if (attributeBlock is MarkupTagHelperDirectiveAttributeSyntax directiveAttribute) + { + return directiveAttribute.Value?.GetContent(); + } else if (attributeBlock is MarkupAttributeBlockSyntax attribute) { return attribute.Value?.GetContent(); @@ -666,6 +814,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy public bool IsMissingDictionaryKey { get; set; } public bool IsDuplicateAttribute { get; set; } + + public bool IsDirectiveAttribute { get; set; } } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorDiagnosticFactory.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorDiagnosticFactory.cs index e1e1c9d621..1617fc417c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorDiagnosticFactory.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorDiagnosticFactory.cs @@ -824,6 +824,64 @@ namespace Microsoft.AspNetCore.Razor.Language return diagnostic; } + internal static readonly RazorDiagnosticDescriptor TagHelper_InvalidBoundDirectiveAttributeName = + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}3015", + () => Resources.TagHelper_InvalidBoundDirectiveAttributeName, + RazorDiagnosticSeverity.Error); + public static RazorDiagnostic CreateTagHelper_InvalidBoundDirectiveAttributeName( + string tagHelperDisplayName, + string propertyDisplayName, + string invalidName) + { + var diagnostic = RazorDiagnostic.Create( + TagHelper_InvalidBoundDirectiveAttributeName, + new SourceSpan(SourceLocation.Undefined, contentLength: 0), + tagHelperDisplayName, + propertyDisplayName, + invalidName); + + return diagnostic; + } + + internal static readonly RazorDiagnosticDescriptor TagHelper_InvalidBoundDirectiveAttributePrefix = + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}3015", + () => Resources.TagHelper_InvalidBoundDirectiveAttributePrefix, + RazorDiagnosticSeverity.Error); + public static RazorDiagnostic CreateTagHelper_InvalidBoundDirectiveAttributePrefix( + string tagHelperDisplayName, + string propertyDisplayName, + string invalidName) + { + var diagnostic = RazorDiagnostic.Create( + TagHelper_InvalidBoundDirectiveAttributePrefix, + new SourceSpan(SourceLocation.Undefined, contentLength: 0), + tagHelperDisplayName, + propertyDisplayName, + invalidName); + + return diagnostic; + } + + internal static readonly RazorDiagnosticDescriptor TagHelper_InvalidRequiredDirectiveAttributeName = + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}3016", + () => Resources.TagHelper_InvalidRequiredDirectiveAttributeName, + RazorDiagnosticSeverity.Error); + public static RazorDiagnostic CreateTagHelper_InvalidRequiredDirectiveAttributeName( + string propertyDisplayName, + string invalidName) + { + var diagnostic = RazorDiagnostic.Create( + TagHelper_InvalidRequiredDirectiveAttributeName, + new SourceSpan(SourceLocation.Undefined, contentLength: 0), + propertyDisplayName, + invalidName); + + return diagnostic; + } + #endregion #region Rewriter Errors diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorParserFeatureFlags.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorParserFeatureFlags.cs index 9c8fd6276f..6bc236aada 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorParserFeatureFlags.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorParserFeatureFlags.cs @@ -20,6 +20,7 @@ namespace Microsoft.AspNetCore.Razor.Language var allowRazorInAllCodeBlocks = false; var allowUsingVariableDeclarations = false; var allowConditionalDataDashAttributes = false; + var allowCSharpInMarkupAttributeArea = true; if (version.CompareTo(RazorLanguageVersion.Version_2_1) >= 0) { @@ -39,6 +40,7 @@ namespace Microsoft.AspNetCore.Razor.Language if (FileKinds.IsComponent(fileKind)) { allowConditionalDataDashAttributes = true; + allowCSharpInMarkupAttributeArea = false; } if (version.CompareTo(RazorLanguageVersion.Experimental) >= 0) @@ -52,7 +54,8 @@ namespace Microsoft.AspNetCore.Razor.Language allowComponentFileKind, allowRazorInAllCodeBlocks, allowUsingVariableDeclarations, - allowConditionalDataDashAttributes); + allowConditionalDataDashAttributes, + allowCSharpInMarkupAttributeArea); } public abstract bool AllowMinimizedBooleanTagHelperAttributes { get; } @@ -67,6 +70,8 @@ namespace Microsoft.AspNetCore.Razor.Language public abstract bool AllowConditionalDataDashAttributes { get; } + public abstract bool AllowCSharpInMarkupAttributeArea { get; } + private class DefaultRazorParserFeatureFlags : RazorParserFeatureFlags { public DefaultRazorParserFeatureFlags( @@ -75,7 +80,8 @@ namespace Microsoft.AspNetCore.Razor.Language bool allowComponentFileKind, bool allowRazorInAllCodeBlocks, bool allowUsingVariableDeclarations, - bool allowConditionalDataDashAttributesInComponents) + bool allowConditionalDataDashAttributesInComponents, + bool allowCSharpInMarkupAttributeArea) { AllowMinimizedBooleanTagHelperAttributes = allowMinimizedBooleanTagHelperAttributes; AllowHtmlCommentsInTagHelpers = allowHtmlCommentsInTagHelpers; @@ -83,6 +89,7 @@ namespace Microsoft.AspNetCore.Razor.Language AllowRazorInAllCodeBlocks = allowRazorInAllCodeBlocks; AllowUsingVariableDeclarations = allowUsingVariableDeclarations; AllowConditionalDataDashAttributes = allowConditionalDataDashAttributesInComponents; + AllowCSharpInMarkupAttributeArea = allowCSharpInMarkupAttributeArea; } public override bool AllowMinimizedBooleanTagHelperAttributes { get; } @@ -96,6 +103,8 @@ namespace Microsoft.AspNetCore.Razor.Language public override bool AllowUsingVariableDeclarations { get; } public override bool AllowConditionalDataDashAttributes { get; } + + public override bool AllowCSharpInMarkupAttributeArea { get; } } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptor.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptor.cs index ce8bdca365..5f68eea115 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptor.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptor.cs @@ -21,6 +21,8 @@ namespace Microsoft.AspNetCore.Razor.Language public IReadOnlyList Diagnostics { get; protected set; } + public IReadOnlyDictionary Metadata { get; protected set; } + public bool HasErrors { get diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilder.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilder.cs index 5cf368422f..11973c25f9 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilder.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilder.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Collections.Generic; + namespace Microsoft.AspNetCore.Razor.Language { public abstract class RequiredAttributeDescriptorBuilder @@ -14,5 +16,7 @@ namespace Microsoft.AspNetCore.Razor.Language public abstract RequiredAttributeDescriptor.ValueComparisonMode ValueComparisonMode { get; set; } public abstract RazorDiagnosticCollection Diagnostics { get; } + + public virtual IDictionary Metadata { get; } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilderExtensions.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilderExtensions.cs new file mode 100644 index 0000000000..0251b5b38b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorBuilderExtensions.cs @@ -0,0 +1,23 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Components; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public static class RequiredAttributeDescriptorBuilderExtensions + { + internal static bool IsDirectiveAttribute(this RequiredAttributeDescriptorBuilder builder) + { + if (builder == null) + { + throw new ArgumentNullException(nameof(builder)); + } + + return + builder.Metadata.TryGetValue(ComponentMetadata.Common.DirectiveAttribute, out var value) && + string.Equals(bool.TrueString, value); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorExtensions.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorExtensions.cs new file mode 100644 index 0000000000..f9845b0d7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/RequiredAttributeDescriptorExtensions.cs @@ -0,0 +1,23 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Components; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public static class RequiredAttributeDescriptorExtensions + { + public static bool IsDirectiveAttribute(this RequiredAttributeDescriptor descriptor) + { + if (descriptor == null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return + descriptor.Metadata.TryGetValue(ComponentMetadata.Common.DirectiveAttribute, out var value) && + string.Equals(bool.TrueString, value); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Resources.resx b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Resources.resx index b50fe38e29..33c63d93c2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Resources.resx +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Resources.resx @@ -550,4 +550,13 @@ The '{0}' directive expects a C# attribute. + + Invalid tag helper bound directive attribute '{1}' on tag helper '{0}'. The directive attribute '{2}' should start with a '@' character. + + + Invalid tag helper bound directive attribute '{1}' on tag helper '{0}'. Tag helpers cannot bind to directive attributes with prefix '{2}' because the prefix doesn't start with a '@' character. + + + Invalid tag helper required directive attribute '{0}'. The directive attribute '{1}' should start with a '@' character. + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Internal.Generated.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Internal.Generated.cs index 4fe3309e14..d6ce1393ee 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Internal.Generated.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Internal.Generated.cs @@ -2376,6 +2376,301 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax } } + internal sealed partial class MarkupTagHelperDirectiveAttributeSyntax : MarkupSyntaxNode + { + private readonly MarkupTextLiteralSyntax _namePrefix; + private readonly RazorMetaCodeSyntax _transition; + private readonly MarkupTextLiteralSyntax _name; + private readonly RazorMetaCodeSyntax _colon; + private readonly MarkupTextLiteralSyntax _parameterName; + private readonly MarkupTextLiteralSyntax _nameSuffix; + private readonly SyntaxToken _equalsToken; + private readonly MarkupTextLiteralSyntax _valuePrefix; + private readonly MarkupTagHelperAttributeValueSyntax _value; + private readonly MarkupTextLiteralSyntax _valueSuffix; + + internal MarkupTagHelperDirectiveAttributeSyntax(SyntaxKind kind, MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, SyntaxToken equalsToken, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix, RazorDiagnostic[] diagnostics, SyntaxAnnotation[] annotations) + : base(kind, diagnostics, annotations) + { + SlotCount = 10; + if (namePrefix != null) + { + AdjustFlagsAndWidth(namePrefix); + _namePrefix = namePrefix; + } + AdjustFlagsAndWidth(transition); + _transition = transition; + AdjustFlagsAndWidth(name); + _name = name; + if (colon != null) + { + AdjustFlagsAndWidth(colon); + _colon = colon; + } + if (parameterName != null) + { + AdjustFlagsAndWidth(parameterName); + _parameterName = parameterName; + } + if (nameSuffix != null) + { + AdjustFlagsAndWidth(nameSuffix); + _nameSuffix = nameSuffix; + } + AdjustFlagsAndWidth(equalsToken); + _equalsToken = equalsToken; + if (valuePrefix != null) + { + AdjustFlagsAndWidth(valuePrefix); + _valuePrefix = valuePrefix; + } + AdjustFlagsAndWidth(value); + _value = value; + if (valueSuffix != null) + { + AdjustFlagsAndWidth(valueSuffix); + _valueSuffix = valueSuffix; + } + } + + + internal MarkupTagHelperDirectiveAttributeSyntax(SyntaxKind kind, MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, SyntaxToken equalsToken, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix) + : base(kind) + { + SlotCount = 10; + if (namePrefix != null) + { + AdjustFlagsAndWidth(namePrefix); + _namePrefix = namePrefix; + } + AdjustFlagsAndWidth(transition); + _transition = transition; + AdjustFlagsAndWidth(name); + _name = name; + if (colon != null) + { + AdjustFlagsAndWidth(colon); + _colon = colon; + } + if (parameterName != null) + { + AdjustFlagsAndWidth(parameterName); + _parameterName = parameterName; + } + if (nameSuffix != null) + { + AdjustFlagsAndWidth(nameSuffix); + _nameSuffix = nameSuffix; + } + AdjustFlagsAndWidth(equalsToken); + _equalsToken = equalsToken; + if (valuePrefix != null) + { + AdjustFlagsAndWidth(valuePrefix); + _valuePrefix = valuePrefix; + } + AdjustFlagsAndWidth(value); + _value = value; + if (valueSuffix != null) + { + AdjustFlagsAndWidth(valueSuffix); + _valueSuffix = valueSuffix; + } + } + + public MarkupTextLiteralSyntax NamePrefix { get { return _namePrefix; } } + public RazorMetaCodeSyntax Transition { get { return _transition; } } + public MarkupTextLiteralSyntax Name { get { return _name; } } + public RazorMetaCodeSyntax Colon { get { return _colon; } } + public MarkupTextLiteralSyntax ParameterName { get { return _parameterName; } } + public MarkupTextLiteralSyntax NameSuffix { get { return _nameSuffix; } } + public SyntaxToken EqualsToken { get { return _equalsToken; } } + public MarkupTextLiteralSyntax ValuePrefix { get { return _valuePrefix; } } + public MarkupTagHelperAttributeValueSyntax Value { get { return _value; } } + public MarkupTextLiteralSyntax ValueSuffix { get { return _valueSuffix; } } + + internal override GreenNode GetSlot(int index) + { + switch (index) + { + case 0: return _namePrefix; + case 1: return _transition; + case 2: return _name; + case 3: return _colon; + case 4: return _parameterName; + case 5: return _nameSuffix; + case 6: return _equalsToken; + case 7: return _valuePrefix; + case 8: return _value; + case 9: return _valueSuffix; + default: return null; + } + } + + internal override SyntaxNode CreateRed(SyntaxNode parent, int position) + { + return new Syntax.MarkupTagHelperDirectiveAttributeSyntax(this, parent, position); + } + + public override TResult Accept(SyntaxVisitor visitor) + { + return visitor.VisitMarkupTagHelperDirectiveAttribute(this); + } + + public override void Accept(SyntaxVisitor visitor) + { + visitor.VisitMarkupTagHelperDirectiveAttribute(this); + } + + public MarkupTagHelperDirectiveAttributeSyntax Update(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, SyntaxToken equalsToken, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix) + { + if (namePrefix != NamePrefix || transition != Transition || name != Name || colon != Colon || parameterName != ParameterName || nameSuffix != NameSuffix || equalsToken != EqualsToken || valuePrefix != ValuePrefix || value != Value || valueSuffix != ValueSuffix) + { + var newNode = SyntaxFactory.MarkupTagHelperDirectiveAttribute(namePrefix, transition, name, colon, parameterName, nameSuffix, equalsToken, valuePrefix, value, valueSuffix); + var diags = GetDiagnostics(); + if (diags != null && diags.Length > 0) + newNode = newNode.WithDiagnosticsGreen(diags); + var annotations = GetAnnotations(); + if (annotations != null && annotations.Length > 0) + newNode = newNode.WithAnnotationsGreen(annotations); + return newNode; + } + + return this; + } + + internal override GreenNode SetDiagnostics(RazorDiagnostic[] diagnostics) + { + return new MarkupTagHelperDirectiveAttributeSyntax(Kind, _namePrefix, _transition, _name, _colon, _parameterName, _nameSuffix, _equalsToken, _valuePrefix, _value, _valueSuffix, diagnostics, GetAnnotations()); + } + + internal override GreenNode SetAnnotations(SyntaxAnnotation[] annotations) + { + return new MarkupTagHelperDirectiveAttributeSyntax(Kind, _namePrefix, _transition, _name, _colon, _parameterName, _nameSuffix, _equalsToken, _valuePrefix, _value, _valueSuffix, GetDiagnostics(), annotations); + } + } + + internal sealed partial class MarkupMinimizedTagHelperDirectiveAttributeSyntax : MarkupSyntaxNode + { + private readonly MarkupTextLiteralSyntax _namePrefix; + private readonly RazorMetaCodeSyntax _transition; + private readonly MarkupTextLiteralSyntax _name; + private readonly RazorMetaCodeSyntax _colon; + private readonly MarkupTextLiteralSyntax _parameterName; + + internal MarkupMinimizedTagHelperDirectiveAttributeSyntax(SyntaxKind kind, MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, RazorDiagnostic[] diagnostics, SyntaxAnnotation[] annotations) + : base(kind, diagnostics, annotations) + { + SlotCount = 5; + if (namePrefix != null) + { + AdjustFlagsAndWidth(namePrefix); + _namePrefix = namePrefix; + } + AdjustFlagsAndWidth(transition); + _transition = transition; + AdjustFlagsAndWidth(name); + _name = name; + if (colon != null) + { + AdjustFlagsAndWidth(colon); + _colon = colon; + } + if (parameterName != null) + { + AdjustFlagsAndWidth(parameterName); + _parameterName = parameterName; + } + } + + + internal MarkupMinimizedTagHelperDirectiveAttributeSyntax(SyntaxKind kind, MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName) + : base(kind) + { + SlotCount = 5; + if (namePrefix != null) + { + AdjustFlagsAndWidth(namePrefix); + _namePrefix = namePrefix; + } + AdjustFlagsAndWidth(transition); + _transition = transition; + AdjustFlagsAndWidth(name); + _name = name; + if (colon != null) + { + AdjustFlagsAndWidth(colon); + _colon = colon; + } + if (parameterName != null) + { + AdjustFlagsAndWidth(parameterName); + _parameterName = parameterName; + } + } + + public MarkupTextLiteralSyntax NamePrefix { get { return _namePrefix; } } + public RazorMetaCodeSyntax Transition { get { return _transition; } } + public MarkupTextLiteralSyntax Name { get { return _name; } } + public RazorMetaCodeSyntax Colon { get { return _colon; } } + public MarkupTextLiteralSyntax ParameterName { get { return _parameterName; } } + + internal override GreenNode GetSlot(int index) + { + switch (index) + { + case 0: return _namePrefix; + case 1: return _transition; + case 2: return _name; + case 3: return _colon; + case 4: return _parameterName; + default: return null; + } + } + + internal override SyntaxNode CreateRed(SyntaxNode parent, int position) + { + return new Syntax.MarkupMinimizedTagHelperDirectiveAttributeSyntax(this, parent, position); + } + + public override TResult Accept(SyntaxVisitor visitor) + { + return visitor.VisitMarkupMinimizedTagHelperDirectiveAttribute(this); + } + + public override void Accept(SyntaxVisitor visitor) + { + visitor.VisitMarkupMinimizedTagHelperDirectiveAttribute(this); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax Update(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName) + { + if (namePrefix != NamePrefix || transition != Transition || name != Name || colon != Colon || parameterName != ParameterName) + { + var newNode = SyntaxFactory.MarkupMinimizedTagHelperDirectiveAttribute(namePrefix, transition, name, colon, parameterName); + var diags = GetDiagnostics(); + if (diags != null && diags.Length > 0) + newNode = newNode.WithDiagnosticsGreen(diags); + var annotations = GetAnnotations(); + if (annotations != null && annotations.Length > 0) + newNode = newNode.WithAnnotationsGreen(annotations); + return newNode; + } + + return this; + } + + internal override GreenNode SetDiagnostics(RazorDiagnostic[] diagnostics) + { + return new MarkupMinimizedTagHelperDirectiveAttributeSyntax(Kind, _namePrefix, _transition, _name, _colon, _parameterName, diagnostics, GetAnnotations()); + } + + internal override GreenNode SetAnnotations(SyntaxAnnotation[] annotations) + { + return new MarkupMinimizedTagHelperDirectiveAttributeSyntax(Kind, _namePrefix, _transition, _name, _colon, _parameterName, GetDiagnostics(), annotations); + } + } + internal abstract partial class CSharpSyntaxNode : RazorSyntaxNode { internal CSharpSyntaxNode(SyntaxKind kind, RazorDiagnostic[] diagnostics, SyntaxAnnotation[] annotations) @@ -3675,6 +3970,16 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax return DefaultVisit(node); } + public virtual TResult VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + return DefaultVisit(node); + } + + public virtual TResult VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + return DefaultVisit(node); + } + public virtual TResult VisitCSharpCodeBlock(CSharpCodeBlockSyntax node) { return DefaultVisit(node); @@ -3869,6 +4174,16 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax DefaultVisit(node); } + public virtual void VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + DefaultVisit(node); + } + + public virtual void VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + DefaultVisit(node); + } + public virtual void VisitCSharpCodeBlock(CSharpCodeBlockSyntax node) { DefaultVisit(node); @@ -4130,6 +4445,31 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax return node.Update(children); } + public override GreenNode VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + var namePrefix = (MarkupTextLiteralSyntax)Visit(node.NamePrefix); + var transition = (RazorMetaCodeSyntax)Visit(node.Transition); + var name = (MarkupTextLiteralSyntax)Visit(node.Name); + var colon = (RazorMetaCodeSyntax)Visit(node.Colon); + var parameterName = (MarkupTextLiteralSyntax)Visit(node.ParameterName); + var nameSuffix = (MarkupTextLiteralSyntax)Visit(node.NameSuffix); + var equalsToken = (SyntaxToken)Visit(node.EqualsToken); + var valuePrefix = (MarkupTextLiteralSyntax)Visit(node.ValuePrefix); + var value = (MarkupTagHelperAttributeValueSyntax)Visit(node.Value); + var valueSuffix = (MarkupTextLiteralSyntax)Visit(node.ValueSuffix); + return node.Update(namePrefix, transition, name, colon, parameterName, nameSuffix, equalsToken, valuePrefix, value, valueSuffix); + } + + public override GreenNode VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + var namePrefix = (MarkupTextLiteralSyntax)Visit(node.NamePrefix); + var transition = (RazorMetaCodeSyntax)Visit(node.Transition); + var name = (MarkupTextLiteralSyntax)Visit(node.Name); + var colon = (RazorMetaCodeSyntax)Visit(node.Colon); + var parameterName = (MarkupTextLiteralSyntax)Visit(node.ParameterName); + return node.Update(namePrefix, transition, name, colon, parameterName); + } + public override GreenNode VisitCSharpCodeBlock(CSharpCodeBlockSyntax node) { var children = VisitList(node.Children); @@ -4663,6 +5003,37 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax return result; } + public static MarkupTagHelperDirectiveAttributeSyntax MarkupTagHelperDirectiveAttribute(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, SyntaxToken equalsToken, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix) + { + if (transition == null) + throw new ArgumentNullException(nameof(transition)); + if (name == null) + throw new ArgumentNullException(nameof(name)); + if (equalsToken == null) + throw new ArgumentNullException(nameof(equalsToken)); + switch (equalsToken.Kind) + { + case SyntaxKind.Equals: + break; + default: + throw new ArgumentException("equalsToken"); + } + if (value == null) + throw new ArgumentNullException(nameof(value)); + + return new MarkupTagHelperDirectiveAttributeSyntax(SyntaxKind.MarkupTagHelperDirectiveAttribute, namePrefix, transition, name, colon, parameterName, nameSuffix, equalsToken, valuePrefix, value, valueSuffix); + } + + public static MarkupMinimizedTagHelperDirectiveAttributeSyntax MarkupMinimizedTagHelperDirectiveAttribute(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName) + { + if (transition == null) + throw new ArgumentNullException(nameof(transition)); + if (name == null) + throw new ArgumentNullException(nameof(name)); + + return new MarkupMinimizedTagHelperDirectiveAttributeSyntax(SyntaxKind.MarkupMinimizedTagHelperDirectiveAttribute, namePrefix, transition, name, colon, parameterName); + } + public static CSharpCodeBlockSyntax CSharpCodeBlock(Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.SyntaxList children) { var result = new CSharpCodeBlockSyntax(SyntaxKind.CSharpCodeBlock, children.Node); @@ -4838,6 +5209,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax typeof(MarkupTagHelperAttributeSyntax), typeof(MarkupMinimizedTagHelperAttributeSyntax), typeof(MarkupTagHelperAttributeValueSyntax), + typeof(MarkupTagHelperDirectiveAttributeSyntax), + typeof(MarkupMinimizedTagHelperDirectiveAttributeSyntax), typeof(CSharpCodeBlockSyntax), typeof(CSharpTransitionSyntax), typeof(CSharpStatementLiteralSyntax), diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Main.Generated.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Main.Generated.cs index cf1c0aa0a8..a53e0de3bc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Main.Generated.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Main.Generated.cs @@ -155,6 +155,18 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax return DefaultVisit(node); } + /// Called when the visitor visits a MarkupTagHelperDirectiveAttributeSyntax node. + public virtual TResult VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + return DefaultVisit(node); + } + + /// Called when the visitor visits a MarkupMinimizedTagHelperDirectiveAttributeSyntax node. + public virtual TResult VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + return DefaultVisit(node); + } + /// Called when the visitor visits a CSharpCodeBlockSyntax node. public virtual TResult VisitCSharpCodeBlock(CSharpCodeBlockSyntax node) { @@ -386,6 +398,18 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax DefaultVisit(node); } + /// Called when the visitor visits a MarkupTagHelperDirectiveAttributeSyntax node. + public virtual void VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + DefaultVisit(node); + } + + /// Called when the visitor visits a MarkupMinimizedTagHelperDirectiveAttributeSyntax node. + public virtual void VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + DefaultVisit(node); + } + /// Called when the visitor visits a CSharpCodeBlockSyntax node. public virtual void VisitCSharpCodeBlock(CSharpCodeBlockSyntax node) { @@ -661,6 +685,31 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax return node.Update(children); } + public override SyntaxNode VisitMarkupTagHelperDirectiveAttribute(MarkupTagHelperDirectiveAttributeSyntax node) + { + var namePrefix = (MarkupTextLiteralSyntax)Visit(node.NamePrefix); + var transition = (RazorMetaCodeSyntax)Visit(node.Transition); + var name = (MarkupTextLiteralSyntax)Visit(node.Name); + var colon = (RazorMetaCodeSyntax)Visit(node.Colon); + var parameterName = (MarkupTextLiteralSyntax)Visit(node.ParameterName); + var nameSuffix = (MarkupTextLiteralSyntax)Visit(node.NameSuffix); + var equalsToken = (SyntaxToken)VisitToken(node.EqualsToken); + var valuePrefix = (MarkupTextLiteralSyntax)Visit(node.ValuePrefix); + var value = (MarkupTagHelperAttributeValueSyntax)Visit(node.Value); + var valueSuffix = (MarkupTextLiteralSyntax)Visit(node.ValueSuffix); + return node.Update(namePrefix, transition, name, colon, parameterName, nameSuffix, equalsToken, valuePrefix, value, valueSuffix); + } + + public override SyntaxNode VisitMarkupMinimizedTagHelperDirectiveAttribute(MarkupMinimizedTagHelperDirectiveAttributeSyntax node) + { + var namePrefix = (MarkupTextLiteralSyntax)Visit(node.NamePrefix); + var transition = (RazorMetaCodeSyntax)Visit(node.Transition); + var name = (MarkupTextLiteralSyntax)Visit(node.Name); + var colon = (RazorMetaCodeSyntax)Visit(node.Colon); + var parameterName = (MarkupTextLiteralSyntax)Visit(node.ParameterName); + return node.Update(namePrefix, transition, name, colon, parameterName); + } + public override SyntaxNode VisitCSharpCodeBlock(CSharpCodeBlockSyntax node) { var children = VisitList(node.Children); @@ -1280,6 +1329,53 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax return SyntaxFactory.MarkupTagHelperAttributeValue(default(SyntaxList)); } + /// Creates a new MarkupTagHelperDirectiveAttributeSyntax instance. + public static MarkupTagHelperDirectiveAttributeSyntax MarkupTagHelperDirectiveAttribute(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, SyntaxToken equalsToken, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix) + { + if (transition == null) + throw new ArgumentNullException(nameof(transition)); + if (name == null) + throw new ArgumentNullException(nameof(name)); + switch (equalsToken.Kind) + { + case SyntaxKind.Equals: + break; + default: + throw new ArgumentException("equalsToken"); + } + if (value == null) + throw new ArgumentNullException(nameof(value)); + return (MarkupTagHelperDirectiveAttributeSyntax)InternalSyntax.SyntaxFactory.MarkupTagHelperDirectiveAttribute(namePrefix == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)namePrefix.Green, transition == null ? null : (InternalSyntax.RazorMetaCodeSyntax)transition.Green, name == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)name.Green, colon == null ? null : (InternalSyntax.RazorMetaCodeSyntax)colon.Green, parameterName == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)parameterName.Green, nameSuffix == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)nameSuffix.Green, (Syntax.InternalSyntax.SyntaxToken)equalsToken.Green, valuePrefix == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)valuePrefix.Green, value == null ? null : (InternalSyntax.MarkupTagHelperAttributeValueSyntax)value.Green, valueSuffix == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)valueSuffix.Green).CreateRed(); + } + + /// Creates a new MarkupTagHelperDirectiveAttributeSyntax instance. + public static MarkupTagHelperDirectiveAttributeSyntax MarkupTagHelperDirectiveAttribute(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix) + { + return SyntaxFactory.MarkupTagHelperDirectiveAttribute(namePrefix, transition, name, colon, parameterName, nameSuffix, SyntaxFactory.Token(SyntaxKind.Equals), valuePrefix, value, valueSuffix); + } + + /// Creates a new MarkupTagHelperDirectiveAttributeSyntax instance. + public static MarkupTagHelperDirectiveAttributeSyntax MarkupTagHelperDirectiveAttribute() + { + return SyntaxFactory.MarkupTagHelperDirectiveAttribute(default(MarkupTextLiteralSyntax), SyntaxFactory.RazorMetaCode(), SyntaxFactory.MarkupTextLiteral(), default(RazorMetaCodeSyntax), default(MarkupTextLiteralSyntax), default(MarkupTextLiteralSyntax), SyntaxFactory.Token(SyntaxKind.Equals), default(MarkupTextLiteralSyntax), SyntaxFactory.MarkupTagHelperAttributeValue(), default(MarkupTextLiteralSyntax)); + } + + /// Creates a new MarkupMinimizedTagHelperDirectiveAttributeSyntax instance. + public static MarkupMinimizedTagHelperDirectiveAttributeSyntax MarkupMinimizedTagHelperDirectiveAttribute(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName) + { + if (transition == null) + throw new ArgumentNullException(nameof(transition)); + if (name == null) + throw new ArgumentNullException(nameof(name)); + return (MarkupMinimizedTagHelperDirectiveAttributeSyntax)InternalSyntax.SyntaxFactory.MarkupMinimizedTagHelperDirectiveAttribute(namePrefix == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)namePrefix.Green, transition == null ? null : (InternalSyntax.RazorMetaCodeSyntax)transition.Green, name == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)name.Green, colon == null ? null : (InternalSyntax.RazorMetaCodeSyntax)colon.Green, parameterName == null ? null : (InternalSyntax.MarkupTextLiteralSyntax)parameterName.Green).CreateRed(); + } + + /// Creates a new MarkupMinimizedTagHelperDirectiveAttributeSyntax instance. + public static MarkupMinimizedTagHelperDirectiveAttributeSyntax MarkupMinimizedTagHelperDirectiveAttribute() + { + return SyntaxFactory.MarkupMinimizedTagHelperDirectiveAttribute(default(MarkupTextLiteralSyntax), SyntaxFactory.RazorMetaCode(), SyntaxFactory.MarkupTextLiteral(), default(RazorMetaCodeSyntax), default(MarkupTextLiteralSyntax)); + } + /// Creates a new CSharpCodeBlockSyntax instance. public static CSharpCodeBlockSyntax CSharpCodeBlock(SyntaxList children) { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Syntax.Generated.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Syntax.Generated.cs index e18d495f3d..6928b14710 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Syntax.Generated.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Generated/Syntax.xml.Syntax.Generated.cs @@ -2548,6 +2548,427 @@ namespace Microsoft.AspNetCore.Razor.Language.Syntax } } + internal sealed partial class MarkupTagHelperDirectiveAttributeSyntax : MarkupSyntaxNode + { + private MarkupTextLiteralSyntax _namePrefix; + private RazorMetaCodeSyntax _transition; + private MarkupTextLiteralSyntax _name; + private RazorMetaCodeSyntax _colon; + private MarkupTextLiteralSyntax _parameterName; + private MarkupTextLiteralSyntax _nameSuffix; + private SyntaxToken _equalsToken; + private MarkupTextLiteralSyntax _valuePrefix; + private MarkupTagHelperAttributeValueSyntax _value; + private MarkupTextLiteralSyntax _valueSuffix; + + internal MarkupTagHelperDirectiveAttributeSyntax(GreenNode green, SyntaxNode parent, int position) + : base(green, parent, position) + { + } + + public MarkupTextLiteralSyntax NamePrefix + { + get + { + return GetRedAtZero(ref _namePrefix); + } + } + + public RazorMetaCodeSyntax Transition + { + get + { + return GetRed(ref _transition, 1); + } + } + + public MarkupTextLiteralSyntax Name + { + get + { + return GetRed(ref _name, 2); + } + } + + public RazorMetaCodeSyntax Colon + { + get + { + return GetRed(ref _colon, 3); + } + } + + public MarkupTextLiteralSyntax ParameterName + { + get + { + return GetRed(ref _parameterName, 4); + } + } + + public MarkupTextLiteralSyntax NameSuffix + { + get + { + return GetRed(ref _nameSuffix, 5); + } + } + + public SyntaxToken EqualsToken + { + get + { + return GetRed(ref _equalsToken, 6); + } + } + + public MarkupTextLiteralSyntax ValuePrefix + { + get + { + return GetRed(ref _valuePrefix, 7); + } + } + + public MarkupTagHelperAttributeValueSyntax Value + { + get + { + return GetRed(ref _value, 8); + } + } + + public MarkupTextLiteralSyntax ValueSuffix + { + get + { + return GetRed(ref _valueSuffix, 9); + } + } + + internal override SyntaxNode GetNodeSlot(int index) + { + switch (index) + { + case 0: return GetRedAtZero(ref _namePrefix); + case 1: return GetRed(ref _transition, 1); + case 2: return GetRed(ref _name, 2); + case 3: return GetRed(ref _colon, 3); + case 4: return GetRed(ref _parameterName, 4); + case 5: return GetRed(ref _nameSuffix, 5); + case 6: return GetRed(ref _equalsToken, 6); + case 7: return GetRed(ref _valuePrefix, 7); + case 8: return GetRed(ref _value, 8); + case 9: return GetRed(ref _valueSuffix, 9); + default: return null; + } + } + internal override SyntaxNode GetCachedSlot(int index) + { + switch (index) + { + case 0: return _namePrefix; + case 1: return _transition; + case 2: return _name; + case 3: return _colon; + case 4: return _parameterName; + case 5: return _nameSuffix; + case 6: return _equalsToken; + case 7: return _valuePrefix; + case 8: return _value; + case 9: return _valueSuffix; + default: return null; + } + } + + public override TResult Accept(SyntaxVisitor visitor) + { + return visitor.VisitMarkupTagHelperDirectiveAttribute(this); + } + + public override void Accept(SyntaxVisitor visitor) + { + visitor.VisitMarkupTagHelperDirectiveAttribute(this); + } + + public MarkupTagHelperDirectiveAttributeSyntax Update(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName, MarkupTextLiteralSyntax nameSuffix, SyntaxToken equalsToken, MarkupTextLiteralSyntax valuePrefix, MarkupTagHelperAttributeValueSyntax value, MarkupTextLiteralSyntax valueSuffix) + { + if (namePrefix != NamePrefix || transition != Transition || name != Name || colon != Colon || parameterName != ParameterName || nameSuffix != NameSuffix || equalsToken != EqualsToken || valuePrefix != ValuePrefix || value != Value || valueSuffix != ValueSuffix) + { + var newNode = SyntaxFactory.MarkupTagHelperDirectiveAttribute(namePrefix, transition, name, colon, parameterName, nameSuffix, equalsToken, valuePrefix, value, valueSuffix); + var diagnostics = GetDiagnostics(); + if (diagnostics != null && diagnostics.Length > 0) + newNode = newNode.WithDiagnostics(diagnostics); + var annotations = GetAnnotations(); + if (annotations != null && annotations.Length > 0) + return newNode.WithAnnotations(annotations); + return newNode; + } + + return this; + } + + public MarkupTagHelperDirectiveAttributeSyntax WithNamePrefix(MarkupTextLiteralSyntax namePrefix) + { + return Update(namePrefix, Transition, Name, Colon, ParameterName, NameSuffix, EqualsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithTransition(RazorMetaCodeSyntax transition) + { + return Update(NamePrefix, transition, Name, Colon, ParameterName, NameSuffix, EqualsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithName(MarkupTextLiteralSyntax name) + { + return Update(NamePrefix, Transition, name, Colon, ParameterName, NameSuffix, EqualsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithColon(RazorMetaCodeSyntax colon) + { + return Update(NamePrefix, Transition, Name, colon, ParameterName, NameSuffix, EqualsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithParameterName(MarkupTextLiteralSyntax parameterName) + { + return Update(NamePrefix, Transition, Name, Colon, parameterName, NameSuffix, EqualsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithNameSuffix(MarkupTextLiteralSyntax nameSuffix) + { + return Update(NamePrefix, Transition, Name, Colon, ParameterName, nameSuffix, EqualsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithEqualsToken(SyntaxToken equalsToken) + { + return Update(NamePrefix, Transition, Name, Colon, ParameterName, NameSuffix, equalsToken, ValuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithValuePrefix(MarkupTextLiteralSyntax valuePrefix) + { + return Update(NamePrefix, Transition, Name, Colon, ParameterName, NameSuffix, EqualsToken, valuePrefix, Value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithValue(MarkupTagHelperAttributeValueSyntax value) + { + return Update(NamePrefix, Transition, Name, Colon, ParameterName, NameSuffix, EqualsToken, ValuePrefix, value, ValueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax WithValueSuffix(MarkupTextLiteralSyntax valueSuffix) + { + return Update(NamePrefix, Transition, Name, Colon, ParameterName, NameSuffix, EqualsToken, ValuePrefix, Value, valueSuffix); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddNamePrefixLiteralTokens(params SyntaxToken[] items) + { + var _namePrefix = this.NamePrefix ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithNamePrefix(_namePrefix.WithLiteralTokens(_namePrefix.LiteralTokens.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddTransitionMetaCode(params SyntaxToken[] items) + { + return this.WithTransition(this.Transition.WithMetaCode(this.Transition.MetaCode.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddNameLiteralTokens(params SyntaxToken[] items) + { + return this.WithName(this.Name.WithLiteralTokens(this.Name.LiteralTokens.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddColonMetaCode(params SyntaxToken[] items) + { + var _colon = this.Colon ?? SyntaxFactory.RazorMetaCode(); + return this.WithColon(_colon.WithMetaCode(_colon.MetaCode.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddParameterNameLiteralTokens(params SyntaxToken[] items) + { + var _parameterName = this.ParameterName ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithParameterName(_parameterName.WithLiteralTokens(_parameterName.LiteralTokens.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddNameSuffixLiteralTokens(params SyntaxToken[] items) + { + var _nameSuffix = this.NameSuffix ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithNameSuffix(_nameSuffix.WithLiteralTokens(_nameSuffix.LiteralTokens.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddValuePrefixLiteralTokens(params SyntaxToken[] items) + { + var _valuePrefix = this.ValuePrefix ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithValuePrefix(_valuePrefix.WithLiteralTokens(_valuePrefix.LiteralTokens.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddValueChildren(params RazorSyntaxNode[] items) + { + return this.WithValue(this.Value.WithChildren(this.Value.Children.AddRange(items))); + } + + public MarkupTagHelperDirectiveAttributeSyntax AddValueSuffixLiteralTokens(params SyntaxToken[] items) + { + var _valueSuffix = this.ValueSuffix ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithValueSuffix(_valueSuffix.WithLiteralTokens(_valueSuffix.LiteralTokens.AddRange(items))); + } + } + + internal sealed partial class MarkupMinimizedTagHelperDirectiveAttributeSyntax : MarkupSyntaxNode + { + private MarkupTextLiteralSyntax _namePrefix; + private RazorMetaCodeSyntax _transition; + private MarkupTextLiteralSyntax _name; + private RazorMetaCodeSyntax _colon; + private MarkupTextLiteralSyntax _parameterName; + + internal MarkupMinimizedTagHelperDirectiveAttributeSyntax(GreenNode green, SyntaxNode parent, int position) + : base(green, parent, position) + { + } + + public MarkupTextLiteralSyntax NamePrefix + { + get + { + return GetRedAtZero(ref _namePrefix); + } + } + + public RazorMetaCodeSyntax Transition + { + get + { + return GetRed(ref _transition, 1); + } + } + + public MarkupTextLiteralSyntax Name + { + get + { + return GetRed(ref _name, 2); + } + } + + public RazorMetaCodeSyntax Colon + { + get + { + return GetRed(ref _colon, 3); + } + } + + public MarkupTextLiteralSyntax ParameterName + { + get + { + return GetRed(ref _parameterName, 4); + } + } + + internal override SyntaxNode GetNodeSlot(int index) + { + switch (index) + { + case 0: return GetRedAtZero(ref _namePrefix); + case 1: return GetRed(ref _transition, 1); + case 2: return GetRed(ref _name, 2); + case 3: return GetRed(ref _colon, 3); + case 4: return GetRed(ref _parameterName, 4); + default: return null; + } + } + internal override SyntaxNode GetCachedSlot(int index) + { + switch (index) + { + case 0: return _namePrefix; + case 1: return _transition; + case 2: return _name; + case 3: return _colon; + case 4: return _parameterName; + default: return null; + } + } + + public override TResult Accept(SyntaxVisitor visitor) + { + return visitor.VisitMarkupMinimizedTagHelperDirectiveAttribute(this); + } + + public override void Accept(SyntaxVisitor visitor) + { + visitor.VisitMarkupMinimizedTagHelperDirectiveAttribute(this); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax Update(MarkupTextLiteralSyntax namePrefix, RazorMetaCodeSyntax transition, MarkupTextLiteralSyntax name, RazorMetaCodeSyntax colon, MarkupTextLiteralSyntax parameterName) + { + if (namePrefix != NamePrefix || transition != Transition || name != Name || colon != Colon || parameterName != ParameterName) + { + var newNode = SyntaxFactory.MarkupMinimizedTagHelperDirectiveAttribute(namePrefix, transition, name, colon, parameterName); + var diagnostics = GetDiagnostics(); + if (diagnostics != null && diagnostics.Length > 0) + newNode = newNode.WithDiagnostics(diagnostics); + var annotations = GetAnnotations(); + if (annotations != null && annotations.Length > 0) + return newNode.WithAnnotations(annotations); + return newNode; + } + + return this; + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax WithNamePrefix(MarkupTextLiteralSyntax namePrefix) + { + return Update(namePrefix, Transition, Name, Colon, ParameterName); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax WithTransition(RazorMetaCodeSyntax transition) + { + return Update(NamePrefix, transition, Name, Colon, ParameterName); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax WithName(MarkupTextLiteralSyntax name) + { + return Update(NamePrefix, Transition, name, Colon, ParameterName); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax WithColon(RazorMetaCodeSyntax colon) + { + return Update(NamePrefix, Transition, Name, colon, ParameterName); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax WithParameterName(MarkupTextLiteralSyntax parameterName) + { + return Update(NamePrefix, Transition, Name, Colon, parameterName); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax AddNamePrefixLiteralTokens(params SyntaxToken[] items) + { + var _namePrefix = this.NamePrefix ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithNamePrefix(_namePrefix.WithLiteralTokens(_namePrefix.LiteralTokens.AddRange(items))); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax AddTransitionMetaCode(params SyntaxToken[] items) + { + return this.WithTransition(this.Transition.WithMetaCode(this.Transition.MetaCode.AddRange(items))); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax AddNameLiteralTokens(params SyntaxToken[] items) + { + return this.WithName(this.Name.WithLiteralTokens(this.Name.LiteralTokens.AddRange(items))); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax AddColonMetaCode(params SyntaxToken[] items) + { + var _colon = this.Colon ?? SyntaxFactory.RazorMetaCode(); + return this.WithColon(_colon.WithMetaCode(_colon.MetaCode.AddRange(items))); + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax AddParameterNameLiteralTokens(params SyntaxToken[] items) + { + var _parameterName = this.ParameterName ?? SyntaxFactory.MarkupTextLiteral(); + return this.WithParameterName(_parameterName.WithLiteralTokens(_parameterName.LiteralTokens.AddRange(items))); + } + } + internal abstract partial class CSharpSyntaxNode : RazorSyntaxNode { internal CSharpSyntaxNode(GreenNode green, SyntaxNode parent, int position) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupMinimizedTagHelperDirectiveAttributeSyntax.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupMinimizedTagHelperDirectiveAttributeSyntax.cs new file mode 100644 index 0000000000..d903fda933 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupMinimizedTagHelperDirectiveAttributeSyntax.cs @@ -0,0 +1,46 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace Microsoft.AspNetCore.Razor.Language.Syntax +{ + internal sealed partial class MarkupMinimizedTagHelperDirectiveAttributeSyntax + { + private static readonly string TagHelperAttributeInfoKey = typeof(TagHelperAttributeInfo).Name; + + public TagHelperAttributeInfo TagHelperAttributeInfo + { + get + { + var tagHelperAttributeInfo = this.GetAnnotationValue(TagHelperAttributeInfoKey) as TagHelperAttributeInfo; + return tagHelperAttributeInfo; + } + } + + public string FullName + { + get + { + var fullName = string.Concat( + Transition.GetContent(), + Name.GetContent(), + Colon?.GetContent() ?? string.Empty, + ParameterName?.GetContent() ?? string.Empty); + return fullName; + } + } + + public MarkupMinimizedTagHelperDirectiveAttributeSyntax WithTagHelperAttributeInfo(TagHelperAttributeInfo info) + { + var annotations = new List(GetAnnotations()) + { + new SyntaxAnnotation(TagHelperAttributeInfoKey, info) + }; + + var newGreen = Green.WithAnnotationsGreen(annotations.ToArray()); + + return (MarkupMinimizedTagHelperDirectiveAttributeSyntax)newGreen.CreateRed(Parent, Position); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupTagHelperDirectiveAttributeSyntax.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupTagHelperDirectiveAttributeSyntax.cs new file mode 100644 index 0000000000..8356b77b4c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/MarkupTagHelperDirectiveAttributeSyntax.cs @@ -0,0 +1,46 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace Microsoft.AspNetCore.Razor.Language.Syntax +{ + internal sealed partial class MarkupTagHelperDirectiveAttributeSyntax + { + private static readonly string TagHelperAttributeInfoKey = typeof(TagHelperAttributeInfo).Name; + + public TagHelperAttributeInfo TagHelperAttributeInfo + { + get + { + var tagHelperAttributeInfo = this.GetAnnotationValue(TagHelperAttributeInfoKey) as TagHelperAttributeInfo; + return tagHelperAttributeInfo; + } + } + + public string FullName + { + get + { + var fullName = string.Concat( + Transition.GetContent(), + Name.GetContent(), + Colon?.GetContent() ?? string.Empty, + ParameterName?.GetContent() ?? string.Empty); + return fullName; + } + } + + public MarkupTagHelperDirectiveAttributeSyntax WithTagHelperAttributeInfo(TagHelperAttributeInfo info) + { + var annotations = new List(GetAnnotations()) + { + new SyntaxAnnotation(TagHelperAttributeInfoKey, info) + }; + + var newGreen = Green.WithAnnotationsGreen(annotations.ToArray()); + + return (MarkupTagHelperDirectiveAttributeSyntax)newGreen.CreateRed(Parent, Position); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Syntax.xml b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Syntax.xml index bca21d77db..8c4b01c5e7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Syntax.xml +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/Syntax.xml @@ -205,6 +205,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/SyntaxKind.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/SyntaxKind.cs index 66be02fdfa..ad30718d5d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/SyntaxKind.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Syntax/SyntaxKind.cs @@ -35,6 +35,8 @@ namespace Microsoft.AspNetCore.Razor.Language MarkupTagHelperEndTag, MarkupTagHelperAttribute, MarkupMinimizedTagHelperAttribute, + MarkupTagHelperDirectiveAttribute, + MarkupMinimizedTagHelperDirectiveAttribute, MarkupTagHelperAttributeValue, // CSharp diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/TagHelperAttributeInfo.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/TagHelperAttributeInfo.cs index a3f15f1708..10da7536b8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/TagHelperAttributeInfo.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/TagHelperAttributeInfo.cs @@ -7,18 +7,26 @@ namespace Microsoft.AspNetCore.Razor.Language { public TagHelperAttributeInfo( string name, + string parameterName, AttributeStructure attributeStructure, - bool bound) + bool bound, + bool isDirectiveAttribute) { Name = name; + ParameterName = parameterName; AttributeStructure = attributeStructure; Bound = bound; + IsDirectiveAttribute = isDirectiveAttribute; } public string Name { get; } + public string ParameterName { get; } + public AttributeStructure AttributeStructure { get; } public bool Bound { get; } + + public bool IsDirectiveAttribute { get; } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs index 374d5a25c5..486f821dbe 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs @@ -32,7 +32,7 @@ namespace Test // Act var result = CompileToCSharp(@" -
+
@functions { public string ParentValue { get; set; } = ""hi""; }"); @@ -41,7 +41,7 @@ namespace Test var diagnostic = Assert.Single(result.Diagnostics); Assert.Equal("RZ9989", diagnostic.Id); Assert.Equal( - "The attribute 'bind-value' was matched by multiple bind attributes. Duplicates:" + Environment.NewLine + + "The attribute '@bind-value' was matched by multiple bind attributes. Duplicates:" + Environment.NewLine + "Test.BindAttributes" + Environment.NewLine + "Test.BindAttributes", diagnostic.GetMessage()); @@ -52,7 +52,7 @@ namespace Test { // Arrange & Act var generated = CompileToCSharp(@" - + @functions { public string Text { get; set; } = ""text""; }"); @@ -67,7 +67,7 @@ namespace Test { // Arrange & Act var generated = CompileToCSharp(@" - + @functions { public string Text { get; set; } = ""text""; }"); @@ -83,7 +83,7 @@ namespace Test // We're looking for VS crash issues. Meaning if the parser returns // diagnostics we don't want to throw. var generated = CompileToCSharp(@" - + @functions { public string page { get; set; } = ""text""; }", throwOnFailure: false); diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs index 09ba658797..32fa3ccaf6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs @@ -424,7 +424,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -469,7 +469,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @functions { @@ -504,7 +504,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public string ParentValue { get; set; } = ""42""; }"); @@ -543,7 +543,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -576,7 +576,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public string ParentValue { get; set; } = ""42""; }"); @@ -613,7 +613,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -645,7 +645,7 @@ namespace Test }")); // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -675,7 +675,7 @@ namespace Test }")); var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -712,7 +712,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -749,7 +749,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -786,7 +786,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -825,7 +825,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public DateTime ParentValue { get; set; } = DateTime.Now; }"); @@ -862,7 +862,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public DateTime ParentValue { get; set; } = DateTime.Now; }"); @@ -891,7 +891,7 @@ namespace Test // Act var generated = CompileToCSharp(@" -
+
@code { public string ParentValue { get; set; } = ""hi""; }"); @@ -919,7 +919,7 @@ namespace Test }")); // Act var generated = CompileToCSharp(@" -
+
@code { public string ParentValue { get; set; } = ""hi""; }"); @@ -947,7 +947,7 @@ namespace Test }")); // Act var generated = CompileToCSharp(@" -
+
@code { public string ParentValue { get; set; } = ""hi""; }"); @@ -965,7 +965,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -983,7 +983,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); }"); @@ -1001,7 +1001,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); @@ -1021,7 +1021,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -1039,7 +1039,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public bool Enabled { get; set; } }"); @@ -1057,7 +1057,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public int ParentValue { get; set; } = 42; }"); @@ -1075,7 +1075,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); }"); @@ -2118,7 +2118,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { private Action OnClick { get; set; } @@ -2172,7 +2172,7 @@ namespace Test // Act var generated = CompileToCSharp(@" -"); +"); // Assert AssertDocumentNodeMatchesBaseline(generated.CodeDocument); @@ -2187,7 +2187,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - { })"" />"); + { })"" />"); // Assert AssertDocumentNodeMatchesBaseline(generated.CodeDocument); @@ -2202,7 +2202,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - { })"" />"); + { })"" />"); // Assert AssertDocumentNodeMatchesBaseline(generated.CodeDocument); @@ -2217,7 +2217,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { void OnClick() { } @@ -2236,7 +2236,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { void OnClick(UIMouseEventArgs e) { } @@ -2255,7 +2255,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { void OnClick(UIEventArgs e) { } @@ -2275,7 +2275,7 @@ namespace Test // Act var generated = CompileToCSharp(@" @using System.Threading.Tasks - + @code { Task OnClick() { @@ -2297,7 +2297,7 @@ namespace Test // Act var generated = CompileToCSharp(@" @using System.Threading.Tasks - + @code { Task OnClick(UIMouseEventArgs e) { @@ -2319,7 +2319,7 @@ namespace Test // Act var generated = CompileToCSharp(@" @using System.Threading.Tasks - await Task.Delay(10))"" /> + await Task.Delay(10))"" /> "); // Assert @@ -2336,7 +2336,7 @@ namespace Test // Act var generated = CompileToCSharp(@" @using System.Threading.Tasks - await Task.Delay(10))"" /> + await Task.Delay(10))"" /> "); // Assert @@ -2352,7 +2352,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - { })"" />"); + { })"" />"); // Assert AssertDocumentNodeMatchesBaseline(generated.CodeDocument); @@ -2367,7 +2367,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { void OnClick(UIMouseEventArgs e) { } @@ -2538,7 +2538,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { string Value; }"); @@ -2572,8 +2572,8 @@ namespace Test // Act var generated = CompileToCSharp(@" - - + + @code { string Value; }"); @@ -2602,7 +2602,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { string Value; }"); @@ -2632,7 +2632,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { string Value; }"); @@ -2867,7 +2867,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { private object _someKey = new object(); @@ -2898,7 +2898,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { private object _someKey = new object(); @@ -2929,7 +2929,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { private MyComponent _my; @@ -2961,7 +2961,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { private MyComponent _my; @@ -3025,7 +3025,7 @@ namespace Test.Shared { // Arrange/Act var generated = CompileToCSharp(@" -Hello +Hello @code { private object someObject = new object(); @@ -3043,7 +3043,7 @@ namespace Test.Shared { // Arrange/Act var generated = CompileToCSharp(@" - + @code { private object someObject = new object(); @@ -3075,7 +3075,7 @@ namespace Test // Arrange/Act var generated = CompileToCSharp(@" - + @code { private DateTime someDate = DateTime.Now; @@ -3105,7 +3105,7 @@ namespace Test // Arrange/Act var generated = CompileToCSharp(@" - + Some further content "); @@ -3125,7 +3125,7 @@ namespace Test { // Arrange/Act var generated = CompileToCSharp(@" -Hello +Hello @code { private Microsoft.AspNetCore.Components.ElementRef myElem; @@ -3144,7 +3144,7 @@ namespace Test { // Arrange/Act var generated = CompileToCSharp(@" - + @code { private ElementRef _element; @@ -3177,7 +3177,7 @@ namespace Test // Arrange/Act var generated = CompileToCSharp(@" - + @code { private Test.MyComponent myInstance; @@ -3208,7 +3208,7 @@ namespace Test // Arrange/Act var generated = CompileToCSharp(@" - + Some further content @@ -3816,8 +3816,6 @@ namespace New.Test Assert.Same(ComponentDiagnosticFactory.DuplicateMarkupAttribute.Id, diagnostic.Id); } - // Right now this is almost indistinguishable from the previous case, but when we add the @ for directive attributes - // it won't be. This is a placeholder to be updated when that change goes in. [Fact] public void DuplicateMarkupAttributes_IsAnError_EventHandler() { @@ -3826,7 +3824,7 @@ namespace New.Test // Act var generated = CompileToCSharp(@" "); // Assert @@ -3866,7 +3864,7 @@ namespace New.Test // Act var generated = CompileToCSharp(@"
- +
@functions { private string text = ""hi""; @@ -3890,7 +3888,7 @@ namespace New.Test // Act var generated = CompileToCSharp(@"
- {})""> + {})"">
@functions { private string text = ""hi""; @@ -4015,7 +4013,7 @@ namespace Test ")); // Act var generated = CompileToCSharp(@" - + @functions { string message = ""hi""; } @@ -4050,7 +4048,7 @@ namespace Test ")); // Act var generated = CompileToCSharp(@" - {})"" bind-Message=""@message"" /> + {})"" @bind-Message=""@message"" /> @functions { string message = ""hi""; } @@ -4085,7 +4083,7 @@ namespace Test ")); // Act var generated = CompileToCSharp(@" - {})"" /> + {})"" /> @functions { string message = ""hi""; } @@ -4136,7 +4134,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { string y = null; } @@ -4170,7 +4168,7 @@ namespace Test // Act var generated = CompileToCSharp(@" - + @code { public string UserName { get; set; } @@ -4262,7 +4260,7 @@ Welcome to your new app. // Act var generated = CompileToCSharp(@" -

+

@code { public string ParentBgColor { get; set; } = ""#FFFFFF""; @@ -4283,7 +4281,7 @@ Welcome to your new app. { // Act var generated = CompileToCSharp(@" - + "); // Assert diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs index b919eef4f7..5706173abc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs @@ -248,5 +248,17 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy { ParseDocumentTest("@{}"); } + + [Fact] + public void ComponentFileKind_ParsesDirectiveAttributesAsMarkup() + { + ParseDocumentTest("", fileKind: FileKinds.Component); + } + + [Fact] + public void ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup() + { + ParseDocumentTest("", fileKind: FileKinds.Component); + } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs index 82b69cddbc..25ad072bc1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Microsoft.AspNetCore.Razor.Language.Components; using Xunit; namespace Microsoft.AspNetCore.Razor.Language.Legacy @@ -2153,6 +2154,94 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy EvaluateData(descriptors, document, featureFlags: featureFlags); } + [Fact] + public void Rewrites_ComponentDirectiveAttributes() + { + // Arrange + var document = @""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create(ComponentMetadata.Bind.TagHelperKind, "Bind", ComponentsApi.AssemblyName) + .AddMetadata(ComponentMetadata.SpecialKindKey, ComponentMetadata.Bind.TagHelperKind) + .AddMetadata(TagHelperMetadata.Common.ClassifyAttributesOnly, bool.TrueString) + .AddMetadata(TagHelperMetadata.Runtime.Name, ComponentMetadata.Bind.RuntimeName) + .TypeName("Microsoft.AspNetCore.Components.Bind") + .AddMetadata(ComponentMetadata.Bind.FallbackKey, bool.TrueString) + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("*") + .RequireAttributeDescriptor(r => + { + r.Name = "@bind-"; + r.NameComparisonMode = RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch; + r.Metadata.Add(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString); + })) + .BoundAttributeDescriptor(attribute => + attribute + .Name("@bind-...") + .PropertyName("Bind") + .AsDictionaryAttribute("@bind-", typeof(object).FullName) + .TypeName("System.Collections.Generic.Dictionary") + .AddMetadata(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString) + .BindAttributeParameter(p => + { + p.Name = "event"; + p.TypeName = typeof(string).FullName; + p.SetPropertyName("Event"); + })) + .Build(), + }; + + var featureFlags = new TestRazorParserFeatureFlags(allowCSharpInMarkupAttributeArea: false); + + // Act & Assert + EvaluateData(descriptors, document, featureFlags: featureFlags); + } + + [Fact] + public void Rewrites_MinimizedComponentDirectiveAttributes() + { + // Arrange + var document = @""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create(ComponentMetadata.Bind.TagHelperKind, "Bind", ComponentsApi.AssemblyName) + .AddMetadata(ComponentMetadata.SpecialKindKey, ComponentMetadata.Bind.TagHelperKind) + .AddMetadata(TagHelperMetadata.Common.ClassifyAttributesOnly, bool.TrueString) + .AddMetadata(TagHelperMetadata.Runtime.Name, ComponentMetadata.Bind.RuntimeName) + .TypeName("Microsoft.AspNetCore.Components.Bind") + .AddMetadata(ComponentMetadata.Bind.FallbackKey, bool.TrueString) + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("*") + .RequireAttributeDescriptor(r => + { + r.Name = "@bind-"; + r.NameComparisonMode = RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch; + r.Metadata.Add(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString); + })) + .BoundAttributeDescriptor(attribute => + attribute + .Name("@bind-...") + .PropertyName("Bind") + .AsDictionaryAttribute("@bind-", typeof(object).FullName) + .TypeName("System.Collections.Generic.Dictionary") + .AddMetadata(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString) + .BindAttributeParameter(p => + { + p.Name = "param"; + p.TypeName = typeof(string).FullName; + p.SetPropertyName("Param"); + })) + .Build(), + }; + + var featureFlags = new TestRazorParserFeatureFlags(allowCSharpInMarkupAttributeArea: false); + + // Act & Assert + EvaluateData(descriptors, document, featureFlags: featureFlags); + } + private class TestRazorParserFeatureFlags : RazorParserFeatureFlags { public TestRazorParserFeatureFlags( @@ -2161,7 +2250,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy bool allowComponentFileKind = false, bool allowRazorInCodeBlockDirectives = false, bool allowUsingVariableDeclarations = false, - bool allowConditionalDataDashAttributesInComponents = false) + bool allowConditionalDataDashAttributesInComponents = false, + bool allowCSharpInMarkupAttributeArea = true) { AllowMinimizedBooleanTagHelperAttributes = allowMinimizedBooleanTagHelperAttributes; AllowHtmlCommentsInTagHelpers = allowHtmlCommentsInTagHelper; @@ -2169,6 +2259,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy AllowRazorInAllCodeBlocks = allowRazorInCodeBlockDirectives; AllowUsingVariableDeclarations = allowUsingVariableDeclarations; AllowConditionalDataDashAttributes = allowConditionalDataDashAttributesInComponents; + AllowCSharpInMarkupAttributeArea = allowCSharpInMarkupAttributeArea; } public override bool AllowMinimizedBooleanTagHelperAttributes { get; } @@ -2182,6 +2273,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy public override bool AllowUsingVariableDeclarations { get; } public override bool AllowConditionalDataDashAttributes { get; } + + public override bool AllowCSharpInMarkupAttributeArea { get; } } } } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs index af8a3beb9d..59f1c81b71 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs @@ -29,7 +29,7 @@ using System.Threading.Tasks; __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - async (e) => await Task.Delay(10) + async (e) => await Task.Delay(10) #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt index 63fa8d1ba6..544e34faff 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt @@ -16,11 +16,11 @@ Document - MethodDeclaration - - protected override - void - BuildRenderTree HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (31:1,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [57] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (49:1,18 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10) + IntermediateToken - (50:1,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10) IntermediateToken - - CSharp - ) - HtmlContent - (87:1,56 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (87:1,56 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (88:1,57 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (88:1,57 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt index c5f558697a..966d8c5d27 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt @@ -3,8 +3,8 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (285:11,0 [28] ) |using System.Threading.Tasks| -Source Location: (49:1,18 [33] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) |async (e) => await Task.Delay(10)| -Generated Location: (1114:31,18 [33] ) +Generated Location: (1115:31,19 [33] ) |async (e) => await Task.Delay(10)| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs index 4373ee345a..aa32ffa3b1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs @@ -29,7 +29,7 @@ using System.Threading.Tasks; __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt index dc57096a4d..04ca37df2e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt @@ -16,13 +16,13 @@ Document - MethodDeclaration - - protected override - void - BuildRenderTree HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (49:1,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(UIMouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n + HtmlContent - (60:1,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (60:1,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (69:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (69:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(UIMouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt index b1c23219e4..e4365527cb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt @@ -3,19 +3,19 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (285:11,0 [28] ) |using System.Threading.Tasks| -Source Location: (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:1,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1113:31,17 [7] ) +Generated Location: (1114:31,18 [7] ) |OnClick| -Source Location: (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (69:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) | Task OnClick(UIMouseEventArgs e) { return Task.CompletedTask; } | -Generated Location: (1314:41,7 [91] ) +Generated Location: (1315:41,7 [91] ) | Task OnClick(UIMouseEventArgs e) { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs index 689daabc69..58d49aabc2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs @@ -29,7 +29,7 @@ using System.Threading.Tasks; __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - async () => await Task.Delay(10) + async () => await Task.Delay(10) #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt index 48dce9fc63..f5666d5321 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt @@ -16,11 +16,11 @@ Document - MethodDeclaration - - protected override - void - BuildRenderTree HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (31:1,0 [55] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (49:1,18 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10) + IntermediateToken - (50:1,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10) IntermediateToken - - CSharp - ) - HtmlContent - (86:1,55 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (86:1,55 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (87:1,56 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (87:1,56 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt index 8fb2db7b1e..c24ddc28e3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt @@ -3,8 +3,8 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (285:11,0 [28] ) |using System.Threading.Tasks| -Source Location: (49:1,18 [32] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) |async () => await Task.Delay(10)| -Generated Location: (1114:31,18 [32] ) +Generated Location: (1115:31,19 [32] ) |async () => await Task.Delay(10)| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs index aa6e62e133..1785060288 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs @@ -29,7 +29,7 @@ using System.Threading.Tasks; __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt index 5fab4ce25a..2d0729fedc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt @@ -16,13 +16,13 @@ Document - MethodDeclaration - - protected override - void - BuildRenderTree HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (49:1,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (59:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n + HtmlContent - (60:1,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (60:1,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (69:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (69:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt index 43e8394eab..5bcd56774a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt @@ -3,19 +3,19 @@ Source Location: (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (285:11,0 [28] ) |using System.Threading.Tasks| -Source Location: (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:1,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1113:31,17 [7] ) +Generated Location: (1114:31,18 [7] ) |OnClick| -Source Location: (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (69:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) | Task OnClick() { return Task.CompletedTask; } | -Generated Location: (1314:41,7 [73] ) +Generated Location: (1315:41,7 [73] ) | Task OnClick() { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs index 96ad4ffb32..48a9aac0be 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt index 2066065fcf..f1c3277f4c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt index 0fdf000ac5..0466456ce0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (2033:48,7 [50] ) +Generated Location: (2034:48,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs index a06830b239..14c0e532b7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, -1, -1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt index 4e9fa74cd2..b6804a480f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt @@ -14,22 +14,22 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes + Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - HtmlContent - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n + HtmlContent - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt index 077b0c0680..ba675b0d4b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1018:25,29 [11] ) +Generated Location: (1019:25,30 [11] ) |ParentValue| -Source Location: (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime ParentValue { get; set; } = DateTime.Now; | -Generated Location: (1606:43,7 [65] ) +Generated Location: (1607:43,7 [65] ) | public DateTime ParentValue { get; set; } = DateTime.Now; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs index a6f189ff49..932e5947f2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt index 294e192e04..b5714b59f0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt index faaaa9256e..08a93bce54 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1874:47,7 [50] ) +Generated Location: (1875:47,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs index f3357a0b84..310193d77e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt index 3d087d94cc..09ffa521c2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt index 1d7e5aa349..873fe767a1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "42"; | -Generated Location: (1874:47,7 [55] ) +Generated Location: (1875:47,7 [55] ) | public string ParentValue { get; set; } = "42"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs index 3867a27f26..56b9859e1c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt index eff3bf473e..ffc3061c93 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - HtmlContent - (69:0,69 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (69:0,69 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt index 1fad0343a1..9bdaa2dd2c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1617:47,7 [50] ) +Generated Location: (1618:47,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs index 84daca5cb7..a566b81ae8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt index 226ba4ea8e..89b2535b24 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (69:0,69 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (69:0,69 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt index 0f77b3a689..4a2a67a893 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (941:25,25 [11] ) +Generated Location: (942:25,26 [11] ) |ParentValue| -Source Location: (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1585:46,7 [50] ) +Generated Location: (1586:46,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs index cdf966ed88..e311953374 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt index c6fa2318d0..c0f022b144 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt index f224cb9acd..924842fe6f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1776:48,7 [50] ) +Generated Location: (1777:48,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs index 3c39f5d5be..d61796bfb3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, -1, -1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt index 4bd24821f7..07954f6de8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt @@ -14,22 +14,22 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes + Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - HtmlContent - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n + HtmlContent - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt index 9faf66a20a..3908cd852f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1018:25,29 [11] ) +Generated Location: (1019:25,30 [11] ) |ParentValue| -Source Location: (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime ParentValue { get; set; } = DateTime.Now; | -Generated Location: (1449:43,7 [65] ) +Generated Location: (1450:43,7 [65] ) | public DateTime ParentValue { get; set; } = DateTime.Now; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs index 3867a27f26..56b9859e1c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt index acfd4c8c2a..2d0ae0e2af 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt index fea0b0a3ca..66df946089 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1617:47,7 [50] ) +Generated Location: (1618:47,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs index 84daca5cb7..a566b81ae8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt index 342194d7a1..66adb1ebe8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt index 0031d34cbd..e6648b14bf 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (941:25,25 [11] ) +Generated Location: (942:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1585:46,7 [50] ) +Generated Location: (1586:46,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs index c99c8ffd99..5f4ccb8193 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt index cf93b36769..af8a73c6a8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - HtmlContent - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n + HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt index 6623f23561..da594880db 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (1012:25,25 [11] ) +Generated Location: (1013:25,26 [11] ) |ParentValue| -Source Location: (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "42"; | -Generated Location: (1617:47,7 [55] ) +Generated Location: (1618:47,7 [55] ) | public string ParentValue { get; set; } = "42"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs index 27f13189ec..49852e1c94 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - person.Name + person.Name #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt index 524433227f..2b142f55e5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [38] x:\dir\subdir\Test\TestComponent.cshtml) - InputText - ComponentAttribute - (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [39] x:\dir\subdir\Test\TestComponent.cshtml) - InputText + ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - person.Name + IntermediateToken - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - person.Name IntermediateToken - - CSharp - ) - ComponentAttribute - (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => person.Name = __value - HtmlContent - (38:0,38 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (38:0,38 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - CSharpCode - (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Person person = new Person();\n + HtmlContent - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + CSharpCode - (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Person person = new Person();\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt index d3243cd759..d4ad38aafb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) |person.Name| -Generated Location: (1011:25,23 [11] ) +Generated Location: (1012:25,24 [11] ) |person.Name| -Source Location: (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) | Person person = new Person(); | -Generated Location: (1609:47,1 [37] ) +Generated Location: (1610:47,1 [37] ) | Person person = new Person(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs index eaf0a8aae8..b68c854b33 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - CurrentDate + CurrentDate #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt index 92b02ddb5a..cc9aa84e98 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt @@ -14,21 +14,21 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [101] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [104] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate + IntermediateToken - (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate IntermediateToken - - CSharp - , IntermediateToken - - CSharp - "MM/dd" IntermediateToken - - CSharp - ) - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, "MM/dd") - HtmlContent - (101:0,101 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (101:0,101 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (110:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (110:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n + HtmlContent - (104:0,104 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (104:0,104 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt index f70077ef5c..5592e65875 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml) |CurrentDate| -Generated Location: (948:25,32 [11] ) +Generated Location: (949:25,33 [11] ) |CurrentDate| -Source Location: (110:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | -Generated Location: (1311:36,7 [77] ) +Generated Location: (1312:36,7 [77] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs index 4b3ecf0e64..2737e15abb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt index 9b37bd5daf..0b08cb59a6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [75] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [77] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (75:0,75 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (75:0,75 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (84:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (84:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (77:0,77 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (77:0,77 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt index daf85f2ae3..d92bef9aad 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (948:25,32 [11] ) +Generated Location: (949:25,33 [11] ) |ParentValue| -Source Location: (84:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1293:36,7 [50] ) +Generated Location: (1294:36,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs index cc42c20393..5d14fcab61 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt index 6f856b28ef..b60a70bf5b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [33] x:\dir\subdir\Test\TestComponent.cshtml) - div - HtmlAttribute - (17:0,17 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " + MarkupElement - (0:0,0 [34] x:\dir\subdir\Test\TestComponent.cshtml) - div + HtmlAttribute - (18:0,18 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (17:0,17 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " + HtmlAttribute - (18:0,18 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (33:0,33 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (33:0,33 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n + HtmlContent - (34:0,34 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (34:0,34 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt index 4e98c7071a..c0af8cf16d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (934:25,18 [11] ) +Generated Location: (935:25,19 [11] ) |ParentValue| -Source Location: (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1279:36,7 [55] ) +Generated Location: (1280:36,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs index 49dca9c636..cc42c20393 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt index 0d541e1fee..c19a2c62d8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - div - HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " + MarkupElement - (0:0,0 [33] x:\dir\subdir\Test\TestComponent.cshtml) - div + HtmlAttribute - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " + HtmlAttribute - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (32:0,32 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (32:0,32 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (41:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (41:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n + HtmlContent - (33:0,33 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (33:0,33 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt index 3b643e8d77..4e98c7071a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (933:25,17 [11] ) +Generated Location: (934:25,18 [11] ) |ParentValue| -Source Location: (41:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1278:36,7 [55] ) +Generated Location: (1279:36,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs index b35b8910b9..b46dbe810a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt index 5d7c1694b1..862f55c1d2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [27] x:\dir\subdir\Test\TestComponent.cshtml) - div - HtmlAttribute - (11:0,11 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " + MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - div + HtmlAttribute - (12:0,12 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (12:0,12 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (11:0,11 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " + HtmlAttribute - (12:0,12 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (27:0,27 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (27:0,27 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (36:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (36:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n + HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (37:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (37:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt index 0e1dfed8d9..56d4bb435c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (12:0,12 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (928:25,12 [11] ) +Generated Location: (929:25,13 [11] ) |ParentValue| -Source Location: (36:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1273:36,7 [55] ) +Generated Location: (1274:36,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs index 97963e1069..cb7b7debdd 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Enabled + Enabled #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt index bd3f53c385..c5177aa505 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Html - checkbox - HtmlAttribute - (29:0,29 [8] x:\dir\subdir\Test\TestComponent.cshtml) - checked=" - " + HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - checked=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (30:0,30 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Enabled + IntermediateToken - (31:0,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Enabled IntermediateToken - - CSharp - ) - HtmlAttribute - (29:0,29 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Enabled = __value, Enabled) - HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (50:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (50:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public bool Enabled { get; set; }\n + HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public bool Enabled { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt index 92bcd2a776..e24c153627 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (30:0,30 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (31:0,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) |Enabled| -Generated Location: (946:25,30 [7] ) +Generated Location: (947:25,31 [7] ) |Enabled| -Source Location: (50:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) | public bool Enabled { get; set; } | -Generated Location: (1279:36,7 [41] ) +Generated Location: (1280:36,7 [41] ) | public bool Enabled { get; set; } | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs index 819736dad7..bbc94f3b68 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - CurrentDate + CurrentDate #line default #line hidden @@ -31,7 +31,7 @@ namespace Test , #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Format + Format #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt index 84d1fc6bb0..a6b4261bce 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt @@ -14,21 +14,21 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [62] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [64] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate + IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate IntermediateToken - - CSharp - , - IntermediateToken - (53:0,53 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Format + IntermediateToken - (55:0,55 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Format IntermediateToken - - CSharp - ) - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, Format) - HtmlContent - (62:0,62 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (62:0,62 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (71:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n\n public string Format { get; set; } = "MM/dd/yyyy";\n + HtmlContent - (64:0,64 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (64:0,64 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n\n public string Format { get; set; } = "MM/dd/yyyy";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt index 8fa58f7f1f..37bec86a5a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt @@ -1,20 +1,20 @@ -Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) |CurrentDate| -Generated Location: (942:25,26 [11] ) +Generated Location: (943:25,27 [11] ) |CurrentDate| -Source Location: (53:0,53 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (55:0,55 [6] x:\dir\subdir\Test\TestComponent.cshtml) |Format| -Generated Location: (1144:33,53 [6] ) +Generated Location: (1147:33,55 [6] ) |Format| -Source Location: (71:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); public string Format { get; set; } = "MM/dd/yyyy"; | -Generated Location: (1492:44,7 [135] ) +Generated Location: (1495:44,7 [135] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs index cee9422fe4..67dfa5f842 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - CurrentDate + CurrentDate #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt index d4468c828e..fa21098b04 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt @@ -14,21 +14,21 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [65] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [67] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate + IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate IntermediateToken - - CSharp - , IntermediateToken - - CSharp - "MM/dd/yyyy" IntermediateToken - - CSharp - ) - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, "MM/dd/yyyy") - HtmlContent - (65:0,65 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (65:0,65 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (74:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (74:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n + HtmlContent - (67:0,67 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (67:0,67 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt index 4956ac6159..e6b84d4e1e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) |CurrentDate| -Generated Location: (942:25,26 [11] ) +Generated Location: (943:25,27 [11] ) |CurrentDate| -Source Location: (74:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | -Generated Location: (1315:36,7 [77] ) +Generated Location: (1316:36,7 [77] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs index 0749e043ff..0279733c99 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt index 66b904e0f6..f36a74248a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt index fbd25c513a..adbb250ced 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (942:25,26 [11] ) +Generated Location: (943:25,27 [11] ) |ParentValue| -Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1287:36,7 [50] ) +Generated Location: (1288:36,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs index 8fcbe07e1c..8fa1fcd4fb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt index a9e7aa6d1a..39250f4abb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (13:0,13 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + MarkupElement - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (14:0,14 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (13:0,13 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (38:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (38:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + HtmlContent - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt index 3a348e5162..dd1de53b35 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (14:0,14 [11] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) |ParentValue| -Generated Location: (930:25,14 [11] ) +Generated Location: (931:25,15 [11] ) |ParentValue| -Source Location: (38:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1275:36,7 [50] ) +Generated Location: (1276:36,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs index a9dc1f50a7..8cc3c4a891 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs @@ -32,7 +32,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt index 7f13867d70..9117695d7f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt @@ -14,18 +14,18 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - string - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => Value = __value - HtmlContent - (43:0,43 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (43:0,43 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + HtmlContent - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt index 5273e8b562..442c3deeb2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt @@ -3,16 +3,16 @@ Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (889:25,19 [6] ) |string| -Source Location: (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) |Value| -Generated Location: (1207:34,36 [5] ) +Generated Location: (1208:34,37 [5] ) |Value| -Source Location: (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1796:56,7 [21] ) +Generated Location: (1797:56,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs index 6e03826954..71ba78116a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs @@ -32,7 +32,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt index 710c3f96d4..9025f2bb74 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt @@ -14,18 +14,18 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - string - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Value = __value, Value) - HtmlContent - (43:0,43 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (43:0,43 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + HtmlContent - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (44:0,44 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt index 5a8c83cecf..edd0c76b17 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt @@ -3,16 +3,16 @@ Source Location: (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (889:25,19 [6] ) |string| -Source Location: (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) |Value| -Generated Location: (1142:34,36 [5] ) +Generated Location: (1143:34,37 [5] ) |Value| -Source Location: (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1770:55,7 [21] ) +Generated Location: (1771:55,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs index 1b3f9a7f88..f20ff8b076 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, -1, -1, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - 18 + 18 #line default #line hidden @@ -31,7 +31,7 @@ namespace Test , -1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt index 54b8422f6d..82a0c60c40 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt @@ -14,22 +14,22 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (35:0,35 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes - CSharpExpression - (36:0,36 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [2] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 18 - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + CSharpExpression - (37:0,37 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:0,38 [2] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 18 + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Value = __value, Value) - HtmlContent - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (42:0,42 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (51:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (51:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + HtmlContent - (43:0,43 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (43:0,43 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt index 1657e03dbb..7631f9bc1a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt @@ -1,18 +1,18 @@ -Source Location: (37:0,37 [2] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:0,38 [2] x:\dir\subdir\Test\TestComponent.cshtml) |18| -Generated Location: (973:25,37 [2] ) +Generated Location: (974:25,38 [2] ) |18| -Source Location: (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) |Value| -Generated Location: (1193:33,23 [5] ) +Generated Location: (1195:33,24 [5] ) |Value| -Source Location: (51:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1656:50,7 [21] ) +Generated Location: (1658:50,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs index d852967c80..d60000b73d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, -1, -1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden @@ -40,7 +40,7 @@ __o = typeof(MyComponent<>); __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_1(builder, -1, -1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt index 43136b9b58..eb98580da1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt @@ -14,30 +14,30 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + Component - (0:0,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => Value = __value - HtmlContent - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - Component - (32:1,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + HtmlContent - (31:0,31 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (31:0,31 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + Component - (33:1,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => Value = __value - HtmlContent - (62:1,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (62:1,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (71:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + HtmlContent - (64:1,31 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (64:1,31 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (73:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt index 6619288315..eb3bdbdaff 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt @@ -1,18 +1,18 @@ -Source Location: (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) |Value| -Generated Location: (1012:25,23 [5] ) +Generated Location: (1013:25,24 [5] ) |Value| -Source Location: (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) |Value| -Generated Location: (1521:42,23 [5] ) +Generated Location: (1523:42,24 [5] ) |Value| -Source Location: (71:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1917:60,7 [21] ) +Generated Location: (1919:60,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs index 1fd65b306f..a6a44224c7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt index d5afb9c0dd..942be4edad 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt @@ -14,13 +14,13 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [37] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement - ComponentAttribute - (25:0,25 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes + Component - (0:0,0 [38] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement + ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (27:0,27 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (37:0,37 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - CSharpCode - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n + HtmlContent - (38:0,38 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:0,38 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + CSharpCode - (49:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (49:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt index df73069bc0..1024f46464 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (27:0,27 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (1006:25,26 [7] ) +Generated Location: (1007:25,27 [7] ) |OnClick| -Source Location: (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) | private Action OnClick { get; set; } | -Generated Location: (1509:45,7 [62] ) +Generated Location: (1510:45,7 [62] ) | private Action OnClick { get; set; } | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs index b94503cbc1..593a4e2311 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs @@ -28,7 +28,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - someDate.Day + someDate.Day #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt index f99e09eeab..8061dce1d7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt @@ -14,17 +14,17 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [74] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [75] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - - ParamBefore - AttributeStructure.DoubleQuotes HtmlContent - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - SetKey - (39:0,39 [12] x:\dir\subdir\Test\TestComponent.cshtml) - someDate.Day + SetKey - (40:0,40 [12] x:\dir\subdir\Test\TestComponent.cshtml) - someDate.Day ComponentAttribute - - ParamAfter - AttributeStructure.DoubleQuotes - HtmlContent - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - HtmlContent - (74:0,74 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (74:0,74 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (135:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (135:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (85:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (85:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private DateTime someDate = DateTime.Now;\n + HtmlContent - (66:0,66 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (66:0,66 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + HtmlContent - (75:0,75 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (75:0,75 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (136:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (136:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (86:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (86:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private DateTime someDate = DateTime.Now;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt index c1e34d8309..3fb619e82b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (39:0,39 [12] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (40:0,40 [12] x:\dir\subdir\Test\TestComponent.cshtml) |someDate.Day| -Generated Location: (1108:30,39 [12] ) +Generated Location: (1109:30,40 [12] ) |someDate.Day| -Source Location: (85:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (86:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | private DateTime someDate = DateTime.Now; | -Generated Location: (1462:47,7 [49] ) +Generated Location: (1463:47,7 [49] ) | private DateTime someDate = DateTime.Now; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs index 014af5ca83..c0567c3ce5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs @@ -27,7 +27,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - 123 + 456 + 123 + 456 #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt index 7540550b11..13312be860 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt @@ -14,18 +14,18 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [95] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [96] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentChildContent - - ChildContent - context - HtmlContent - (44:0,44 [11] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (44:0,44 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some - MarkupElement - (55:1,9 [16] x:\dir\subdir\Test\TestComponent.cshtml) - el - HtmlContent - (59:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (59:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - further - HtmlContent - (71:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) - Html - content\n - SetKey - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - 123 + 456 + HtmlContent - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some + MarkupElement - (56:1,9 [16] x:\dir\subdir\Test\TestComponent.cshtml) - el + HtmlContent - (60:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (60:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - further + HtmlContent - (72:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (72:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) - Html - content\n + SetKey - (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) - 123 + 456 ComponentAttribute - - SomeProp - AttributeStructure.DoubleQuotes - HtmlContent - (39:0,39 [3] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (39:0,39 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val - HtmlContent - (95:2,14 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (95:2,14 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val + HtmlContent - (96:2,14 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (96:2,14 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt index e508dba546..642daabd5a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt @@ -1,5 +1,5 @@ -Source Location: (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) |123 + 456| -Generated Location: (1064:29,18 [9] ) +Generated Location: (1065:29,19 [9] ) |123 + 456| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs index 87a84ecb4d..598827ce99 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs @@ -27,7 +27,7 @@ namespace Test )); #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - myInstance = default(Test.MyComponent); + myInstance = default(Test.MyComponent); #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt index ee0b18b63b..2e4013600f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt @@ -14,17 +14,17 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [72] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - - ParamBefore - AttributeStructure.DoubleQuotes HtmlContent - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - ReferenceCapture - (39:0,39 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance + ReferenceCapture - (40:0,40 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance ComponentAttribute - - ParamAfter - AttributeStructure.DoubleQuotes - HtmlContent - (63:0,63 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (63:0,63 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - HtmlContent - (72:0,72 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (72:0,72 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (188:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (188:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (83:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (83:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n + HtmlContent - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + HtmlContent - (73:0,73 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:0,73 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (189:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (189:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (84:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (84:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt index 2ccd73f066..a0e550be07 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (39:0,39 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (40:0,40 [10] x:\dir\subdir\Test\TestComponent.cshtml) |myInstance| -Generated Location: (1079:29,39 [10] ) +Generated Location: (1080:29,40 [10] ) |myInstance| -Source Location: (83:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (84:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } | -Generated Location: (1444:45,7 [104] ) +Generated Location: (1445:45,7 [104] ) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs index dd57b94294..6befd8f44c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs @@ -26,7 +26,7 @@ namespace Test )); #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - myInstance = default(Test.MyComponent); + myInstance = default(Test.MyComponent); #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt index 215e15bc45..a2aae2c90d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt @@ -14,22 +14,22 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [96] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [97] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentChildContent - - ChildContent - context - HtmlContent - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some - MarkupElement - (56:1,9 [16] x:\dir\subdir\Test\TestComponent.cshtml) - el - HtmlContent - (60:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - further - HtmlContent - (72:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (72:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) - Html - content\n - ReferenceCapture - (18:0,18 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance + HtmlContent - (46:0,46 [11] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (46:0,46 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some + MarkupElement - (57:1,9 [16] x:\dir\subdir\Test\TestComponent.cshtml) - el + HtmlContent - (61:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (61:1,13 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - further + HtmlContent - (73:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:1,25 [10] x:\dir\subdir\Test\TestComponent.cshtml) - Html - content\n + ReferenceCapture - (19:0,19 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance ComponentAttribute - - SomeProp - AttributeStructure.DoubleQuotes - HtmlContent - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val - HtmlContent - (96:2,14 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (96:2,14 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (212:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (212:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (107:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (107:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n + HtmlContent - (41:0,41 [3] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val + HtmlContent - (97:2,14 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (97:2,14 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (213:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (213:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (108:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (108:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt index 3f828bcc10..f2715276d6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (18:0,18 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [10] x:\dir\subdir\Test\TestComponent.cshtml) |myInstance| -Generated Location: (1035:28,18 [10] ) +Generated Location: (1036:28,19 [10] ) |myInstance| -Source Location: (107:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (108:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } | -Generated Location: (1400:44,7 [104] ) +Generated Location: (1401:44,7 [104] ) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs index 906412e12e..cc8558c98c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs @@ -32,7 +32,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - message + message #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt index 4b0c476087..7013e6d4a9 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(1,23): Error RZ10010: The component parameter 'Message' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'Message' is generated by the 'bind-Message' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(1,23): Error RZ10010: The component parameter 'Message' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'Message' is generated by the '@bind-Message' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt index 6f3fd83e49..7b51a53f1f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt @@ -14,24 +14,24 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [58] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [59] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (22:0,22 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - (23:0,23 [7] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (23:0,23 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message - ComponentAttribute - (46:0,46 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes + ComponentAttribute - (47:0,47 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (47:0,47 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message + IntermediateToken - (48:0,48 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message IntermediateToken - - CSharp - ) - ComponentAttribute - (46:0,46 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (47:0,47 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => message = __value, message) - ComponentAttribute - (46:0,46 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (47:0,47 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => message - HtmlContent - (58:0,58 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (58:0,58 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (103:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (103:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (72:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (72:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n + HtmlContent - (59:0,59 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (59:0,59 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (104:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (104:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (73:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt index e8219984c8..d4cba761d7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt @@ -3,16 +3,16 @@ Source Location: (23:0,23 [7] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (958:25,23 [7] ) |message| -Source Location: (47:0,47 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (48:0,48 [7] x:\dir\subdir\Test\TestComponent.cshtml) |message| -Generated Location: (1295:34,47 [7] ) +Generated Location: (1296:34,48 [7] ) |message| -Source Location: (72:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) | string message = "hi"; | -Generated Location: (2310:57,12 [30] ) +Generated Location: (2311:57,12 [30] ) | string message = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs index 3880f38fad..e34f2ea5ff 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs @@ -32,7 +32,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - message + message #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt index 823665c916..59df71b41d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(1,30): Error RZ10010: The component parameter 'MessageChanged' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageChanged' is generated by the 'bind-Message' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(1,30): Error RZ10010: The component parameter 'MessageChanged' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageChanged' is generated by the '@bind-Message' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt index 6022fdbfaa..a73923595e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt @@ -14,24 +14,24 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [70] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (29:0,29 [12] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (31:0,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - (s) => {} - ComponentAttribute - (57:0,57 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes + ComponentAttribute - (58:0,58 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (58:0,58 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message + IntermediateToken - (59:0,59 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message IntermediateToken - - CSharp - ) - ComponentAttribute - (57:0,57 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (58:0,58 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => message = __value, message) - ComponentAttribute - (57:0,57 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (58:0,58 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => message - HtmlContent - (69:0,69 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (69:0,69 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (114:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (114:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (83:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (83:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n + HtmlContent - (70:0,70 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (70:0,70 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (115:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (115:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (84:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (84:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt index 87119a46ef..bb72545bd8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt @@ -3,16 +3,16 @@ Source Location: (31:0,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (1095:25,31 [9] ) |(s) => {}| -Source Location: (58:0,58 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (59:0,59 [7] x:\dir\subdir\Test\TestComponent.cshtml) |message| -Generated Location: (1446:34,58 [7] ) +Generated Location: (1447:34,59 [7] ) |message| -Source Location: (83:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (84:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) | string message = "hi"; | -Generated Location: (2461:57,12 [30] ) +Generated Location: (2462:57,12 [30] ) | string message = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs index 5410554f92..d4bea213d0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck>>( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - (s) => {} + (s) => {} #line default #line hidden @@ -32,7 +32,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - message + message #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt index 1586878f86..85a260a956 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(1,57): Error RZ10010: The component parameter 'MessageExpression' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageExpression' is generated by the 'bind-Message' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(1,58): Error RZ10010: The component parameter 'MessageExpression' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageExpression' is generated by the '@bind-Message' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt index 13d7481d85..1cefc1292f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt @@ -14,24 +14,24 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [72] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (56:0,56 [12] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes - CSharpExpression - (57:0,57 [11] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (58:0,58 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - (s) => {} - ComponentAttribute - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes + Component - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (57:0,57 [12] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + CSharpExpression - (58:0,58 [11] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (59:0,59 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - (s) => {} + ComponentAttribute - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (28:0,28 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message + IntermediateToken - (29:0,29 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message IntermediateToken - - CSharp - ) - ComponentAttribute - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => message = __value, message) - ComponentAttribute - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => message - HtmlContent - (72:0,72 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (72:0,72 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (117:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (117:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (86:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (86:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n + HtmlContent - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (118:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (118:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (87:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (87:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt index aa37e5ed58..6c92b35afa 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt @@ -1,18 +1,18 @@ -Source Location: (58:0,58 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (59:0,59 [9] x:\dir\subdir\Test\TestComponent.cshtml) |(s) => {}| -Generated Location: (1044:25,58 [9] ) +Generated Location: (1045:25,59 [9] ) |(s) => {}| -Source Location: (28:0,28 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (29:0,29 [7] x:\dir\subdir\Test\TestComponent.cshtml) |message| -Generated Location: (1364:34,28 [7] ) +Generated Location: (1366:34,29 [7] ) |message| -Source Location: (86:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (87:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) | string message = "hi"; | -Generated Location: (2379:57,12 [30] ) +Generated Location: (2381:57,12 [30] ) | string message = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs index 0345b2ac34..b4872cefdb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - () => {} + () => {} #line default #line hidden @@ -32,7 +32,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - text + text #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt index 27f6955b38..ed7f0b9a9c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(2,77): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the 'bind-value' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(2,80): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the '@bind-value' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt index 8f716b1294..856c6d91d8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt @@ -14,31 +14,31 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [112] x:\dir\subdir\Test\TestComponent.cshtml) - div + MarkupElement - (0:0,0 [115] x:\dir\subdir\Test\TestComponent.cshtml) - div HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (9:1,2 [95] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (9:1,2 [98] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (83:1,76 [11] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " + HtmlAttribute - (86:1,79 [11] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (85:1,78 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} + IntermediateToken - (88:1,81 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} IntermediateToken - - CSharp - ) - HtmlAttribute - (40:1,33 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (41:1,34 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text + IntermediateToken - (42:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text IntermediateToken - - CSharp - ) - HtmlAttribute - (40:1,33 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " + HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value, text) - HtmlContent - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (112:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (112:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (162:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (162:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n + HtmlContent - (107:1,100 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (107:1,100 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (115:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (115:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (165:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (165:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (129:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (129:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt index 631248be06..9b7da4966a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt @@ -1,18 +1,18 @@ -Source Location: (85:1,78 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (88:1,81 [8] x:\dir\subdir\Test\TestComponent.cshtml) |() => {}| -Generated Location: (1059:25,78 [8] ) +Generated Location: (1062:25,81 [8] ) |() => {}| -Source Location: (41:1,34 [4] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (42:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) |text| -Generated Location: (1312:34,34 [4] ) +Generated Location: (1316:34,35 [4] ) |text| -Source Location: (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (129:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (1641:45,12 [35] ) +Generated Location: (1645:45,12 [35] ) | private string text = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs index ff40e87e8e..6446930de5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - text + text #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt index 3277ed84c6..87b660b463 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the 'bind' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the '@bind' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt index e78c1493a7..68f39e92e6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt @@ -14,29 +14,29 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [68] x:\dir\subdir\Test\TestComponent.cshtml) - div + MarkupElement - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (9:1,2 [51] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (9:1,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text HtmlAttribute - - value=" - " HtmlAttributeValue - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17 - HtmlAttribute - (45:1,38 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (46:1,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text + IntermediateToken - (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text IntermediateToken - - CSharp - ) - HtmlAttribute - (45:1,38 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value, text) - HtmlContent - (60:1,53 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:1,53 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (68:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (68:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (118:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (118:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (82:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (82:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n + HtmlContent - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (69:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (69:2,6 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (119:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (119:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt index d0fd00e6ee..2b13abd3aa 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (46:1,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) |text| -Generated Location: (955:25,39 [4] ) +Generated Location: (956:25,40 [4] ) |text| -Source Location: (82:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (1284:36,12 [35] ) +Generated Location: (1285:36,12 [35] ) | private string text = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs index 92dd6b9fa8..617f101873 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs @@ -21,13 +21,15 @@ namespace Test protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, "test()"); + __o = #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - __o = () => {}; + () => {} #line default #line hidden #nullable disable + ; } #pragma warning restore 1998 } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt index e1149b3381..aa1716633e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(2,15): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the 'onclick' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(2,16): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the '@onclick' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt index ebf1b99d33..dfb2450cac 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [120] x:\dir\subdir\Test\TestComponent.cshtml) - div + MarkupElement - (0:0,0 [121] x:\dir\subdir\Test\TestComponent.cshtml) - div HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (9:1,2 [103] x:\dir\subdir\Test\TestComponent.cshtml) - a - HtmlContent - (51:1,44 [57] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (51:1,44 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate! - HtmlAttribute - (21:1,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (9:1,2 [104] x:\dir\subdir\Test\TestComponent.cshtml) - a + HtmlContent - (52:1,45 [57] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (52:1,45 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate! + HtmlAttribute - (22:1,15 [6] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, IntermediateToken - - CSharp - "test()" IntermediateToken - - CSharp - ) HtmlAttribute - - onclick=" - " - CSharpExpression - (40:1,33 [8] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:1,33 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} - HtmlContent - (112:1,105 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (112:1,105 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpExpressionAttributeValue - (39:1,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (41:1,34 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} + HtmlContent - (113:1,106 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (113:1,106 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt index e169bb2a5b..813ddccd4d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.mappings.txt @@ -1,5 +1,5 @@ -Source Location: (40:1,33 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (41:1,34 [8] x:\dir\subdir\Test\TestComponent.cshtml) |() => {}| -Generated Location: (1023:25,33 [8] ) +Generated Location: (1044:26,34 [8] ) |() => {}| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs index e63c6841a1..be1bfc1e2a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - someObject + someObject #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt index 3c509b3043..6ef5325c98 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [83] x:\dir\subdir\Test\TestComponent.cshtml) - elem - HtmlContent - (71:0,71 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:0,71 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello + MarkupElement - (0:0,0 [84] x:\dir\subdir\Test\TestComponent.cshtml) - elem + HtmlContent - (72:0,72 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (72:0,72 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello HtmlAttribute - - attributebefore=" - " HtmlAttributeValue - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - SetKey - (36:0,36 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject + SetKey - (37:0,37 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject HtmlAttribute - - attributeafter=" - " - HtmlAttributeValue - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - HtmlContent - (83:0,83 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (83:0,83 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (144:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (144:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (94:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (94:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n + HtmlAttributeValue - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + HtmlContent - (84:0,84 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (84:0,84 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (145:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (145:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (95:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (95:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt index 88f0d00c1a..aec8dcc55e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (36:0,36 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:0,37 [10] x:\dir\subdir\Test\TestComponent.cshtml) |someObject| -Generated Location: (908:25,36 [10] ) +Generated Location: (909:25,37 [10] ) |someObject| -Source Location: (94:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (95:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | private object someObject = new object(); | -Generated Location: (1112:35,7 [49] ) +Generated Location: (1113:35,7 [49] ) | private object someObject = new object(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs index bb720613b3..63abf53307 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs @@ -32,7 +32,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - someObject + someObject #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt index dc0d9ff81b..8191223541 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt @@ -14,17 +14,17 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [62] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [63] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text HtmlAttribute - - data-slider-min=" - " CSharpExpressionAttributeValue - (36:0,36 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Min - SetKey - (48:0,48 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject - HtmlContent - (62:0,62 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (62:0,62 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (186:6,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (186:6,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (73:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (73:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n\n [Parameter] protected int Min { get; set; }\n + SetKey - (49:0,49 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject + HtmlContent - (63:0,63 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (63:0,63 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (187:6,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (187:6,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (74:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (74:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n\n [Parameter] protected int Min { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt index 223ec0be82..6018e35989 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt @@ -3,18 +3,18 @@ Source Location: (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (900:25,37 [3] ) |Min| -Source Location: (48:0,48 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:0,49 [10] x:\dir\subdir\Test\TestComponent.cshtml) |someObject| -Generated Location: (1117:34,48 [10] ) +Generated Location: (1118:34,49 [10] ) |someObject| -Source Location: (73:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (74:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) | private object someObject = new object(); [Parameter] protected int Min { get; set; } | -Generated Location: (1321:44,7 [112] ) +Generated Location: (1322:44,7 [112] ) | private object someObject = new object(); diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs index 59e26ae7db..c4ecda875b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs @@ -22,7 +22,7 @@ namespace Test { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - myElem = default(Microsoft.AspNetCore.Components.ElementRef); + myElem = default(Microsoft.AspNetCore.Components.ElementRef); #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt index ecc56cb57f..d92f17dce9 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt @@ -14,19 +14,19 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [79] x:\dir\subdir\Test\TestComponent.cshtml) - elem - HtmlContent - (67:0,67 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (67:0,67 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello + MarkupElement - (0:0,0 [80] x:\dir\subdir\Test\TestComponent.cshtml) - elem + HtmlContent - (68:0,68 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (68:0,68 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello HtmlAttribute - - attributebefore=" - " HtmlAttributeValue - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - ReferenceCapture - (36:0,36 [6] x:\dir\subdir\Test\TestComponent.cshtml) - myElem + ReferenceCapture - (37:0,37 [6] x:\dir\subdir\Test\TestComponent.cshtml) - myElem HtmlAttribute - - attributeafter=" - " - HtmlAttributeValue - (60:0,60 [5] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (60:0,60 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - HtmlContent - (79:0,79 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (79:0,79 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (213:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (213:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (90:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (90:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Microsoft.AspNetCore.Components.ElementRef myElem;\n public void Foo() { System.GC.KeepAlive(myElem); }\n + HtmlAttributeValue - (61:0,61 [5] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (61:0,61 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + HtmlContent - (80:0,80 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (80:0,80 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (214:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (214:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (91:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (91:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Microsoft.AspNetCore.Components.ElementRef myElem;\n public void Foo() { System.GC.KeepAlive(myElem); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt index 937a6ec433..75a139f95e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (36:0,36 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:0,37 [6] x:\dir\subdir\Test\TestComponent.cshtml) |myElem| -Generated Location: (879:24,36 [6] ) +Generated Location: (880:24,37 [6] ) |myElem| -Source Location: (90:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (91:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) | private Microsoft.AspNetCore.Components.ElementRef myElem; public void Foo() { System.GC.KeepAlive(myElem); } | -Generated Location: (1118:33,7 [122] ) +Generated Location: (1119:33,7 [122] ) | private Microsoft.AspNetCore.Components.ElementRef myElem; public void Foo() { System.GC.KeepAlive(myElem); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs index cef470a901..dfe7b20a37 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs @@ -31,7 +31,7 @@ namespace Test ; #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _element = default(Microsoft.AspNetCore.Components.ElementRef); + _element = default(Microsoft.AspNetCore.Components.ElementRef); #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt index 93674cd23a..2f79627e70 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt @@ -14,17 +14,17 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [60] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [61] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text HtmlAttribute - - data-slider-min=" - " CSharpExpressionAttributeValue - (36:0,36 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Min - ReferenceCapture - (48:0,48 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _element - HtmlContent - (60:0,60 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:0,60 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (233:7,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (233:7,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (71:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private ElementRef _element;\n\n [Parameter] protected int Min { get; set; }\n public void Foo() { System.GC.KeepAlive(_element); }\n + ReferenceCapture - (49:0,49 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _element + HtmlContent - (61:0,61 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (61:0,61 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (234:7,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (234:7,5 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (72:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (72:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private ElementRef _element;\n\n [Parameter] protected int Min { get; set; }\n public void Foo() { System.GC.KeepAlive(_element); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt index c0ce653e42..b9dcf79899 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt @@ -3,19 +3,19 @@ Source Location: (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (900:25,37 [3] ) |Min| -Source Location: (48:0,48 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:0,49 [8] x:\dir\subdir\Test\TestComponent.cshtml) |_element| -Generated Location: (1088:33,48 [8] ) +Generated Location: (1089:33,49 [8] ) |_element| -Source Location: (71:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (72:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) | private ElementRef _element; [Parameter] protected int Min { get; set; } public void Foo() { System.GC.KeepAlive(_element); } | -Generated Location: (1329:42,7 [161] ) +Generated Location: (1330:42,7 [161] ) | private ElementRef _element; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt index 940ffea68d..fc7c278400 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt @@ -14,11 +14,11 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [34] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [14] x:\dir\subdir\Test\TestComponent.cshtml) - onfocus=" - " + MarkupElement - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [14] x:\dir\subdir\Test\TestComponent.cshtml) - onfocus=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, IntermediateToken - - CSharp - "alert(\"Test\");" IntermediateToken - - CSharp - ) - HtmlContent - (34:0,34 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (34:0,34 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (35:0,35 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (35:0,35 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs index a42a603e25..e1702b78a5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt index 81f387c69e..cdb4d52a62 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt @@ -14,13 +14,13 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIEventArgs e) {\n }\n + HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (38:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIEventArgs e) {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt index 7cf5ff3937..588fca2943 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (997:25,17 [7] ) +Generated Location: (998:25,18 [7] ) |OnClick| -Source Location: (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(UIEventArgs e) { } | -Generated Location: (1198:35,7 [44] ) +Generated Location: (1199:35,7 [44] ) | void OnClick(UIEventArgs e) { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs index 12d154ab22..29f88f5016 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt index 0406131459..bdba39bc17 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt @@ -14,13 +14,13 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n + HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt index e1f412da5c..2ba283cea5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (997:25,17 [7] ) +Generated Location: (998:25,18 [7] ) |OnClick| -Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(UIMouseEventArgs e) { } | -Generated Location: (1198:35,7 [49] ) +Generated Location: (1199:35,7 [49] ) | void OnClick(UIMouseEventArgs e) { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs index a860a8013b..6dd2b3847f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - x => { } + x => { } #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt index e3e2734c00..d2f1bcc92f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt @@ -14,9 +14,9 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } + IntermediateToken - (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt index 191c479233..7924871b0c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt @@ -1,5 +1,5 @@ -Source Location: (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) |x => { }| -Generated Location: (998:25,18 [8] ) +Generated Location: (999:25,19 [8] ) |x => { }| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs index 12d154ab22..29f88f5016 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt index 0406131459..bdba39bc17 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt @@ -14,13 +14,13 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n + HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt index e1f412da5c..2ba283cea5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (997:25,17 [7] ) +Generated Location: (998:25,18 [7] ) |OnClick| -Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(UIMouseEventArgs e) { } | -Generated Location: (1198:35,7 [49] ) +Generated Location: (1199:35,7 [49] ) | void OnClick(UIMouseEventArgs e) { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs index a860a8013b..6dd2b3847f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - x => { } + x => { } #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt index e3e2734c00..d2f1bcc92f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt @@ -14,9 +14,9 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } + IntermediateToken - (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt index 191c479233..7924871b0c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt @@ -1,5 +1,5 @@ -Source Location: (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) |x => { }| -Generated Location: (998:25,18 [8] ) +Generated Location: (999:25,19 [8] ) |x => { }| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs index 1ba6d3e13b..95eb1c9d08 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt index f52918c227..08fe7bb5ae 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt @@ -14,13 +14,13 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - HtmlContent - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (28:0,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n + HtmlContent - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (29:0,29 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (38:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt index b914ee847f..82e82d15bc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) |OnClick| -Generated Location: (997:25,17 [7] ) +Generated Location: (998:25,18 [7] ) |OnClick| -Source Location: (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick() { } | -Generated Location: (1198:35,7 [31] ) +Generated Location: (1199:35,7 [31] ) | void OnClick() { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs index 76b2b1ee64..3a8ea027c8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - () => { } + () => { } #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt index 6212008b9a..49b9ddde90 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt @@ -14,9 +14,9 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [33] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { } + IntermediateToken - (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { } IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt index fe2bf2e2e6..da1c213c30 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt @@ -1,5 +1,5 @@ -Source Location: (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) |() => { }| -Generated Location: (998:25,18 [9] ) +Generated Location: (999:25,19 [9] ) |() => { }| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt index d8399f72d7..d66e33fdd2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt @@ -14,8 +14,8 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [23] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [3] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [24] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [3] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, IntermediateToken - - CSharp - "foo" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs index d39f677c00..dbf2201c83 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs @@ -43,7 +43,7 @@ namespace Test )); #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _my = default(Test.MyComponent); + _my = default(Test.MyComponent); #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt index 4eb10d3cc8..f634b69431 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt @@ -14,15 +14,15 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - int ComponentAttribute - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - ReferenceCapture - (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my - HtmlContent - (44:0,44 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (44:0,44 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (146:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (146:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (55:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (55:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n + ReferenceCapture - (38:0,38 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my + HtmlContent - (45:0,45 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (45:0,45 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (147:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (147:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (56:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (56:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt index 3b28a65192..42acbfee06 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt @@ -8,17 +8,17 @@ Source Location: (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (1141:34,29 [1] ) |3| -Source Location: (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:0,38 [3] x:\dir\subdir\Test\TestComponent.cshtml) |_my| -Generated Location: (1468:45,37 [3] ) +Generated Location: (1469:45,38 [3] ) |_my| -Source Location: (55:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (56:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } | -Generated Location: (1833:61,7 [90] ) +Generated Location: (1834:61,7 [90] ) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs index 184ad28e8a..57a7412182 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs @@ -31,7 +31,7 @@ namespace Test , -1, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _my = __value; + _my = __value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt index 5d862207c9..2d876f125f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [34] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - ReferenceCapture - (27:0,27 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my - HtmlContent - (34:0,34 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (34:0,34 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (136:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (136:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (45:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (45:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n + ReferenceCapture - (28:0,28 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my + HtmlContent - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (35:0,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (137:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (137:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (46:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (46:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt index 30593196a7..13e34b6bce 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt @@ -3,17 +3,17 @@ Source Location: (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (955:25,19 [1] ) |3| -Source Location: (27:0,27 [3] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (28:0,28 [3] x:\dir\subdir\Test\TestComponent.cshtml) |_my| -Generated Location: (1139:33,27 [3] ) +Generated Location: (1140:33,28 [3] ) |_my| -Source Location: (45:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (46:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } | -Generated Location: (1512:51,7 [90] ) +Generated Location: (1513:51,7 [90] ) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs index eec991ebf1..d46aeaee75 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs @@ -44,7 +44,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _someKey + _someKey #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt index 1ad79ac195..509efd2240 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt @@ -14,15 +14,15 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [49] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [50] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - int ComponentAttribute - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - SetKey - (37:0,37 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey - HtmlContent - (49:0,49 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:0,49 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (108:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (108:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (60:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n + SetKey - (38:0,38 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey + HtmlContent - (50:0,50 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:0,50 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (109:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (109:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (61:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (61:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt index ebf40d8adc..4857c6f360 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt @@ -8,16 +8,16 @@ Source Location: (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (1141:34,29 [1] ) |3| -Source Location: (37:0,37 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:0,38 [8] x:\dir\subdir\Test\TestComponent.cshtml) |_someKey| -Generated Location: (1497:46,37 [8] ) +Generated Location: (1498:46,38 [8] ) |_someKey| -Source Location: (60:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (61:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) | private object _someKey = new object(); | -Generated Location: (1849:63,7 [47] ) +Generated Location: (1850:63,7 [47] ) | private object _someKey = new object(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs index 9a8bf595bc..985e2af1d1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs @@ -31,7 +31,7 @@ namespace Test , -1, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _someKey + _someKey #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt index 4f392ab65d..a834c28a2e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt @@ -14,16 +14,16 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [39] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - SetKey - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey - HtmlContent - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (98:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (98:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (50:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (50:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n + SetKey - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey + HtmlContent - (40:0,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (40:0,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (99:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (99:4,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (51:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (51:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt index e349879ef9..c31c87878b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt @@ -3,16 +3,16 @@ Source Location: (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) Generated Location: (955:25,19 [1] ) |3| -Source Location: (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) |_someKey| -Generated Location: (1125:33,27 [8] ) +Generated Location: (1126:33,28 [8] ) |_someKey| -Source Location: (50:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (51:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) | private object _someKey = new object(); | -Generated Location: (1477:50,7 [47] ) +Generated Location: (1478:50,7 [47] ) | private object _someKey = new object(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs index 68adb93595..5c310b5786 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - y + y #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.ir.txt index e90a860372..2ee4b6ecdd 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.ir.txt @@ -14,18 +14,18 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [22] x:\dir\subdir\Test\TestComponent.cshtml) - Counter - ComponentAttribute - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - v - AttributeStructure.DoubleQuotes + Component - (0:0,0 [23] x:\dir\subdir\Test\TestComponent.cshtml) - Counter + ComponentAttribute - (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) - v - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - y + IntermediateToken - (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - y IntermediateToken - - CSharp - ) - ComponentAttribute - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - vChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) - vChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => y = __value, y) - HtmlContent - (22:0,22 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (22:0,22 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (56:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (56:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (31:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (31:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string y = null;\n + HtmlContent - (23:0,23 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (23:0,23 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (57:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (57:3,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (32:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (32:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string y = null;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt index 3e9a2934bc..b3a9e934e4 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) |y| -Generated Location: (933:25,17 [1] ) +Generated Location: (934:25,18 [1] ) |y| -Source Location: (31:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (32:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) | string y = null; | -Generated Location: (1543:46,7 [24] ) +Generated Location: (1544:46,7 [24] ) | string y = null; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs index 088fa93c55..d64ca1fb18 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - UserName + UserName #line default #line hidden @@ -33,7 +33,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - UserIsActive + UserIsActive #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.ir.txt index 25b2dadbe2..ebeaad5efe 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.ir.txt @@ -14,26 +14,26 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [60] x:\dir\subdir\Test\TestComponent.cshtml) - User - ComponentAttribute - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - Name - AttributeStructure.DoubleQuotes + Component - (0:0,0 [62] x:\dir\subdir\Test\TestComponent.cshtml) - User + ComponentAttribute - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - Name - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserName + IntermediateToken - (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserName IntermediateToken - - CSharp - ) - ComponentAttribute - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - NameChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - NameChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => UserName = __value, UserName) - ComponentAttribute - (43:0,43 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActive - AttributeStructure.DoubleQuotes + ComponentAttribute - (45:0,45 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActive - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (44:0,44 [12] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserIsActive + IntermediateToken - (46:0,46 [12] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserIsActive IntermediateToken - - CSharp - ) - ComponentAttribute - (43:0,43 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActiveChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (45:0,45 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActiveChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => UserIsActive = __value, UserIsActive) - HtmlContent - (60:0,60 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:0,60 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n - HtmlContent - (160:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (160:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (71:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string UserName { get; set; }\n public bool UserIsActive { get; set; }\n + HtmlContent - (62:0,62 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (62:0,62 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n + HtmlContent - (162:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (162:5,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (73:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string UserName { get; set; }\n public bool UserIsActive { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt index 0c0fff94f8..7df83c3172 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt @@ -1,19 +1,19 @@ -Source Location: (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) |UserName| -Generated Location: (934:25,18 [8] ) +Generated Location: (935:25,19 [8] ) |UserName| -Source Location: (44:0,44 [12] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (46:0,46 [12] x:\dir\subdir\Test\TestComponent.cshtml) |UserIsActive| -Generated Location: (1331:35,44 [12] ) +Generated Location: (1334:35,46 [12] ) |UserIsActive| -Source Location: (71:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) | public string UserName { get; set; } public bool UserIsActive { get; set; } | -Generated Location: (1971:56,7 [88] ) +Generated Location: (1974:56,7 [88] ) | public string UserName { get; set; } public bool UserIsActive { get; set; } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs index 71d5915f96..11e53fb4ca 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test __o = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnComponentHover + OnComponentHover #line default #line hidden @@ -32,7 +32,7 @@ namespace Test __o = #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentBgColor + ParentBgColor #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt index 2ba38a6f8e..d28d68fe22 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt @@ -14,22 +14,22 @@ Document - CSharpCode - IntermediateToken - - CSharp - #pragma warning restore 0414 MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - p - HtmlAttribute - (16:0,16 [17] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - " + MarkupElement - (0:0,0 [74] x:\dir\subdir\Test\TestComponent.cshtml) - p + HtmlAttribute - (17:0,17 [17] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover + IntermediateToken - (18:0,18 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover IntermediateToken - - CSharp - ) HtmlAttribute - - style=" - " - HtmlAttributeValue - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background: - CSharpExpressionAttributeValue - (53:0,53 [15] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor - HtmlAttributeValue - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ; - HtmlContent - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (73:0,73 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - HtmlContent - (215:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (215:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(UIMouseEventArgs e)\n {\n }\n + HtmlAttributeValue - (43:0,43 [11] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (43:0,43 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background: + CSharpExpressionAttributeValue - (54:0,54 [15] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (56:0,56 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor + HtmlAttributeValue - (69:0,69 [1] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (69:0,69 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ; + HtmlContent - (74:0,74 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (74:0,74 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + HtmlContent - (216:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (216:7,1 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (83:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (83:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(UIMouseEventArgs e)\n {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt index d0728f1374..775a12f2e0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (18:0,18 [16] x:\dir\subdir\Test\TestComponent.cshtml) |OnComponentHover| -Generated Location: (997:25,17 [16] ) +Generated Location: (998:25,18 [16] ) |OnComponentHover| -Source Location: (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (56:0,56 [13] x:\dir\subdir\Test\TestComponent.cshtml) |ParentBgColor| -Generated Location: (1226:34,55 [13] ) +Generated Location: (1228:34,56 [13] ) |ParentBgColor| -Source Location: (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (83:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentBgColor { get; set; } = "#FFFFFF"; @@ -16,7 +16,7 @@ Source Location: (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) { } | -Generated Location: (1432:44,7 [132] ) +Generated Location: (1434:44,7 [132] ) | public string ParentBgColor { get; set; } = "#FFFFFF"; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs index ec7f72b1ba..1f5cb7a3ea 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs @@ -23,7 +23,7 @@ using System.Threading.Tasks; builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - async (e) => await Task.Delay(10) + async (e) => await Task.Delay(10) #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt index fe060aa5ae..4e09b37aa8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt @@ -7,9 +7,9 @@ Document - UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (31:1,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [57] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [36] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (49:1,18 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10) + IntermediateToken - (50:1,19 [33] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async (e) => await Task.Delay(10) IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs index 0de58c905e..097486bf7a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs @@ -23,7 +23,7 @@ using System.Threading.Tasks; builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt index 69a9eeff22..c040f1222f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (49:1,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(UIMouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n + CSharpCode - (69:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (69:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(UIMouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt index 8072d716d9..8c87d4c1b2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt @@ -1,11 +1,11 @@ -Source Location: (68:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (69:2,7 [91] x:\dir\subdir\Test\TestComponent.cshtml) | Task OnClick(UIMouseEventArgs e) { return Task.CompletedTask; } | -Generated Location: (1159:36,7 [91] ) +Generated Location: (1160:36,7 [91] ) | Task OnClick(UIMouseEventArgs e) { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs index 2077ed7f73..4b4b4ac178 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs @@ -23,7 +23,7 @@ using System.Threading.Tasks; builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - async () => await Task.Delay(10) + async () => await Task.Delay(10) #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt index 759e56dd28..6bd28357c8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt @@ -7,9 +7,9 @@ Document - UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (31:1,0 [55] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [56] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [35] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (49:1,18 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10) + IntermediateToken - (50:1,19 [32] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - async () => await Task.Delay(10) IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs index 344c8f5874..90aec847ea 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs @@ -23,7 +23,7 @@ using System.Threading.Tasks; builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt index f3ca73b95b..052679d9f3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (1:0,1 [30] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (31:1,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (47:1,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (31:1,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (48:1,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (48:1,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (49:1,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n + CSharpCode - (69:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (69:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt index 5b0eda19dc..936b86db90 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt @@ -1,11 +1,11 @@ -Source Location: (68:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (69:2,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) | Task OnClick() { return Task.CompletedTask; } | -Generated Location: (1159:36,7 [73] ) +Generated Location: (1160:36,7 [73] ) | Task OnClick() { diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs index 273d868ffa..144a855427 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt index c8c2c56a6d..c8e69bdb3f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt @@ -7,17 +7,17 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt index 420e2d58b5..0a65321b47 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1649:32,7 [50] ) +Generated Location: (1650:32,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs index 9a14ae9a6d..20b7089700 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs @@ -16,7 +16,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, 0, 1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt index bcdfe9a0be..1178f40ae1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt @@ -7,20 +7,20 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes + Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - CSharpCode - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n + CSharpCode - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt index b5a974473d..e5d3fe30f6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime ParentValue { get; set; } = DateTime.Now; | -Generated Location: (1170:28,7 [65] ) +Generated Location: (1171:28,7 [65] ) | public DateTime ParentValue { get; set; } = DateTime.Now; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs index 8fe1c1441d..f9bed79ba5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt index f5f15bd6da..566973aec1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt index 940da5474e..5601a367b0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1452:31,7 [50] ) +Generated Location: (1453:31,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs index 410b1222da..c7ae787add 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt index 85465b70d1..177de17395 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n + CSharpCode - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt index 94a57340c6..df0de2ac9c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "42"; | -Generated Location: (1452:31,7 [55] ) +Generated Location: (1453:31,7 [55] ) | public string ParentValue { get; set; } = "42"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs index 4c89e98c42..fbc7d4eaf3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt index fa220494f8..1f214ae4f1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - CSharpCode - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt index 6e6cebdcdd..4e03c38083 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1192:31,7 [50] ) +Generated Location: (1193:31,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs index 64a178882f..9adf6443df 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt index f307ef9cba..3373408818 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt index 2eab550e84..8d4f1883d0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (78:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1174:31,7 [50] ) +Generated Location: (1175:31,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs index ca2870a657..d212f1764b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt index c856556f0a..fcc4756ef9 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt @@ -7,17 +7,17 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt index 10b3c22d11..74fc387a35 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1392:32,7 [50] ) +Generated Location: (1393:32,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs index 02085e382a..687b30ac88 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs @@ -16,7 +16,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, 0, 1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt index 41bddb2dfe..48c9d6bcb1 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt @@ -7,20 +7,20 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes + Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - ComponentAttribute - (29:0,29 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => ParentValue - CSharpCode - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n + CSharpCode - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime ParentValue { get; set; } = DateTime.Now;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt index 711ee6031b..51f516e08f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (53:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime ParentValue { get; set; } = DateTime.Now; | -Generated Location: (1013:28,7 [65] ) +Generated Location: (1014:28,7 [65] ) | public DateTime ParentValue { get; set; } = DateTime.Now; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs index 0d1acba310..8fd0b6298c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt index 45d8b12864..ef1bcc6496 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt index 954aca0db1..0247442246 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1195:31,7 [50] ) +Generated Location: (1196:31,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs index 96dbe76fb4..d95032824a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt index dc7728e1d4..d660ba4e4b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt index f18c2582a2..ffcd97a083 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1177:31,7 [50] ) +Generated Location: (1178:31,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs index c60bea398d..fbf18acfac 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt index be4d0fa240..53c2a15c2c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - ComponentAttribute - (25:0,25 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => ParentValue = __value - CSharpCode - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n + CSharpCode - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "42";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt index abf6fbc5eb..085411eb5f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (49:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "42"; | -Generated Location: (1195:31,7 [55] ) +Generated Location: (1196:31,7 [55] ) | public string ParentValue { get; set; } = "42"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs index 7389e9ca12..64c79acea3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Value", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - person.Name + person.Name #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt index 06d9f9ff8b..8dd836efbe 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [38] x:\dir\subdir\Test\TestComponent.cshtml) - InputText - ComponentAttribute - (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + Component - (0:0,0 [39] x:\dir\subdir\Test\TestComponent.cshtml) - InputText + ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - person.Name + IntermediateToken - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - person.Name IntermediateToken - - CSharp - ) - ComponentAttribute - (23:0,23 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => person.Name = __value - CSharpCode - (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Person person = new Person();\n + CSharpCode - (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Person person = new Person();\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt index efa3742449..7a2f766573 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) | Person person = new Person(); | -Generated Location: (1187:31,1 [37] ) +Generated Location: (1188:31,1 [37] ) | Person person = new Person(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs index fd94ca9573..fa3a760b46 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs @@ -18,7 +18,7 @@ namespace Test builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - CurrentDate + CurrentDate #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt index ca7067e84f..44c82c4abb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt @@ -7,19 +7,19 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [101] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [104] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate + IntermediateToken - (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate IntermediateToken - - CSharp - , IntermediateToken - - CSharp - "MM/dd" IntermediateToken - - CSharp - ) - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, "MM/dd") - CSharpCode - (110:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (110:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n + CSharpCode - (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt index 6b18dfcea7..7d30124567 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (110:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | -Generated Location: (1239:32,7 [77] ) +Generated Location: (1240:32,7 [77] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs index 5a71a7aba1..1ba31a95e7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs @@ -18,7 +18,7 @@ namespace Test builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt index 45b1323b7d..0684c12255 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt @@ -7,17 +7,17 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [75] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [77] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (32:0,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (31:0,31 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (32:0,32 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (84:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (84:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt index f88931b97f..60bbaca2c4 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (84:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1221:32,7 [50] ) +Generated Location: (1222:32,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs index db9cbe1a68..2fcfc8f9fb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "myvalue", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt index 9a361a39cf..cce597103c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [33] x:\dir\subdir\Test\TestComponent.cshtml) - div - HtmlAttribute - (17:0,17 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " + MarkupElement - (0:0,0 [34] x:\dir\subdir\Test\TestComponent.cshtml) - div + HtmlAttribute - (18:0,18 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (17:0,17 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " + HtmlAttribute - (18:0,18 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n + CSharpCode - (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt index 4edd804d60..d71852d955 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1152:31,7 [55] ) +Generated Location: (1153:31,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs index 639024e1db..db9cbe1a68 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "myvalue", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt index 7a39525651..0329846680 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - div - HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " + MarkupElement - (0:0,0 [33] x:\dir\subdir\Test\TestComponent.cshtml) - div + HtmlAttribute - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " + HtmlAttribute - (18:0,18 [11] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (41:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (41:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n + CSharpCode - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt index 84a627a667..4edd804d60 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (41:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (42:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1151:31,7 [55] ) +Generated Location: (1152:31,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs index a97c335691..1fe6dd630e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "myvalue", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt index 1c76bbb031..f463197cde 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [27] x:\dir\subdir\Test\TestComponent.cshtml) - div - HtmlAttribute - (11:0,11 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " + MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - div + HtmlAttribute - (12:0,12 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myvalue=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (12:0,12 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (13:0,13 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (11:0,11 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " + HtmlAttribute - (12:0,12 [12] x:\dir\subdir\Test\TestComponent.cshtml) - myevent=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (36:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (36:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n + CSharpCode - (37:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (37:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentValue { get; set; } = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt index 998d07772c..3e5a9e6235 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (36:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentValue { get; set; } = "hi"; | -Generated Location: (1146:31,7 [55] ) +Generated Location: (1147:31,7 [55] ) | public string ParentValue { get; set; } = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs index 3d7b9908fb..c3defa9de2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs @@ -18,7 +18,7 @@ namespace Test builder.AddAttribute(2, "checked", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Enabled + Enabled #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt index 996e143d6e..883260bfcb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt @@ -7,17 +7,17 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Html - checkbox - HtmlAttribute - (29:0,29 [8] x:\dir\subdir\Test\TestComponent.cshtml) - checked=" - " + HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - checked=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (30:0,30 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Enabled + IntermediateToken - (31:0,31 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Enabled IntermediateToken - - CSharp - ) - HtmlAttribute - (29:0,29 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (30:0,30 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Enabled = __value, Enabled) - CSharpCode - (50:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (50:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public bool Enabled { get; set; }\n + CSharpCode - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public bool Enabled { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt index 350157a997..ea2b6c2137 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (50:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (51:1,7 [41] x:\dir\subdir\Test\TestComponent.cshtml) | public bool Enabled { get; set; } | -Generated Location: (1213:32,7 [41] ) +Generated Location: (1214:32,7 [41] ) | public bool Enabled { get; set; } | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs index 1708507077..5fb727d819 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs @@ -18,7 +18,7 @@ namespace Test builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - CurrentDate + CurrentDate #line default #line hidden @@ -26,7 +26,7 @@ namespace Test , #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Format + Format #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt index f17f9d6d5d..d1c2df3858 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt @@ -7,19 +7,19 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [62] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [64] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate + IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate IntermediateToken - - CSharp - , - IntermediateToken - (53:0,53 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Format + IntermediateToken - (55:0,55 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Format IntermediateToken - - CSharp - ) - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, Format) - CSharpCode - (71:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n\n public string Format { get; set; } = "MM/dd/yyyy";\n + CSharpCode - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n\n public string Format { get; set; } = "MM/dd/yyyy";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt index 2bae793571..849a5ea933 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt @@ -1,10 +1,10 @@ -Source Location: (71:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:1,7 [135] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); public string Format { get; set; } = "MM/dd/yyyy"; | -Generated Location: (1420:40,7 [135] ) +Generated Location: (1423:40,7 [135] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs index 9954da9045..917783f7b7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs @@ -18,7 +18,7 @@ namespace Test builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - CurrentDate + CurrentDate #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt index 06547b365a..c0937539fb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt @@ -7,19 +7,19 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [65] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [67] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate + IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - CurrentDate IntermediateToken - - CSharp - , IntermediateToken - - CSharp - "MM/dd/yyyy" IntermediateToken - - CSharp - ) - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => CurrentDate = __value, CurrentDate, "MM/dd/yyyy") - CSharpCode - (74:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (74:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n + CSharpCode - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt index da960879b4..7623ccd996 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (74:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (76:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | -Generated Location: (1243:32,7 [77] ) +Generated Location: (1244:32,7 [77] ) | public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs index 1324378dd3..00f1c1ce5b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs @@ -18,7 +18,7 @@ namespace Test builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt index 962c2b16f0..9437d0a2ec 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt @@ -7,17 +7,17 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (27:0,27 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (25:0,25 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (26:0,26 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt index 07745b86ba..e1177eb18d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (51:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1215:32,7 [50] ) +Generated Location: (1216:32,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs index 3f82eae8c0..edddc5770f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentValue + ParentValue #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt index 73a34cc087..2404d027ee 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (13:0,13 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + MarkupElement - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (14:0,14 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue + IntermediateToken - (15:0,15 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue IntermediateToken - - CSharp - ) - HtmlAttribute - (13:0,13 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (14:0,14 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue) - CSharpCode - (38:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (38:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n + CSharpCode - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public int ParentValue { get; set; } = 42;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt index f3e83a6928..492d9aee72 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (38:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (39:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml) | public int ParentValue { get; set; } = 42; | -Generated Location: (1149:31,7 [50] ) +Generated Location: (1150:31,7 [50] ) | public int ParentValue { get; set; } = 42; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs index dcd8b5d2f9..bb32b5ee0f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Item", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt index 5464babf8f..4494a51f03 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt @@ -7,16 +7,16 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - string - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => Value = __value - CSharpCode - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + CSharpCode - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt index 4f9c6e187b..12dc14d8bc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1188:31,7 [21] ) +Generated Location: (1189:31,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs index ddbeb749a1..9dfd5475bb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Item", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt index 0fab1c428c..2e46b6b40a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt @@ -7,16 +7,16 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [6] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - string - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (37:0,37 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Value = __value, Value) - CSharpCode - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + CSharpCode - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt index ca8366015b..970f440df8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (53:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1176:31,7 [21] ) +Generated Location: (1177:31,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs index 8d028ec52f..7888fa144a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs @@ -16,7 +16,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, 0, 1, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - 18 + 18 #line default #line hidden @@ -24,7 +24,7 @@ namespace Test , 2, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt index 52420833a5..ca107c0809 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt @@ -7,20 +7,20 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [42] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (35:0,35 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes - CSharpExpression - (36:0,36 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [2] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 18 - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + Component - (0:0,0 [43] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (36:0,36 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes + CSharpExpression - (37:0,37 [4] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:0,38 [2] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 18 + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => Value = __value, Value) - CSharpCode - (51:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (51:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + CSharpCode - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt index b010f942d7..eb8aac9840 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (51:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (52:1,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1234:36,7 [21] ) +Generated Location: (1236:36,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs index 9ff80d8a2d..e69b0dc4ea 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs @@ -16,7 +16,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_0(builder, 0, 1, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden @@ -26,7 +26,7 @@ namespace Test __Blazor.Test.TestComponent.TypeInference.CreateMyComponent_1(builder, 4, 5, Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - Value + Value #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt index 0d3dc296f3..be3b802110 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt @@ -7,28 +7,28 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + Component - (0:0,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (23:0,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (24:0,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => Value = __value - HtmlContent - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (30:0,30 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - Component - (32:1,0 [30] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes + HtmlContent - (31:0,31 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (31:0,31 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + Component - (33:1,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value + IntermediateToken - (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Value IntermediateToken - - CSharp - ) - ComponentAttribute - (55:1,23 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (57:1,24 [5] x:\dir\subdir\Test\TestComponent.cshtml) - ItemChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - __value => Value = __value - CSharpCode - (71:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n + CSharpCode - (73:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string Value;\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt index 5f2383089e..935542dba2 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (71:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:2,7 [21] x:\dir\subdir\Test\TestComponent.cshtml) | string Value; | -Generated Location: (1365:38,7 [21] ) +Generated Location: (1367:38,7 [21] ) | string Value; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs index 9557b72ba1..93adc09d68 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt index 3505c7600a..50a6aff9cc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [37] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement - ComponentAttribute - (25:0,25 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes + Component - (0:0,0 [38] x:\dir\subdir\Test\TestComponent.cshtml) - DynamicElement + ComponentAttribute - (26:0,26 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (26:0,26 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (27:0,27 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n + CSharpCode - (49:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (49:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Action OnClick { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt index 3af91c4f40..6da786c37d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (48:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:2,7 [62] x:\dir\subdir\Test\TestComponent.cshtml) | private Action OnClick { get; set; } | -Generated Location: (1068:30,7 [62] ) +Generated Location: (1069:30,7 [62] ) | private Action OnClick { get; set; } | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs index 555f68fd9f..2837ce7538 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.codegen.cs @@ -19,7 +19,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - someDate.Day + someDate.Day #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt index 0fc62a7b62..1d4696f21c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.ir.txt @@ -7,13 +7,13 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [74] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [75] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - - ParamBefore - AttributeStructure.DoubleQuotes HtmlContent - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - SetKey - (39:0,39 [12] x:\dir\subdir\Test\TestComponent.cshtml) - someDate.Day + SetKey - (40:0,40 [12] x:\dir\subdir\Test\TestComponent.cshtml) - someDate.Day ComponentAttribute - - ParamAfter - AttributeStructure.DoubleQuotes - HtmlContent - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - CSharpCode - (85:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (85:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private DateTime someDate = DateTime.Now;\n + HtmlContent - (66:0,66 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (66:0,66 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + CSharpCode - (86:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (86:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private DateTime someDate = DateTime.Now;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt index 2324498324..3e3319f444 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (39:0,39 [12] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (40:0,40 [12] x:\dir\subdir\Test\TestComponent.cshtml) |someDate.Day| -Generated Location: (824:21,39 [12] ) +Generated Location: (825:21,40 [12] ) |someDate.Day| -Source Location: (85:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (86:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | private DateTime someDate = DateTime.Now; | -Generated Location: (1069:32,7 [49] ) +Generated Location: (1070:32,7 [49] ) | private DateTime someDate = DateTime.Now; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs index 17c3ae4e46..0acf64696b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - 123 + 456 + 123 + 456 #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt index d5cee0071c..c80ab6a5ea 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.ir.txt @@ -7,12 +7,12 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [95] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [96] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentChildContent - - ChildContent - context - HtmlContent - (44:0,44 [11] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (44:0,44 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some + HtmlContent - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some MarkupBlock - - further content\n - SetKey - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - 123 + 456 + SetKey - (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) - 123 + 456 ComponentAttribute - - SomeProp - AttributeStructure.DoubleQuotes - HtmlContent - (39:0,39 [3] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (39:0,39 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val + HtmlContent - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt index d41eee6ea6..a3a43cf52d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithKey_WithChildContent/TestComponent.mappings.txt @@ -1,5 +1,5 @@ -Source Location: (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) |123 + 456| -Generated Location: (1029:27,18 [9] ) +Generated Location: (1030:27,19 [9] ) |123 + 456| diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs index d9b85ce961..16a293d155 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs @@ -19,7 +19,7 @@ namespace Test builder.AddComponentReferenceCapture(3, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - myInstance = (Test.MyComponent)__value; + myInstance = (Test.MyComponent)__value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt index 28b9ab348c..c724647179 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt @@ -7,13 +7,13 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [72] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - - ParamBefore - AttributeStructure.DoubleQuotes HtmlContent - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (26:0,26 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - ReferenceCapture - (39:0,39 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance + ReferenceCapture - (40:0,40 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance ComponentAttribute - - ParamAfter - AttributeStructure.DoubleQuotes - HtmlContent - (63:0,63 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (63:0,63 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - CSharpCode - (83:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (83:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n + HtmlContent - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + CSharpCode - (84:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (84:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt index 997fc133ce..cbf295b3fa 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (39:0,39 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (40:0,40 [10] x:\dir\subdir\Test\TestComponent.cshtml) |myInstance| -Generated Location: (863:21,39 [10] ) +Generated Location: (864:21,40 [10] ) |myInstance| -Source Location: (83:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (84:2,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } | -Generated Location: (1150:33,7 [104] ) +Generated Location: (1151:33,7 [104] ) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs index 0c3be4cc7e..dadcb2273d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs @@ -23,7 +23,7 @@ namespace Test builder.AddComponentReferenceCapture(5, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - myInstance = (Test.MyComponent)__value; + myInstance = (Test.MyComponent)__value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt index 039db8551f..1bc1814490 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [96] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [97] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentChildContent - - ChildContent - context - HtmlContent - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (45:0,45 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some + HtmlContent - (46:0,46 [11] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (46:0,46 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n Some MarkupBlock - - further content\n - ReferenceCapture - (18:0,18 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance + ReferenceCapture - (19:0,19 [10] x:\dir\subdir\Test\TestComponent.cshtml) - myInstance ComponentAttribute - - SomeProp - AttributeStructure.DoubleQuotes - HtmlContent - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:0,40 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val - CSharpCode - (107:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (107:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n + HtmlContent - (41:0,41 [3] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (41:0,41 [3] x:\dir\subdir\Test\TestComponent.cshtml) - Html - val + CSharpCode - (108:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (108:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Test.MyComponent myInstance;\n public void Foo() { System.GC.KeepAlive(myInstance); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt index 48bf90426b..a77e00670e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (18:0,18 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (19:0,19 [10] x:\dir\subdir\Test\TestComponent.cshtml) |myInstance| -Generated Location: (1068:27,18 [10] ) +Generated Location: (1069:27,19 [10] ) |myInstance| -Source Location: (107:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (108:4,7 [104] x:\dir\subdir\Test\TestComponent.cshtml) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } | -Generated Location: (1355:39,7 [104] ) +Generated Location: (1356:39,7 [104] ) | private Test.MyComponent myInstance; public void Foo() { System.GC.KeepAlive(myInstance); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs index 2e7578f435..e9febc02e4 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.codegen.cs @@ -26,7 +26,7 @@ namespace Test builder.AddAttribute(2, "Message", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - message + message #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt index 4b0c476087..7013e6d4a9 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(1,23): Error RZ10010: The component parameter 'Message' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'Message' is generated by the 'bind-Message' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(1,23): Error RZ10010: The component parameter 'Message' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'Message' is generated by the '@bind-Message' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt index 3eef2491d8..eeec8d2d43 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.ir.txt @@ -7,20 +7,20 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [58] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [59] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (22:0,22 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - (23:0,23 [7] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (23:0,23 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message - ComponentAttribute - (46:0,46 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes + ComponentAttribute - (47:0,47 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (47:0,47 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message + IntermediateToken - (48:0,48 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message IntermediateToken - - CSharp - ) - ComponentAttribute - (46:0,46 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (47:0,47 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => message = __value, message) - ComponentAttribute - (46:0,46 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (47:0,47 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => message - CSharpCode - (72:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (72:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n + CSharpCode - (73:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt index 17a28168d6..bd39729386 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessage/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (72:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) | string message = "hi"; | -Generated Location: (1962:41,12 [30] ) +Generated Location: (1963:41,12 [30] ) | string message = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs index d003d6c272..4336048f8e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.codegen.cs @@ -26,7 +26,7 @@ namespace Test builder.AddAttribute(2, "Message", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - message + message #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt index 823665c916..59df71b41d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(1,30): Error RZ10010: The component parameter 'MessageChanged' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageChanged' is generated by the 'bind-Message' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(1,30): Error RZ10010: The component parameter 'MessageChanged' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageChanged' is generated by the '@bind-Message' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt index 6263cb0767..633c59dfbb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.ir.txt @@ -7,20 +7,20 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [70] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (29:0,29 [12] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (31:0,31 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - (s) => {} - ComponentAttribute - (57:0,57 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes + ComponentAttribute - (58:0,58 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (58:0,58 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message + IntermediateToken - (59:0,59 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message IntermediateToken - - CSharp - ) - ComponentAttribute - (57:0,57 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (58:0,58 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => message = __value, message) - ComponentAttribute - (57:0,57 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (58:0,58 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => message - CSharpCode - (83:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (83:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n + CSharpCode - (84:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (84:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt index 0a4efd9127..842e4c91bd 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageChanged/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (83:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (84:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) | string message = "hi"; | -Generated Location: (2120:41,12 [30] ) +Generated Location: (2121:41,12 [30] ) | string message = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs index 0e59d9b397..3ae222590d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "MessageExpression", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck>>( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - (s) => {} + (s) => {} #line default #line hidden @@ -26,7 +26,7 @@ namespace Test builder.AddAttribute(2, "Message", Microsoft.AspNetCore.Components.RuntimeHelpers.TypeCheck(Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - message + message #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt index 1586878f86..85a260a956 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(1,57): Error RZ10010: The component parameter 'MessageExpression' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageExpression' is generated by the 'bind-Message' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(1,58): Error RZ10010: The component parameter 'MessageExpression' is used two or more times for this component. Parameters must be unique (case-insensitive). The component parameter 'MessageExpression' is generated by the '@bind-Message' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt index f8be13be38..2854157d93 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.ir.txt @@ -7,20 +7,20 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [72] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent - ComponentAttribute - (56:0,56 [12] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes - CSharpExpression - (57:0,57 [11] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (58:0,58 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - (s) => {} - ComponentAttribute - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes + Component - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + ComponentAttribute - (57:0,57 [12] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + CSharpExpression - (58:0,58 [11] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (59:0,59 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - (s) => {} + ComponentAttribute - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - Message - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (28:0,28 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message + IntermediateToken - (29:0,29 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - message IntermediateToken - - CSharp - ) - ComponentAttribute - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateInferred(this, __value => message = __value, message) - ComponentAttribute - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes + ComponentAttribute - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - MessageExpression - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - () => message - CSharpCode - (86:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (86:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n + CSharpCode - (87:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (87:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string message = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt index 2ad7965435..47ffb7e9f8 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateComponentParameters_IsAnError_BindMessageExpression/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (86:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (87:1,12 [30] x:\dir\subdir\Test\TestComponent.cshtml) | string message = "hi"; | -Generated Location: (2041:41,12 [30] ) +Generated Location: (2043:41,12 [30] ) | string message = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs index 3e4fd96a12..1936632b30 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.codegen.cs @@ -20,7 +20,7 @@ namespace Test builder.AddAttribute(4, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - () => {} + () => {} #line default #line hidden @@ -29,7 +29,7 @@ namespace Test builder.AddAttribute(5, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - text + text #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt index 27f6955b38..ed7f0b9a9c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(2,77): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the 'bind-value' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(2,80): Error RZ10008: The attribute 'oninput' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'oninput' is used by the '@bind-value' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt index 843e83ea74..bc501039a0 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.ir.txt @@ -7,27 +7,27 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [112] x:\dir\subdir\Test\TestComponent.cshtml) - div + MarkupElement - (0:0,0 [115] x:\dir\subdir\Test\TestComponent.cshtml) - div HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (9:1,2 [95] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (9:1,2 [98] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text - HtmlAttribute - (83:1,76 [11] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " + HtmlAttribute - (86:1,79 [11] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (85:1,78 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} + IntermediateToken - (88:1,81 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} IntermediateToken - - CSharp - ) - HtmlAttribute - (40:1,33 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (41:1,34 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text + IntermediateToken - (42:1,35 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text IntermediateToken - - CSharp - ) - HtmlAttribute - (40:1,33 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " + HtmlAttribute - (41:1,34 [5] x:\dir\subdir\Test\TestComponent.cshtml) - oninput=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value, text) - HtmlContent - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (104:1,97 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n + HtmlContent - (107:1,100 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (107:1,100 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (129:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (129:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt index 2bcebb8c5b..14cd30157b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindOnInput/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (126:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (129:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (1781:45,12 [35] ) +Generated Location: (1785:45,12 [35] ) | private string text = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs index 7b128cc38b..9b30ff16cb 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.codegen.cs @@ -21,7 +21,7 @@ namespace Test builder.AddAttribute(5, "value", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - text + text #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt index 3277ed84c6..87b660b463 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the 'bind' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(2,3): Error RZ10008: The attribute 'value' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'value' is used by the '@bind' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt index 5c99860360..8c26680d2b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.ir.txt @@ -7,25 +7,25 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [68] x:\dir\subdir\Test\TestComponent.cshtml) - div + MarkupElement - (0:0,0 [69] x:\dir\subdir\Test\TestComponent.cshtml) - div HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (9:1,2 [51] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (9:1,2 [52] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (22:1,15 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text HtmlAttribute - - value=" - " HtmlAttributeValue - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (35:1,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - 17 - HtmlAttribute - (45:1,38 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " + HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - value=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (46:1,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text + IntermediateToken - (47:1,40 [4] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - text IntermediateToken - - CSharp - ) - HtmlAttribute - (45:1,38 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " + HtmlAttribute - (46:1,39 [5] x:\dir\subdir\Test\TestComponent.cshtml) - onchange=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => text = __value, text) - HtmlContent - (60:1,53 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:1,53 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - CSharpCode - (82:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (82:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n + HtmlContent - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (61:1,54 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpCode - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private string text = "hi";\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt index 2429a1c991..c93f3fad78 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_BindValue/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (82:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (83:3,12 [35] x:\dir\subdir\Test\TestComponent.cshtml) | private string text = "hi"; | -Generated Location: (1448:37,12 [35] ) +Generated Location: (1449:37,12 [35] ) | private string text = "hi"; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs index 0e55646fd2..ae1a95bc74 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.codegen.cs @@ -17,19 +17,18 @@ namespace Test builder.AddMarkupContent(1, "\r\n "); builder.OpenElement(2, "a"); builder.AddAttribute(3, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, "test()")); - builder.AddContent(4, + builder.AddAttribute(4, "onclick", #nullable restore #line 2 "x:\dir\subdir\Test\TestComponent.cshtml" - () => {} + () => {} #line default #line hidden #nullable disable ); - builder.AddAttribute(5, "onclick", true); - builder.AddContent(6, "Learn the ten cool tricks your compiler author will hate!"); + builder.AddContent(5, "Learn the ten cool tricks your compiler author will hate!"); builder.CloseElement(); - builder.AddMarkupContent(7, "\r\n"); + builder.AddMarkupContent(6, "\r\n"); builder.CloseElement(); } #pragma warning restore 1998 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt index e1149b3381..aa1716633e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.diagnostics.txt @@ -1 +1 @@ -x:\dir\subdir\Test\TestComponent.cshtml(2,15): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the 'onclick' directive attribute. +x:\dir\subdir\Test\TestComponent.cshtml(2,16): Error RZ10008: The attribute 'onclick' is used two or more times for this element. Attributes must be unique (case-insensitive). The attribute 'onclick' is used by the '@onclick' directive attribute. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt index 9b44eab2dd..dfdcbb5b62 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DuplicateMarkupAttributes_IsAnError_EventHandler/TestComponent.ir.txt @@ -7,19 +7,19 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [120] x:\dir\subdir\Test\TestComponent.cshtml) - div + MarkupElement - (0:0,0 [121] x:\dir\subdir\Test\TestComponent.cshtml) - div HtmlContent - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) IntermediateToken - (5:0,5 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n - MarkupElement - (9:1,2 [103] x:\dir\subdir\Test\TestComponent.cshtml) - a - HtmlContent - (51:1,44 [57] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (51:1,44 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate! - HtmlAttribute - (21:1,14 [6] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (9:1,2 [104] x:\dir\subdir\Test\TestComponent.cshtml) - a + HtmlContent - (52:1,45 [57] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (52:1,45 [57] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Learn the ten cool tricks your compiler author will hate! + HtmlAttribute - (22:1,15 [6] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, IntermediateToken - - CSharp - "test()" IntermediateToken - - CSharp - ) HtmlAttribute - - onclick=" - " - CSharpExpression - (40:1,33 [8] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (40:1,33 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} - HtmlContent - (112:1,105 [2] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (112:1,105 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n + CSharpExpressionAttributeValue - (39:1,32 [11] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (41:1,34 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => {} + HtmlContent - (113:1,106 [2] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (113:1,106 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs index 20d31360cb..59d8e89f38 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.codegen.cs @@ -19,7 +19,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - someObject + someObject #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt index 9a3f8e91a9..9272a58d70 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.ir.txt @@ -7,15 +7,15 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [83] x:\dir\subdir\Test\TestComponent.cshtml) - elem - HtmlContent - (71:0,71 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:0,71 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello + MarkupElement - (0:0,0 [84] x:\dir\subdir\Test\TestComponent.cshtml) - elem + HtmlContent - (72:0,72 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (72:0,72 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello HtmlAttribute - - attributebefore=" - " HtmlAttributeValue - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - SetKey - (36:0,36 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject + SetKey - (37:0,37 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject HtmlAttribute - - attributeafter=" - " - HtmlAttributeValue - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (64:0,64 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - CSharpCode - (94:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (94:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n + HtmlAttributeValue - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (65:0,65 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + CSharpCode - (95:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (95:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt index 8c0e07e5a8..756d4e1960 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (36:0,36 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:0,37 [10] x:\dir\subdir\Test\TestComponent.cshtml) |someObject| -Generated Location: (817:21,36 [10] ) +Generated Location: (818:21,37 [10] ) |someObject| -Source Location: (94:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (95:2,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | private object someObject = new object(); | -Generated Location: (1103:33,7 [49] ) +Generated Location: (1104:33,7 [49] ) | private object someObject = new object(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs index 2b233a3819..c8a58ea342 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.codegen.cs @@ -27,7 +27,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - someObject + someObject #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt index 44ca421d42..cbe4192969 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.ir.txt @@ -7,13 +7,13 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [62] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [63] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text HtmlAttribute - - data-slider-min=" - " CSharpExpressionAttributeValue - (36:0,36 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Min - SetKey - (48:0,48 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject - CSharpCode - (73:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (73:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n\n [Parameter] protected int Min { get; set; }\n + SetKey - (49:0,49 [10] x:\dir\subdir\Test\TestComponent.cshtml) - someObject + CSharpCode - (74:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (74:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object someObject = new object();\n\n [Parameter] protected int Min { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt index aa806f2daf..8bc97b2749 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithKey_AndOtherAttributes/TestComponent.mappings.txt @@ -1,15 +1,15 @@ -Source Location: (48:0,48 [10] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:0,49 [10] x:\dir\subdir\Test\TestComponent.cshtml) |someObject| -Generated Location: (987:29,48 [10] ) +Generated Location: (988:29,49 [10] ) |someObject| -Source Location: (73:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (74:2,7 [112] x:\dir\subdir\Test\TestComponent.cshtml) | private object someObject = new object(); [Parameter] protected int Min { get; set; } | -Generated Location: (1228:40,7 [112] ) +Generated Location: (1229:40,7 [112] ) | private object someObject = new object(); diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs index 5e56244b2c..9ff437c85b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs @@ -19,7 +19,7 @@ namespace Test builder.AddElementReferenceCapture(3, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - myElem = __value; + myElem = __value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt index eb9d244a3f..d9abf6f8b5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt @@ -7,15 +7,15 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [79] x:\dir\subdir\Test\TestComponent.cshtml) - elem - HtmlContent - (67:0,67 [5] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (67:0,67 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello + MarkupElement - (0:0,0 [80] x:\dir\subdir\Test\TestComponent.cshtml) - elem + HtmlContent - (68:0,68 [5] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (68:0,68 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Hello HtmlAttribute - - attributebefore=" - " HtmlAttributeValue - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (23:0,23 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - before - ReferenceCapture - (36:0,36 [6] x:\dir\subdir\Test\TestComponent.cshtml) - myElem + ReferenceCapture - (37:0,37 [6] x:\dir\subdir\Test\TestComponent.cshtml) - myElem HtmlAttribute - - attributeafter=" - " - HtmlAttributeValue - (60:0,60 [5] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (60:0,60 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after - CSharpCode - (90:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (90:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Microsoft.AspNetCore.Components.ElementRef myElem;\n public void Foo() { System.GC.KeepAlive(myElem); }\n + HtmlAttributeValue - (61:0,61 [5] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (61:0,61 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - after + CSharpCode - (91:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (91:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private Microsoft.AspNetCore.Components.ElementRef myElem;\n public void Foo() { System.GC.KeepAlive(myElem); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt index 6582ee8df1..6daf0a696b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (36:0,36 [6] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (37:0,37 [6] x:\dir\subdir\Test\TestComponent.cshtml) |myElem| -Generated Location: (854:21,36 [6] ) +Generated Location: (855:21,37 [6] ) |myElem| -Source Location: (90:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (91:2,7 [122] x:\dir\subdir\Test\TestComponent.cshtml) | private Microsoft.AspNetCore.Components.ElementRef myElem; public void Foo() { System.GC.KeepAlive(myElem); } | -Generated Location: (1162:34,7 [122] ) +Generated Location: (1163:34,7 [122] ) | private Microsoft.AspNetCore.Components.ElementRef myElem; public void Foo() { System.GC.KeepAlive(myElem); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs index 2deb04db31..20fcb8a55f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.codegen.cs @@ -27,7 +27,7 @@ namespace Test builder.AddElementReferenceCapture(3, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _element = __value; + _element = __value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt index 20bacd2168..61dbd3d7d5 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.ir.txt @@ -7,13 +7,13 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [60] x:\dir\subdir\Test\TestComponent.cshtml) - input + MarkupElement - (0:0,0 [61] x:\dir\subdir\Test\TestComponent.cshtml) - input HtmlAttribute - - type=" - " HtmlAttributeValue - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (13:0,13 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - text HtmlAttribute - - data-slider-min=" - " CSharpExpressionAttributeValue - (36:0,36 [4] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - Min - ReferenceCapture - (48:0,48 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _element - CSharpCode - (71:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private ElementRef _element;\n\n [Parameter] protected int Min { get; set; }\n public void Foo() { System.GC.KeepAlive(_element); }\n + ReferenceCapture - (49:0,49 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _element + CSharpCode - (72:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (72:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private ElementRef _element;\n\n [Parameter] protected int Min { get; set; }\n public void Foo() { System.GC.KeepAlive(_element); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt index 9534848420..c135b4409c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef_AndOtherAttributes/TestComponent.mappings.txt @@ -1,16 +1,16 @@ -Source Location: (48:0,48 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (49:0,49 [8] x:\dir\subdir\Test\TestComponent.cshtml) |_element| -Generated Location: (1024:29,48 [8] ) +Generated Location: (1025:29,49 [8] ) |_element| -Source Location: (71:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (72:2,7 [161] x:\dir\subdir\Test\TestComponent.cshtml) | private ElementRef _element; [Parameter] protected int Min { get; set; } public void Foo() { System.GC.KeepAlive(_element); } | -Generated Location: (1289:41,7 [161] ) +Generated Location: (1290:41,7 [161] ) | private ElementRef _element; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt index 604944635e..0716b1247f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt @@ -7,8 +7,8 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [34] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [14] x:\dir\subdir\Test\TestComponent.cshtml) - onfocus=" - " + MarkupElement - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [14] x:\dir\subdir\Test\TestComponent.cshtml) - onfocus=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, IntermediateToken - - CSharp - "alert(\"Test\");" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs index 899beb4979..930e6e8d3f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt index bb5feca082..b342721c6c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIEventArgs e) {\n }\n + CSharpCode - (38:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIEventArgs e) {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt index 4e484723a0..16c66ff865 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt @@ -1,9 +1,9 @@ -Source Location: (37:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [44] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(UIEventArgs e) { } | -Generated Location: (1043:30,7 [44] ) +Generated Location: (1044:30,7 [44] ) | void OnClick(UIEventArgs e) { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs index 0352718012..3456fae0ba 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt index 297d1c1902..b65bcfeeff 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n + CSharpCode - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt index a253687898..7b71e90d6c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt @@ -1,9 +1,9 @@ -Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(UIMouseEventArgs e) { } | -Generated Location: (1043:30,7 [49] ) +Generated Location: (1044:30,7 [49] ) | void OnClick(UIMouseEventArgs e) { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs index 1b336f0287..2d569c7112 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - x => { } + x => { } #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt index b76287931a..124224c0b3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt @@ -7,9 +7,9 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } + IntermediateToken - (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs index 0352718012..3456fae0ba 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt index 297d1c1902..b65bcfeeff 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n + CSharpCode - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick(UIMouseEventArgs e) {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt index a253687898..7b71e90d6c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt @@ -1,9 +1,9 @@ -Source Location: (37:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [49] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick(UIMouseEventArgs e) { } | -Generated Location: (1043:30,7 [49] ) +Generated Location: (1044:30,7 [49] ) | void OnClick(UIMouseEventArgs e) { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs index 1b336f0287..2d569c7112 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - x => { } + x => { } #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt index b76287931a..124224c0b3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt @@ -7,9 +7,9 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [31] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [11] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } + IntermediateToken - (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - x => { } IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs index dc04883067..1b5554e598 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnClick + OnClick #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt index 131fbd9acf..fa8aa00e3b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [28] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [29] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [8] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick + IntermediateToken - (18:0,18 [7] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnClick IntermediateToken - - CSharp - ) - CSharpCode - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n + CSharpCode - (38:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (38:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n void OnClick() {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt index be2c68512e..9b9d151b3e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt @@ -1,9 +1,9 @@ -Source Location: (37:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:1,7 [31] x:\dir\subdir\Test\TestComponent.cshtml) | void OnClick() { } | -Generated Location: (1043:30,7 [31] ) +Generated Location: (1044:30,7 [31] ) | void OnClick() { } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs index 0812f45368..514cb5f9dc 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - () => { } + () => { } #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt index 17894bbeab..07dccb7c4a 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt @@ -7,9 +7,9 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [32] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [33] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [12] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { } + IntermediateToken - (19:0,19 [9] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - () => { } IntermediateToken - - CSharp - ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt index 550c6d6003..74ba68bb2d 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt @@ -7,8 +7,8 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [23] x:\dir\subdir\Test\TestComponent.cshtml) - input - HtmlAttribute - (16:0,16 [3] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " + MarkupElement - (0:0,0 [24] x:\dir\subdir\Test\TestComponent.cshtml) - input + HtmlAttribute - (17:0,17 [3] x:\dir\subdir\Test\TestComponent.cshtml) - onclick=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, IntermediateToken - - CSharp - "foo" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs index 65367f1651..c6e0ae260c 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs @@ -26,7 +26,7 @@ namespace Test builder.AddComponentReferenceCapture(2, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _my = (Test.MyComponent)__value; + _my = (Test.MyComponent)__value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt index 17b1a8615e..5dbefda847 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [44] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - int ComponentAttribute - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - ReferenceCapture - (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my - CSharpCode - (55:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (55:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n + ReferenceCapture - (38:0,38 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my + CSharpCode - (56:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (56:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt index 3387137665..a830a6ef44 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (37:0,37 [3] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:0,38 [3] x:\dir\subdir\Test\TestComponent.cshtml) |_my| -Generated Location: (1019:28,37 [3] ) +Generated Location: (1020:28,38 [3] ) |_my| -Source Location: (55:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (56:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } | -Generated Location: (1304:40,7 [90] ) +Generated Location: (1305:40,7 [90] ) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs index 3ceda598db..96d74f3a1b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs @@ -24,7 +24,7 @@ namespace Test , 2, (__value) => { #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _my = __value; + _my = __value; #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt index 4cb3b68940..cde256a50b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt @@ -7,12 +7,12 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [34] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [35] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - ReferenceCapture - (27:0,27 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my - CSharpCode - (45:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (45:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n + ReferenceCapture - (28:0,28 [3] x:\dir\subdir\Test\TestComponent.cshtml) - _my + CSharpCode - (46:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (46:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private MyComponent _my;\n public void Foo() { System.GC.KeepAlive(_my); }\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt index 92fffaf8a4..636a07a580 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt @@ -1,14 +1,14 @@ -Source Location: (27:0,27 [3] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (28:0,28 [3] x:\dir\subdir\Test\TestComponent.cshtml) |_my| -Generated Location: (868:26,27 [3] ) +Generated Location: (869:26,28 [3] ) |_my| -Source Location: (45:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (46:2,7 [90] x:\dir\subdir\Test\TestComponent.cshtml) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } | -Generated Location: (1091:37,7 [90] ) +Generated Location: (1092:37,7 [90] ) | private MyComponent _my; public void Foo() { System.GC.KeepAlive(_my); } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs index f2f52b6832..2555d4cf11 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.codegen.cs @@ -26,7 +26,7 @@ namespace Test builder.SetKey( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _someKey + _someKey #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt index d74e8164d4..f910f85b44 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.ir.txt @@ -7,11 +7,11 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [49] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [50] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentTypeArgument - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - TItem IntermediateToken - (19:0,19 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - int ComponentAttribute - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (29:0,29 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - SetKey - (37:0,37 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey - CSharpCode - (60:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (60:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n + SetKey - (38:0,38 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey + CSharpCode - (61:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (61:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt index 866f4b45f4..b412cd6048 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (37:0,37 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (38:0,38 [8] x:\dir\subdir\Test\TestComponent.cshtml) |_someKey| -Generated Location: (980:28,37 [8] ) +Generated Location: (981:28,38 [8] ) |_someKey| -Source Location: (60:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (61:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) | private object _someKey = new object(); | -Generated Location: (1221:39,7 [47] ) +Generated Location: (1222:39,7 [47] ) | private object _someKey = new object(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs index f70b761b86..a0e32863ab 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs @@ -24,7 +24,7 @@ namespace Test , 2, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - _someKey + _someKey #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt index c825818139..bfaf4a6def 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.ir.txt @@ -7,12 +7,12 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [39] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent + Component - (0:0,0 [40] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent ComponentAttribute - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Item - AttributeStructure.DoubleQuotes IntermediateToken - (19:0,19 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - 3 - SetKey - (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey - CSharpCode - (50:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (50:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n + SetKey - (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) - _someKey + CSharpCode - (51:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (51:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n private object _someKey = new object();\n NamespaceDeclaration - - __Blazor.Test.TestComponent ClassDeclaration - - internal static - TypeInference - - ComponentTypeInferenceMethod - - __Blazor.Test.TestComponent.TypeInference - CreateMyComponent_0 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt index 5d51797a0d..7252938b26 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.mappings.txt @@ -1,13 +1,13 @@ -Source Location: (27:0,27 [8] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (28:0,28 [8] x:\dir\subdir\Test\TestComponent.cshtml) |_someKey| -Generated Location: (854:26,27 [8] ) +Generated Location: (855:26,28 [8] ) |_someKey| -Source Location: (50:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (51:2,7 [47] x:\dir\subdir\Test\TestComponent.cshtml) | private object _someKey = new object(); | -Generated Location: (1056:36,7 [47] ) +Generated Location: (1057:36,7 [47] ) | private object _someKey = new object(); | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs index a8779e78dc..a06888102e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "v", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - y + y #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.ir.txt index b44f73d083..a007647a77 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.ir.txt @@ -7,14 +7,14 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [22] x:\dir\subdir\Test\TestComponent.cshtml) - Counter - ComponentAttribute - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - v - AttributeStructure.DoubleQuotes + Component - (0:0,0 [23] x:\dir\subdir\Test\TestComponent.cshtml) - Counter + ComponentAttribute - (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) - v - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - y + IntermediateToken - (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - y IntermediateToken - - CSharp - ) - ComponentAttribute - (17:0,17 [1] x:\dir\subdir\Test\TestComponent.cshtml) - vChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (18:0,18 [1] x:\dir\subdir\Test\TestComponent.cshtml) - vChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => y = __value, y) - CSharpCode - (31:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (31:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string y = null;\n + CSharpCode - (32:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (32:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n string y = null;\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt index abf3b06df4..7a50539e46 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt @@ -1,8 +1,8 @@ -Source Location: (31:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (32:1,7 [24] x:\dir\subdir\Test\TestComponent.cshtml) | string y = null; | -Generated Location: (1127:31,7 [24] ) +Generated Location: (1128:31,7 [24] ) | string y = null; | diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs index 84b9fd0a05..dfbf7e4d96 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "Name", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - UserName + UserName #line default #line hidden @@ -27,7 +27,7 @@ namespace Test builder.AddAttribute(3, "IsActive", Microsoft.AspNetCore.Components.BindMethods.GetValue( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - UserIsActive + UserIsActive #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.ir.txt index 8dea19fb3e..8f512281a3 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.ir.txt @@ -7,22 +7,22 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - Component - (0:0,0 [60] x:\dir\subdir\Test\TestComponent.cshtml) - User - ComponentAttribute - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - Name - AttributeStructure.DoubleQuotes + Component - (0:0,0 [62] x:\dir\subdir\Test\TestComponent.cshtml) - User + ComponentAttribute - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - Name - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (18:0,18 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserName + IntermediateToken - (19:0,19 [8] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserName IntermediateToken - - CSharp - ) - ComponentAttribute - (17:0,17 [9] x:\dir\subdir\Test\TestComponent.cshtml) - NameChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (18:0,18 [9] x:\dir\subdir\Test\TestComponent.cshtml) - NameChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => UserName = __value, UserName) - ComponentAttribute - (43:0,43 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActive - AttributeStructure.DoubleQuotes + ComponentAttribute - (45:0,45 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActive - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.BindMethods.GetValue( - IntermediateToken - (44:0,44 [12] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserIsActive + IntermediateToken - (46:0,46 [12] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - UserIsActive IntermediateToken - - CSharp - ) - ComponentAttribute - (43:0,43 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActiveChanged - AttributeStructure.DoubleQuotes + ComponentAttribute - (45:0,45 [13] x:\dir\subdir\Test\TestComponent.cshtml) - IsActiveChanged - AttributeStructure.DoubleQuotes CSharpExpression - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => UserIsActive = __value, UserIsActive) - CSharpCode - (71:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (71:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string UserName { get; set; }\n public bool UserIsActive { get; set; }\n + CSharpCode - (73:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (73:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string UserName { get; set; }\n public bool UserIsActive { get; set; }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt index 63f55fdef6..cce1b7362e 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt @@ -1,9 +1,9 @@ -Source Location: (71:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (73:2,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) | public string UserName { get; set; } public bool UserIsActive { get; set; } | -Generated Location: (1630:41,7 [88] ) +Generated Location: (1633:41,7 [88] ) | public string UserName { get; set; } public bool UserIsActive { get; set; } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs index 90748b1dbc..e57aea470f 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs @@ -17,7 +17,7 @@ namespace Test builder.AddAttribute(1, "onmouseover", Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - OnComponentHover + OnComponentHover #line default #line hidden @@ -26,7 +26,7 @@ namespace Test builder.AddAttribute(2, "style", "background:" + " " + ( #nullable restore #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" - ParentBgColor + ParentBgColor #line default #line hidden diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt index d2b70e2be3..904399a25b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt @@ -7,18 +7,18 @@ Document - UsingDirective - (104:5,1 [39] ) - Microsoft.AspNetCore.Components ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase - MethodDeclaration - - protected override - void - BuildRenderTree - MarkupElement - (0:0,0 [73] x:\dir\subdir\Test\TestComponent.cshtml) - p - HtmlAttribute - (16:0,16 [17] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - " + MarkupElement - (0:0,0 [74] x:\dir\subdir\Test\TestComponent.cshtml) - p + HtmlAttribute - (17:0,17 [17] x:\dir\subdir\Test\TestComponent.cshtml) - onmouseover=" - " CSharpExpressionAttributeValue - - IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, - IntermediateToken - (17:0,17 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover + IntermediateToken - (18:0,18 [16] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - OnComponentHover IntermediateToken - - CSharp - ) HtmlAttribute - - style=" - " - HtmlAttributeValue - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (42:0,42 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background: - CSharpExpressionAttributeValue - (53:0,53 [15] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (55:0,55 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor - HtmlAttributeValue - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - - IntermediateToken - (68:0,68 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ; - CSharpCode - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - IntermediateToken - (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(UIMouseEventArgs e)\n {\n }\n + HtmlAttributeValue - (43:0,43 [11] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (43:0,43 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Html - background: + CSharpExpressionAttributeValue - (54:0,54 [15] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (56:0,56 [13] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentBgColor + HtmlAttributeValue - (69:0,69 [1] x:\dir\subdir\Test\TestComponent.cshtml) - + IntermediateToken - (69:0,69 [1] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ; + CSharpCode - (83:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) + IntermediateToken - (83:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n public string ParentBgColor { get; set; } = "#FFFFFF";\n\n public void OnComponentHover(UIMouseEventArgs e)\n {\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt index 8ae9e341a1..84f51ae7e4 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt @@ -1,4 +1,4 @@ -Source Location: (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) +Source Location: (83:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) | public string ParentBgColor { get; set; } = "#FFFFFF"; @@ -6,7 +6,7 @@ Source Location: (82:1,7 [132] x:\dir\subdir\Test\TestComponent.cshtml) { } | -Generated Location: (1335:39,7 [132] ) +Generated Location: (1337:39,7 [132] ) | public string ParentBgColor { get; set; } = "#FFFFFF"; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.cspans.txt new file mode 100644 index 0000000000..9832cbfec6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [20] ) +Markup span at (5:0,5 [9] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [14] ) +Transition span at (14:0,14 [1] ) (Accepts:None) - Parent: Expression block at (14:0,14 [4] ) +Code span at (15:0,15 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (14:0,14 [4] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [14] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [20] ) +Markup span at (20:0,20 [7] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.stree.txt new file mode 100644 index 0000000000..4cbebe5321 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesAsMarkup.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..27)::27 - [] + MarkupBlock - [0..27)::27 + MarkupElement - [0..27)::27 + MarkupStartTag - [0..20)::20 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [5..19)::14 - [ @class='@foo'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..12)::6 - [@class] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [14..18)::4 + MarkupDynamicAttributeValue - [14..18)::4 - [@foo] + GenericBlock - [14..18)::4 + CSharpCodeBlock - [14..18)::4 + CSharpImplicitExpression - [14..18)::4 + CSharpTransition - [14..15)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [15..18)::3 + CSharpCodeBlock - [15..18)::3 + CSharpExpressionLiteral - [15..18)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [20..27)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.cspans.txt new file mode 100644 index 0000000000..94b56eaa83 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (5:0,5 [15] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [20] ) +Transition span at (20:0,20 [1] ) (Accepts:None) - Parent: Expression block at (20:0,20 [4] ) +Code span at (21:0,21 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (20:0,20 [4] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [20] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (26:0,26 [7] ) (Accepts:Any) - Parent: Tag block at (26:0,26 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.stree.txt new file mode 100644 index 0000000000..cc833ddb21 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ComponentFileKind_ParsesDirectiveAttributesWithParameterAsMarkup.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..33)::33 - [] + MarkupBlock - [0..33)::33 + MarkupElement - [0..33)::33 + MarkupStartTag - [0..26)::26 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [5..25)::20 - [ @class:param='@foo'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..18)::12 - [@class:param] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Text;[class:param]; + Equals;[=]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [20..24)::4 + MarkupDynamicAttributeValue - [20..24)::4 - [@foo] + GenericBlock - [20..24)::4 + CSharpCodeBlock - [20..24)::4 + CSharpImplicitExpression - [20..24)::4 + CSharpTransition - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [21..24)::3 + CSharpCodeBlock - [21..24)::3 + CSharpExpressionLiteral - [21..24)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [26..33)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.cspans.txt new file mode 100644 index 0000000000..c768c47175 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.cspans.txt @@ -0,0 +1,5 @@ +MetaCode span at (7:0,7 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [60] ) +Code span at (20:0,20 [7] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [60] ) +MetaCode span at (29:0,29 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [60] ) +MetaCode span at (40:0,40 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [60] ) +Markup span at (48:0,48 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [60] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.stree.txt new file mode 100644 index 0000000000..65d96f9566 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..60)::60 - [] + MarkupBlock - [0..60)::60 + MarkupTagHelperElement - [0..60)::60 - input[SelfClosing] - Bind + MarkupTagHelperStartTag - [0..60)::60 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperDirectiveAttribute - [6..28)::22 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [7..8)::1 + Transition;[@]; + MarkupTextLiteral - [8..18)::10 - [bind-value] + Text;[bind-value]; + Equals;[=]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [20..27)::7 + CSharpExpressionLiteral - [20..27)::7 - [Message] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[Message]; + MarkupTextLiteral - [27..28)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperDirectiveAttribute - [28..57)::29 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [29..30)::1 + Transition;[@]; + MarkupTextLiteral - [30..40)::10 - [bind-value] + Text;[bind-value]; + RazorMetaCode - [40..41)::1 + Colon;[:]; + MarkupTextLiteral - [41..46)::5 - [event] + Text;[event]; + Equals;[=]; + MarkupTextLiteral - [47..48)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [48..56)::8 + MarkupTextLiteral - [48..56)::8 - [onchange] - Gen - SpanEditHandler;Accepts:Any + Text;[onchange]; + MarkupTextLiteral - [56..57)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [57..58)::1 + MarkupTextLiteral - [57..58)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.tspans.txt new file mode 100644 index 0000000000..31cb82bc12 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_ComponentDirectiveAttributes.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [60] ) - Bind diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.cspans.txt new file mode 100644 index 0000000000..0d481010a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.cspans.txt @@ -0,0 +1,3 @@ +MetaCode span at (7:0,7 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +MetaCode span at (17:0,17 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +MetaCode span at (26:0,26 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.diag.txt new file mode 100644 index 0000000000..79b4724fca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.diag.txt @@ -0,0 +1,2 @@ +(1,8): Error RZ2008: Attribute '@bind-foo' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Object' cannot be empty or contain only whitespace. +(1,18): Error RZ2008: Attribute '@bind-foo:param' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Object' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.stree.txt new file mode 100644 index 0000000000..ba103eb489 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..35)::35 - [] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - input[SelfClosing] - Bind + MarkupTagHelperStartTag - [0..35)::35 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperDirectiveAttribute - [6..16)::10 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [7..8)::1 + Transition;[@]; + MarkupTextLiteral - [8..16)::8 - [bind-foo] + Text;[bind-foo]; + MarkupMinimizedTagHelperDirectiveAttribute - [16..32)::16 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [17..18)::1 + Transition;[@]; + MarkupTextLiteral - [18..26)::8 - [bind-foo] + Text;[bind-foo]; + RazorMetaCode - [26..27)::1 + Colon;[:]; + MarkupTextLiteral - [27..32)::5 - [param] + Text;[param]; + MarkupMiscAttributeContent - [32..33)::1 + MarkupTextLiteral - [32..33)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.tspans.txt new file mode 100644 index 0000000000..51f2cc1454 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/Rewrites_MinimizedComponentDirectiveAttributes.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - Bind diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs index 33113ec30f..6a9d72377b 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs @@ -28,7 +28,7 @@ namespace Microsoft.CodeAnalysis.Razor // both a 'value' attribute and a 'value changed' attribute. // // User types: - // + // // // We generate: // // // This isn't very different from code the user could write themselves - thus the pronouncement - // that bind is very much like a macro. + // that @bind is very much like a macro. // // A lot of the value that provide in this case is that the associations between the // elements, and the attributes aren't straightforward. @@ -46,23 +46,23 @@ namespace Microsoft.CodeAnalysis.Razor // // We handle a few different cases here: // - // 1. When given an attribute like **anywhere**'bind-value="@FirstName"' and 'bind-value:event="onchange"' we will + // 1. When given an attribute like **anywhere**'@bind-value="@FirstName"' and '@bind-value:event="onchange"' we will // generate the 'value' attribute and 'onchange' attribute. // // We don't do any transformation or inference for this case, because the developer has - // told us exactly what to do. This is the *full* form of bind, and should support any + // told us exactly what to do. This is the *full* form of @bind, and should support any // combination of element, component, and attributes. // // This is the most general case, and is implemented with a built-in tag helper that applies - // to everything, and binds to a dictionary of attributes that start with bind-. + // to everything, and binds to a dictionary of attributes that start with @bind-. // - // 2. We also support cases like 'bind-value="@FirstName"' where we will generate the 'value' + // 2. We also support cases like '@bind-value="@FirstName"' where we will generate the 'value' // attribute and another attribute based for a changed handler based on the metadata. // // These mappings are provided by attributes that tell us what attributes, suffixes, and // elements to map. // - // 3. When given an attribute like 'bind="@FirstName"' we will generate a value and change + // 3. When given an attribute like '@bind="@FirstName"' we will generate a value and change // attribute solely based on the context. We need the context of an HTML tag to know // what attributes to generate. // @@ -134,18 +134,20 @@ namespace Microsoft.CodeAnalysis.Razor rule.TagName = "*"; rule.Attribute(attribute => { - attribute.Name = "bind-"; + attribute.Name = "@bind-"; attribute.NameComparisonMode = RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch; + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); }); builder.BindAttribute(attribute => { + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; attribute.Documentation = ComponentResources.BindTagHelper_Fallback_Documentation; - var attributeName = "bind-..."; + var attributeName = "@bind-..."; attribute.Name = attributeName; - attribute.AsDictionary("bind-", typeof(object).FullName); + attribute.AsDictionary("@bind-", typeof(object).FullName); // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like // a C# property will crash trying to create the toolips. @@ -267,7 +269,7 @@ namespace Microsoft.CodeAnalysis.Razor var entry = data[i]; var name = entry.Suffix == null ? "Bind" : "Bind_" + entry.Suffix; - var attributeName = entry.Suffix == null ? "bind" : "bind-" + entry.Suffix; + var attributeName = entry.Suffix == null ? "@bind" : "@bind-" + entry.Suffix; var formatName = entry.Suffix == null ? "Format_" + entry.ValueAttribute : "Format_" + entry.Suffix; var formatAttributeName = entry.Suffix == null ? "format-" + entry.ValueAttribute : "format-" + entry.Suffix; @@ -322,11 +324,13 @@ namespace Microsoft.CodeAnalysis.Razor { a.Name = attributeName; a.NameComparisonMode = RequiredAttributeDescriptor.NameComparisonMode.FullMatch; + a.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); }); builder.BindAttribute(a => { + a.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; a.Documentation = string.Format( ComponentResources.BindTagHelper_Element_Documentation, entry.ValueAttribute, @@ -464,19 +468,21 @@ namespace Microsoft.CodeAnalysis.Razor rule.TagName = tagHelper.TagMatchingRules.Single().TagName; rule.Attribute(attribute => { - attribute.Name = "bind-" + valueAttribute.Name; + attribute.Name = "@bind-" + valueAttribute.Name; attribute.NameComparisonMode = RequiredAttributeDescriptor.NameComparisonMode.FullMatch; + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); }); builder.BindAttribute(attribute => { + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; attribute.Documentation = string.Format( ComponentResources.BindTagHelper_Component_Documentation, valueAttribute.Name, changeAttribute.Name); - attribute.Name = "bind-" + valueAttribute.Name; + attribute.Name = "@bind-" + valueAttribute.Name; attribute.TypeName = changeAttribute.TypeName; attribute.IsEnum = valueAttribute.IsEnum; diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/src/EventHandlerTagHelperDescriptorProvider.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/src/EventHandlerTagHelperDescriptorProvider.cs index 9698aac5ea..142881c134 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/src/EventHandlerTagHelperDescriptorProvider.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/src/EventHandlerTagHelperDescriptorProvider.cs @@ -102,11 +102,12 @@ namespace Microsoft.CodeAnalysis.Razor for (var i = 0; i < data.Count; i++) { var entry = data[i]; + var attributeName = "@" + entry.Attribute; var builder = TagHelperDescriptorBuilder.Create(ComponentMetadata.EventHandler.TagHelperKind, entry.Attribute, ComponentsApi.AssemblyName); builder.Documentation = string.Format( ComponentResources.EventHandlerTagHelper_Documentation, - entry.Attribute, + attributeName, entry.EventArgsType.ToDisplayString()); builder.Metadata.Add(ComponentMetadata.SpecialKindKey, ComponentMetadata.EventHandler.TagHelperKind); @@ -124,8 +125,9 @@ namespace Microsoft.CodeAnalysis.Razor rule.Attribute(a => { - a.Name = entry.Attribute; + a.Name = attributeName; a.NameComparisonMode = RequiredAttributeDescriptor.NameComparisonMode.FullMatch; + a.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); }); @@ -133,10 +135,10 @@ namespace Microsoft.CodeAnalysis.Razor { a.Documentation = string.Format( ComponentResources.EventHandlerTagHelper_Documentation, - entry.Attribute, + attributeName, entry.EventArgsType.ToDisplayString()); - a.Name = entry.Attribute; + a.Name = attributeName; // Use a string here so that we get HTML context by default. a.TypeName = typeof(string).FullName; @@ -145,6 +147,8 @@ namespace Microsoft.CodeAnalysis.Razor // logic that we don't want to interfere with. a.Metadata.Add(ComponentMetadata.Component.WeaklyTypedKey, bool.TrueString); + a.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; + // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like // a C# property will crash trying to create the tooltips. a.SetPropertyName(entry.Attribute); diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/src/KeyTagHelperDescriptorProvider.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/src/KeyTagHelperDescriptorProvider.cs index 7ea05126be..ea2830b91b 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/src/KeyTagHelperDescriptorProvider.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/src/KeyTagHelperDescriptorProvider.cs @@ -56,19 +56,21 @@ namespace Microsoft.CodeAnalysis.Razor rule.TagName = "*"; rule.Attribute(attribute => { - attribute.Name = "key"; + attribute.Name = "@key"; + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); }); builder.BindAttribute(attribute => { attribute.Documentation = ComponentResources.KeyTagHelper_Documentation; - attribute.Name = "key"; + attribute.Name = "@key"; // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like // a C# property will crash trying to create the tooltips. attribute.SetPropertyName("Key"); attribute.TypeName = typeof(object).FullName; + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); return builder.Build(); diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/src/RefTagHelperDescriptorProvider.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/src/RefTagHelperDescriptorProvider.cs index 3ff471acdc..ed1efdf453 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/src/RefTagHelperDescriptorProvider.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/src/RefTagHelperDescriptorProvider.cs @@ -56,19 +56,21 @@ namespace Microsoft.CodeAnalysis.Razor rule.TagName = "*"; rule.Attribute(attribute => { - attribute.Name = "ref"; + attribute.Name = "@ref"; + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); }); builder.BindAttribute(attribute => { attribute.Documentation = ComponentResources.RefTagHelper_Documentation; - attribute.Name = "ref"; + attribute.Name = "@ref"; // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like // a C# property will crash trying to create the tooltips. attribute.SetPropertyName("Ref"); attribute.TypeName = typeof(object).FullName; + attribute.Metadata[ComponentMetadata.Common.DirectiveAttribute] = bool.TrueString; }); return builder.Build(); diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs index f44969d253..3d48fb7666 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs @@ -96,8 +96,8 @@ namespace Test var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("bind-MyProperty", requiredAttribute.DisplayName); - Assert.Equal("bind-MyProperty", requiredAttribute.Name); + Assert.Equal("@bind-MyProperty", requiredAttribute.DisplayName); + Assert.Equal("@bind-MyProperty", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.FullMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); @@ -120,7 +120,7 @@ namespace Test "delegate to the 'MyPropertyChanged' property of the component.", attribute.Documentation); - Assert.Equal("bind-MyProperty", attribute.Name); + Assert.Equal("@bind-MyProperty", attribute.Name); Assert.Equal("MyProperty", attribute.GetPropertyName()); Assert.Equal("System.Action Test.MyComponent.MyProperty", attribute.DisplayName); @@ -211,8 +211,8 @@ namespace Test var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("bind-MyProperty", requiredAttribute.DisplayName); - Assert.Equal("bind-MyProperty", requiredAttribute.Name); + Assert.Equal("@bind-MyProperty", requiredAttribute.DisplayName); + Assert.Equal("@bind-MyProperty", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.FullMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); @@ -235,7 +235,7 @@ namespace Test "delegate to the 'MyPropertyChanged' property of the component.", attribute.Documentation); - Assert.Equal("bind-MyProperty", attribute.Name); + Assert.Equal("@bind-MyProperty", attribute.Name); Assert.Equal("MyProperty", attribute.GetPropertyName()); Assert.Equal("Microsoft.AspNetCore.Components.EventCallback Test.MyComponent.MyProperty", attribute.DisplayName); @@ -361,13 +361,13 @@ namespace Test var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("bind", requiredAttribute.DisplayName); - Assert.Equal("bind", requiredAttribute.Name); + Assert.Equal("@bind", requiredAttribute.DisplayName); + Assert.Equal("@bind", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.FullMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); - var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("bind")); + var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind")); // Invariants Assert.Empty(attribute.Diagnostics); @@ -385,7 +385,7 @@ namespace Test "delegate to the 'myevent' attribute.", attribute.Documentation); - Assert.Equal("bind", attribute.Name); + Assert.Equal("@bind", attribute.Name); Assert.Equal("Bind", attribute.GetPropertyName()); Assert.Equal("object Test.BindAttributes.Bind", attribute.DisplayName); @@ -404,7 +404,7 @@ namespace Test Assert.False(parameter.IsDefaultKind()); Assert.Equal( - "Specifies a format to convert the value specified by the 'bind' attribute. " + + "Specifies a format to convert the value specified by the '@bind' attribute. " + "The format string can currently only be used with expressions of type DateTime.", parameter.Documentation); @@ -460,11 +460,11 @@ namespace Test Assert.Equal(TagStructure.Unspecified, rule.TagStructure); var requiredAttribute = Assert.Single(rule.Attributes); - Assert.Equal("bind-myprop", requiredAttribute.DisplayName); - Assert.Equal("bind-myprop", requiredAttribute.Name); + Assert.Equal("@bind-myprop", requiredAttribute.DisplayName); + Assert.Equal("@bind-myprop", requiredAttribute.Name); - var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("bind")); - Assert.Equal("bind-myprop", attribute.Name); + var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind")); + Assert.Equal("@bind-myprop", attribute.Name); Assert.Equal("Bind_myprop", attribute.GetPropertyName()); Assert.Equal("object Test.BindAttributes.Bind_myprop", attribute.DisplayName); @@ -516,11 +516,11 @@ namespace Test Assert.Equal(TagStructure.Unspecified, rule.TagStructure); var requiredAttribute = Assert.Single(rule.Attributes); - Assert.Equal("bind", requiredAttribute.DisplayName); - Assert.Equal("bind", requiredAttribute.Name); + Assert.Equal("@bind", requiredAttribute.DisplayName); + Assert.Equal("@bind", requiredAttribute.Name); - var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("bind")); - Assert.Equal("bind", attribute.Name); + var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind")); + Assert.Equal("@bind", attribute.Name); Assert.Equal("Bind", attribute.GetPropertyName()); Assert.Equal("object Test.BindAttributes.Bind", attribute.DisplayName); @@ -583,12 +583,12 @@ namespace Test }, a => { - Assert.Equal("bind", a.DisplayName); - Assert.Equal("bind", a.Name); + Assert.Equal("@bind", a.DisplayName); + Assert.Equal("@bind", a.Name); }); - var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("bind")); - Assert.Equal("bind", attribute.Name); + var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind")); + Assert.Equal("@bind", attribute.Name); Assert.Equal("Bind", attribute.GetPropertyName()); Assert.Equal("object Test.BindAttributes.Bind", attribute.DisplayName); @@ -651,12 +651,12 @@ namespace Test }, a => { - Assert.Equal("bind-somevalue", a.DisplayName); - Assert.Equal("bind-somevalue", a.Name); + Assert.Equal("@bind-somevalue", a.DisplayName); + Assert.Equal("@bind-somevalue", a.Name); }); - var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("bind")); - Assert.Equal("bind-somevalue", attribute.Name); + var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind")); + Assert.Equal("@bind-somevalue", attribute.Name); Assert.Equal("Bind_somevalue", attribute.GetPropertyName()); Assert.Equal("object Test.BindAttributes.Bind_somevalue", attribute.DisplayName); @@ -705,7 +705,7 @@ namespace Test Assert.Equal( "Binds the provided expression to an attribute and a change event, based on the naming of " + - "the bind attribute. For example: bind-value=\"...\" and bind-value:event=\"onchange\" will assign the " + + "the bind attribute. For example: @bind-value=\"...\" and @bind-value:event=\"onchange\" will assign the " + "current value of the expression to the 'value' attribute, and assign a delegate that attempts " + "to set the value to the 'onchange' attribute.", bind.Documentation); @@ -726,13 +726,13 @@ namespace Test var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("bind-...", requiredAttribute.DisplayName); - Assert.Equal("bind-", requiredAttribute.Name); + Assert.Equal("@bind-...", requiredAttribute.DisplayName); + Assert.Equal("@bind-", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); - var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("bind")); + var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind")); // Invariants Assert.Empty(attribute.Diagnostics); @@ -743,17 +743,17 @@ namespace Test Assert.False(attribute.IsIndexerStringProperty); Assert.True(attribute.HasIndexer); - Assert.Equal("bind-", attribute.IndexerNamePrefix); + Assert.Equal("@bind-", attribute.IndexerNamePrefix); Assert.Equal("System.Object", attribute.IndexerTypeName); Assert.Equal( "Binds the provided expression to an attribute and a change event, based on the naming of " + - "the bind attribute. For example: bind-value=\"...\" and bind-value:event=\"onchange\" will assign the " + + "the bind attribute. For example: @bind-value=\"...\" and @bind-value:event=\"onchange\" will assign the " + "current value of the expression to the 'value' attribute, and assign a delegate that attempts " + "to set the value to the 'onchange' attribute.", attribute.Documentation); - Assert.Equal("bind-...", attribute.Name); + Assert.Equal("@bind-...", attribute.Name); Assert.Equal("Bind", attribute.GetPropertyName()); Assert.Equal( "System.Collections.Generic.Dictionary Microsoft.AspNetCore.Components.Bind.Bind", @@ -775,8 +775,8 @@ namespace Test Assert.Equal( "Specifies a format to convert the value specified by the corresponding bind attribute. " + - "For example: bind-value:format=\"...\" will apply a format string to the value " + - "specified in bind-value=\"...\". The format string can currently only be used with " + + "For example: @bind-value:format=\"...\" will apply a format string to the value " + + "specified in @bind-value=\"...\". The format string can currently only be used with " + "expressions of type DateTime.", parameter.Documentation); diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs index 19e2e6555d..86f26e97f3 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/EventHandlerTagHelperDescriptorProviderTest.cs @@ -58,7 +58,7 @@ namespace Test Assert.False(item.KindUsesDefaultTagHelperRuntime()); Assert.Equal( - "Sets the 'onclick' attribute to the provided string or delegate value. " + + "Sets the '@onclick' attribute to the provided string or delegate value. " + "A delegate value should be of type 'System.Action'.", item.Documentation); @@ -78,8 +78,8 @@ namespace Test var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("onclick", requiredAttribute.DisplayName); - Assert.Equal("onclick", requiredAttribute.Name); + Assert.Equal("@onclick", requiredAttribute.DisplayName); + Assert.Equal("@onclick", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.FullMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); @@ -99,15 +99,16 @@ namespace Test Assert.Collection( attribute.Metadata.OrderBy(kvp => kvp.Key), + kvp => Assert.Equal(kvp, new KeyValuePair(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString)), kvp => Assert.Equal(kvp, new KeyValuePair("Common.PropertyName", "onclick")), kvp => Assert.Equal(kvp, new KeyValuePair(ComponentMetadata.Component.WeaklyTypedKey, bool.TrueString))); Assert.Equal( - "Sets the 'onclick' attribute to the provided string or delegate value. " + + "Sets the '@onclick' attribute to the provided string or delegate value. " + "A delegate value should be of type 'System.Action'.", attribute.Documentation); - Assert.Equal("onclick", attribute.Name); + Assert.Equal("@onclick", attribute.Name); Assert.Equal("onclick", attribute.GetPropertyName()); Assert.Equal("string Test.EventHandlers.onclick", attribute.DisplayName); diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/KeyTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/KeyTagHelperDescriptorProviderTest.cs index ae9288bd19..17965726d6 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/KeyTagHelperDescriptorProviderTest.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/KeyTagHelperDescriptorProviderTest.cs @@ -55,8 +55,8 @@ namespace Microsoft.CodeAnalysis.Razor var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("key", requiredAttribute.DisplayName); - Assert.Equal("key", requiredAttribute.Name); + Assert.Equal("@key", requiredAttribute.DisplayName); + Assert.Equal("@key", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.FullMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); @@ -76,7 +76,7 @@ namespace Microsoft.CodeAnalysis.Razor "Ensures that the component or element will be preserved across renders if (and only if) the supplied key value matches.", attribute.Documentation); - Assert.Equal("key", attribute.Name); + Assert.Equal("@key", attribute.Name); Assert.Equal("Key", attribute.GetPropertyName()); Assert.Equal("object Microsoft.AspNetCore.Components.Key.Key", attribute.DisplayName); Assert.Equal("System.Object", attribute.TypeName); diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/RefTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/RefTagHelperDescriptorProviderTest.cs index fa091512b5..bd39018ab4 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/RefTagHelperDescriptorProviderTest.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/RefTagHelperDescriptorProviderTest.cs @@ -55,8 +55,8 @@ namespace Microsoft.CodeAnalysis.Razor var requiredAttribute = Assert.Single(rule.Attributes); Assert.Empty(requiredAttribute.Diagnostics); - Assert.Equal("ref", requiredAttribute.DisplayName); - Assert.Equal("ref", requiredAttribute.Name); + Assert.Equal("@ref", requiredAttribute.DisplayName); + Assert.Equal("@ref", requiredAttribute.Name); Assert.Equal(RequiredAttributeDescriptor.NameComparisonMode.FullMatch, requiredAttribute.NameComparison); Assert.Null(requiredAttribute.Value); Assert.Equal(RequiredAttributeDescriptor.ValueComparisonMode.None, requiredAttribute.ValueComparison); @@ -76,7 +76,7 @@ namespace Microsoft.CodeAnalysis.Razor "Populates the specified field or property with a reference to the element or component.", attribute.Documentation); - Assert.Equal("ref", attribute.Name); + Assert.Equal("@ref", attribute.Name); Assert.Equal("Ref", attribute.GetPropertyName()); Assert.Equal("object Microsoft.AspNetCore.Components.Ref.Ref", attribute.DisplayName); Assert.Equal("System.Object", attribute.TypeName); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/Legacy/ParserTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/Legacy/ParserTestBase.cs index 8ed5fc2121..2ea8205b15 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/Legacy/ParserTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/Legacy/ParserTestBase.cs @@ -181,18 +181,18 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy AssertSyntaxTreeNodeMatchesBaseline(syntaxTree); } - internal RazorSyntaxTree ParseDocument(string document, bool designTime = false, IEnumerable directives = null, RazorParserFeatureFlags featureFlags = null) + internal RazorSyntaxTree ParseDocument(string document, bool designTime = false, IEnumerable directives = null, RazorParserFeatureFlags featureFlags = null, string fileKind = null) { - return ParseDocument(RazorLanguageVersion.Latest, document, directives, designTime, featureFlags); + return ParseDocument(RazorLanguageVersion.Latest, document, directives, designTime, featureFlags, fileKind); } - internal virtual RazorSyntaxTree ParseDocument(RazorLanguageVersion version, string document, IEnumerable directives, bool designTime = false, RazorParserFeatureFlags featureFlags = null) + internal virtual RazorSyntaxTree ParseDocument(RazorLanguageVersion version, string document, IEnumerable directives, bool designTime = false, RazorParserFeatureFlags featureFlags = null, string fileKind = null) { directives = directives ?? Array.Empty(); var source = TestRazorSourceDocument.Create(document, filePath: null, relativePath: null, normalizeNewLines: true); - var options = CreateParserOptions(version, directives, designTime, featureFlags); + var options = CreateParserOptions(version, directives, designTime, featureFlags, fileKind); var context = new ParserContext(source, options); var codeParser = new CSharpCodeParser(directives, context); @@ -221,6 +221,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy ParseDocumentTest(document, null, false); } + internal virtual void ParseDocumentTest(string document, string fileKind) + { + ParseDocumentTest(document, null, false, fileKind); + } + internal virtual void ParseDocumentTest(string document, IEnumerable directives) { ParseDocumentTest(document, directives, false); @@ -231,14 +236,14 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy ParseDocumentTest(document, null, designTime); } - internal virtual void ParseDocumentTest(string document, IEnumerable directives, bool designTime) + internal virtual void ParseDocumentTest(string document, IEnumerable directives, bool designTime, string fileKind = null) { - ParseDocumentTest(RazorLanguageVersion.Latest, document, directives, designTime); + ParseDocumentTest(RazorLanguageVersion.Latest, document, directives, designTime, fileKind); } - internal virtual void ParseDocumentTest(RazorLanguageVersion version, string document, IEnumerable directives, bool designTime) + internal virtual void ParseDocumentTest(RazorLanguageVersion version, string document, IEnumerable directives, bool designTime, string fileKind = null) { - var result = ParseDocument(version, document, directives, designTime); + var result = ParseDocument(version, document, directives, designTime, fileKind: fileKind); BaselineTest(result); } @@ -247,14 +252,15 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy RazorLanguageVersion version, IEnumerable directives, bool designTime, - RazorParserFeatureFlags featureFlags = null) + RazorParserFeatureFlags featureFlags = null, + string fileKind = null) { return new TestRazorParserOptions( directives.ToArray(), designTime, parseLeadingDirectives: false, version: version, - fileKind: FileKinds.Legacy, + fileKind: fileKind ?? FileKinds.Legacy, featureFlags: featureFlags); }