From d8bce5124243385bfd24a867c369170c7165fb24 Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Mon, 11 Sep 2023 11:28:13 +0200 Subject: [PATCH 1/3] Avoid using `AddComponentParameter` in design time --- .../ComponentDesignTimeNodeWriter.cs | 11 ++++--- .../src/Components/ComponentNodeWriter.cs | 2 +- .../ComponentCodeGenerationTestBase.cs | 29 +++++++++++++++++++ 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs index 906dfd1c51a..4680d07d4c6 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs @@ -27,6 +27,9 @@ public ComponentDesignTimeNodeWriter(RazorLanguageVersion version) : base(versio { } + // Avoid using `AddComponentParameter` in design time where we currently don't detect its availability. + protected override bool CanUseAddComponentParameter(CodeRenderingContext context) => false; + public override void WriteMarkupBlock(CodeRenderingContext context, MarkupBlockIntermediateNode node) { if (context == null) @@ -377,8 +380,8 @@ public override void WriteComponent(CodeRenderingContext context, ComponentInter // Writes something like: // // __builder.OpenComponent(0); - // __builder.AddComponentParameter(1, "Foo", ...); - // __builder.AddComponentParameter(2, "ChildContent", ...); + // __builder.AddAttribute(1, "Foo", ...); + // __builder.AddAttribute(2, "ChildContent", ...); // __builder.SetKey(someValue); // __builder.AddElementCapture(3, (__value) => _field = __value); // __builder.CloseComponent(); @@ -986,9 +989,9 @@ public override void WriteComponentChildContent(CodeRenderingContext context, Co // Writes something like: // - // __builder.AddComponentParameter(1, "ChildContent", (RenderFragment)((__builder73) => { ... })); + // __builder.AddAttribute(1, "ChildContent", (RenderFragment)((__builder73) => { ... })); // OR - // __builder.AddComponentParameter(1, "ChildContent", (RenderFragment)((person) => (__builder73) => { ... })); + // __builder.AddAttribute(1, "ChildContent", (RenderFragment)((person) => (__builder73) => { ... })); BeginWriteAttribute(context, node.AttributeName); context.CodeWriter.WriteParameterSeparator(); context.CodeWriter.Write("("); diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentNodeWriter.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentNodeWriter.cs index e72fa3ae996..9d5ab3d8ddb 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentNodeWriter.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentNodeWriter.cs @@ -21,7 +21,7 @@ protected ComponentNodeWriter(RazorLanguageVersion version) _version = version; } - protected bool CanUseAddComponentParameter(CodeRenderingContext context) + protected virtual bool CanUseAddComponentParameter(CodeRenderingContext context) { return !context.Options.SuppressAddComponentParameter && _version.CompareTo(RazorLanguageVersion.Version_8_0) >= 0; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs index b24954daa14..a48d7e45f84 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs @@ -1638,6 +1638,35 @@ public class MyComponent : ComponentBase CompileToAssembly(generated); } + [Fact, WorkItem("https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1869483")] + public void AddComponentParameter() + { + var generated = CompileToCSharp(""" + @typeparam T + + + + @code { + [Parameter] + public T Param { get; set; } + } + """); + + CompileToAssembly(generated); + + if (DesignTime) + { + // In design-time, AddComponentParameter shouldn't be used. + Assert.Contains("AddAttribute", generated.Code); + Assert.DoesNotContain("AddComponentParameter", generated.Code); + } + else + { + Assert.DoesNotContain("AddAttribute", generated.Code); + Assert.Contains("AddComponentParameter", generated.Code); + } + } + #endregion #region Bind From d425fc85ba8b5f5796374beb2f35f313c06b3179 Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Mon, 11 Sep 2023 13:01:24 +0200 Subject: [PATCH 2/3] Update baselines --- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 10 +++++----- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 8 ++++---- .../TestComponent.codegen.cs | 6 +++--- .../UseTestComponent.codegen.cs | 8 ++++---- .../UseTestComponent.codegen.cs | 8 ++++---- .../UseTestComponent.codegen.cs | 8 ++++---- .../UseTestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 6 +++--- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 16 ++++++++-------- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 2 +- .../TestComponent.codegen.cs | 4 ++-- .../TestComponent.codegen.cs | 2 +- 60 files changed, 156 insertions(+), 156 deletions(-) diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs index 6ed71aad3b7..9f20a4dbbd9 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs @@ -68,9 +68,9 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, T __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1, int __seq2, global::System.Linq.Expressions.Expression> __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "SomeParam", __arg0); - __builder.AddComponentParameter(__seq1, "SomeParamChanged", __arg1); - __builder.AddComponentParameter(__seq2, "SomeParamExpression", __arg2); + __builder.AddAttribute(__seq0, "SomeParam", (object)__arg0); + __builder.AddAttribute(__seq1, "SomeParamChanged", (object)__arg1); + __builder.AddAttribute(__seq2, "SomeParamExpression", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.codegen.cs index f9a94623de5..7503f803731 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric/TestComponent.codegen.cs @@ -68,9 +68,9 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback> __arg1, int __seq2, global::System.Linq.Expressions.Expression>> __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "SomeParam", __arg0); - __builder.AddComponentParameter(__seq1, "SomeParamChanged", __arg1); - __builder.AddComponentParameter(__seq2, "SomeParamExpression", __arg2); + __builder.AddAttribute(__seq0, "SomeParam", (object)__arg0); + __builder.AddAttribute(__seq1, "SomeParamChanged", (object)__arg1); + __builder.AddAttribute(__seq2, "SomeParamExpression", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs index 2494c7b036e..2d06122d6e5 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs @@ -68,9 +68,9 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, T __arg0, int __seq1, global::System.Action __arg1, int __seq2, global::System.Linq.Expressions.Expression> __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "SomeParam", __arg0); - __builder.AddComponentParameter(__seq1, "SomeParamChanged", __arg1); - __builder.AddComponentParameter(__seq2, "SomeParamExpression", __arg2); + __builder.AddAttribute(__seq0, "SomeParam", (object)__arg0); + __builder.AddAttribute(__seq1, "SomeParamChanged", (object)__arg1); + __builder.AddAttribute(__seq2, "SomeParamExpression", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs index f4072d4f65e..3b0c9886bbc 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs @@ -87,8 +87,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::System.Action __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs index 6fe19d3dd7f..f95fed5f34b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs @@ -87,8 +87,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs index cfe9c048fcc..50761659a3a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs @@ -86,8 +86,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs index 89a425c2d43..a406fc02c33 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs @@ -87,8 +87,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.codegen.cs index 9e1452cdf27..bfea9c61a6b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_CombiningMultipleAncestors/TestComponent.codegen.cs @@ -104,8 +104,8 @@ internal static class TypeInference public static global::Test.ParentOne CreateParentOne_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TOne __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } @@ -117,8 +117,8 @@ public static void CreateParentOne_0_CaptureParameters(TOne __arg0, out TO public static global::Test.ParentTwo CreateParentTwo_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TTwo __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.codegen.cs index 3270c44b7e9..7e32d6e6aa8 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericChildContent/TestComponent.codegen.cs @@ -81,8 +81,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } @@ -94,7 +94,7 @@ public static void CreateGrid_0_CaptureParameters(global::System.Collecti public static global::Test.Column CreateColumn_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, global::System.Collections.Generic.IEnumerable __syntheticArg0, int __seq0, global::Microsoft.AspNetCore.Components.RenderFragment __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "ChildContent", __arg0); + __builder.AddAttribute(__seq0, "ChildContent", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.codegen.cs index cffbe732292..21956d2194d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_GenericLambda/TestComponent.codegen.cs @@ -91,8 +91,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } @@ -104,7 +104,7 @@ public static void CreateGrid_0_CaptureParameters(global::System.Collecti public static global::Test.Column CreateColumn_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, global::System.Collections.Generic.IEnumerable __syntheticArg0, int __seq0, global::System.Func __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "SomeLambda", __arg0); + __builder.AddAttribute(__seq0, "SomeLambda", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.codegen.cs index 8a424e49158..c12c8c53fc2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints/TestComponent.codegen.cs @@ -80,10 +80,10 @@ internal static class TypeInference where TItem : class, new() { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Title", __arg0); - __builder.AddComponentParameter(__seq1, "FieldName", __arg1); - __builder.AddComponentParameter(__seq2, "Format", __arg2); - __builder.AddComponentParameter(__seq3, "Width", __arg3); + __builder.AddAttribute(__seq0, "Title", (object)__arg0); + __builder.AddAttribute(__seq1, "FieldName", (object)__arg1); + __builder.AddAttribute(__seq2, "Format", (object)__arg2); + __builder.AddAttribute(__seq3, "Width", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs index d3a0152653a..06a4878051c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces/TestComponent.codegen.cs @@ -87,10 +87,10 @@ internal static class TypeInference where TItem : global::Models.WeatherForecast, new() { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Title", __arg0); - __builder.AddComponentParameter(__seq1, "FieldName", __arg1); - __builder.AddComponentParameter(__seq2, "Format", __arg2); - __builder.AddComponentParameter(__seq3, "Width", __arg3); + __builder.AddAttribute(__seq0, "Title", (object)__arg0); + __builder.AddAttribute(__seq1, "FieldName", (object)__arg1); + __builder.AddAttribute(__seq2, "Format", (object)__arg2); + __builder.AddAttribute(__seq3, "Width", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs index 3cfb6c88cd2..ee4e49daa0f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints/TestComponent.codegen.cs @@ -87,10 +87,10 @@ internal static class TypeInference where TItem : global::System.Collections.Generic.IEnumerable { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Title", __arg0); - __builder.AddComponentParameter(__seq1, "FieldName", __arg1); - __builder.AddComponentParameter(__seq2, "Format", __arg2); - __builder.AddComponentParameter(__seq3, "Width", __arg3); + __builder.AddAttribute(__seq0, "Title", (object)__arg0); + __builder.AddAttribute(__seq1, "FieldName", (object)__arg1); + __builder.AddAttribute(__seq2, "Format", (object)__arg2); + __builder.AddAttribute(__seq3, "Width", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.codegen.cs index 9bddbba00ec..b78409f4fed 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Inferred_WithConstraints/TestComponent.codegen.cs @@ -80,10 +80,10 @@ internal static class TypeInference where TItem : class { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Title", __arg0); - __builder.AddComponentParameter(__seq1, "FieldName", __arg1); - __builder.AddComponentParameter(__seq2, "Format", __arg2); - __builder.AddComponentParameter(__seq3, "Width", __arg3); + __builder.AddAttribute(__seq0, "Title", (object)__arg0); + __builder.AddAttribute(__seq1, "FieldName", (object)__arg1); + __builder.AddAttribute(__seq2, "Format", (object)__arg2); + __builder.AddAttribute(__seq3, "Width", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.codegen.cs index edf4bfeb55a..10f753ca40f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Multilayer/TestComponent.codegen.cs @@ -82,8 +82,8 @@ internal static class TypeInference public static global::Test.Ancestor CreateAncestor_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.codegen.cs index c362086e843..03c0b74db5e 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_MultipleTypes/TestComponent.codegen.cs @@ -108,9 +108,9 @@ internal static class TypeInference public static global::Test.Parent CreateParent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.Dictionary __arg0, int __seq1, TOther __arg1, int __seq2, global::Microsoft.AspNetCore.Components.RenderFragment __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Data", __arg0); - __builder.AddComponentParameter(__seq1, "Other", __arg1); - __builder.AddComponentParameter(__seq2, "ChildContent", __arg2); + __builder.AddAttribute(__seq0, "Data", (object)__arg0); + __builder.AddAttribute(__seq1, "Other", (object)__arg1); + __builder.AddAttribute(__seq2, "ChildContent", (object)__arg2); __builder.CloseComponent(); return default; } @@ -123,7 +123,7 @@ public static void CreateParent_0_CaptureParameters(global public static global::Test.Child CreateChild_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, TOther __syntheticArg0, global::System.Collections.Generic.Dictionary __syntheticArg1, global::System.Collections.Generic.Dictionary __syntheticArg2, int __seq0, global::System.Collections.Generic.ICollection __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "ChildOnlyItems", __arg0); + __builder.AddAttribute(__seq0, "ChildOnlyItems", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.codegen.cs index 996ad3943de..21cec89183d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_CreatesError/TestComponent.codegen.cs @@ -68,8 +68,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.codegen.cs index d56a40e2741..56533f96704 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_NotCascaded_Inferred/TestComponent.codegen.cs @@ -80,8 +80,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.codegen.cs index fed8711f3f5..7cb78c3b69b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override/TestComponent.codegen.cs @@ -91,8 +91,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } @@ -104,7 +104,7 @@ public static void CreateGrid_0_CaptureParameters(global::System.Collecti public static global::Test.Column CreateColumn_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "OverrideParam", __arg0); + __builder.AddAttribute(__seq0, "OverrideParam", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.codegen.cs index 3dbb19aadd0..5b382cf4bf2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Override_Multilayer/TestComponent.codegen.cs @@ -131,8 +131,8 @@ internal static class TypeInference public static global::Test.TreeNode CreateTreeNode_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } @@ -144,8 +144,8 @@ public static void CreateTreeNode_0_CaptureParameters(TItem __arg0, out T public static global::Test.TreeNode CreateTreeNode_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } @@ -157,7 +157,7 @@ public static void CreateTreeNode_1_CaptureParameters(TItem __arg0, out T public static global::Test.TreeNode CreateTreeNode_2(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, TItem __syntheticArg0, int __seq0, global::Microsoft.AspNetCore.Components.RenderFragment __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "ChildContent", __arg0); + __builder.AddAttribute(__seq0, "ChildContent", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.codegen.cs index 1ca343cbdc3..43f9f08b98d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_ParameterInNamespace/TestComponent.codegen.cs @@ -82,8 +82,8 @@ internal static class TypeInference public static global::MyApp.Components.ParentComponent CreateParentComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::MyApp.MyClass __arg0, int __seq1, Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Parameter", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Parameter", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.codegen.cs index 92ed72beb2b..fae21f5e6a2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Partial_CreatesError/TestComponent.codegen.cs @@ -83,8 +83,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.codegen.cs index b94d20cf0eb..f03904d2741 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_Tuple/TestComponent.codegen.cs @@ -72,8 +72,8 @@ internal static class TypeInference public static global::Test.ParentComponent CreateParentComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, (T, T) __arg0, int __seq1, Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Parameter", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Parameter", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.codegen.cs index 8303f7b9ae7..743ce5a7d08 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithSplatAndKey/TestComponent.codegen.cs @@ -103,8 +103,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.IEnumerable __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1, int __seq2, object __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.SetKey(__arg2); __builder.CloseComponent(); return default; @@ -117,8 +117,8 @@ public static void CreateGrid_0_CaptureParameters(global::System.Collecti public static global::Test.Column CreateColumn_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, global::System.Collections.Generic.IEnumerable __syntheticArg0, int __seq0, global::System.Object __arg0, int __seq1, global::System.Object __arg1, int __seq2, object __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Title", __arg0); - __builder.AddComponentParameter(__seq1, "Another", __arg1); + __builder.AddAttribute(__seq0, "Title", (object)__arg0); + __builder.AddAttribute(__seq1, "Another", (object)__arg1); __builder.SetKey(__arg2); __builder.CloseComponent(); return default; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.codegen.cs index 2b1ca7cae49..9079733ce23 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/CascadingGenericInference_WithUnrelatedType_CreatesError/TestComponent.codegen.cs @@ -71,8 +71,8 @@ internal static class TypeInference public static global::Test.Grid CreateGrid_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Collections.Generic.Dictionary __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Items", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs index ec87ee9c901..9631846c552 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs @@ -75,9 +75,9 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::System.Object __arg1, int __seq2, global::System.Object __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "Item", __arg1); - __builder.AddComponentParameter(__seq2, "ItemChanged", __arg2); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "Item", (object)__arg1); + __builder.AddAttribute(__seq2, "ItemChanged", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs index b2025671135..abbdc99110c 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs @@ -96,16 +96,16 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::System.Action __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ItemChanged", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ItemChanged", (object)__arg1); __builder.CloseComponent(); return default; } public static global::Test.MyComponent CreateMyComponent_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::System.Action __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ItemChanged", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ItemChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.codegen.cs index 1552867eec5..4e966a5ba7f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.codegen.cs @@ -68,8 +68,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.codegen.cs index cc24c86b34e..71e0a7d6c8f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.codegen.cs @@ -67,8 +67,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::System.Object __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "Other", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "Other", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.codegen.cs index 80f0739e353..29de127e99b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.codegen.cs @@ -59,7 +59,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.codegen.cs index 008c58c9694..89091d00ea2 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.codegen.cs @@ -113,21 +113,21 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); __builder.CloseComponent(); return default; } public static global::Test.MyComponent CreateMyComponent_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); __builder.CloseComponent(); return default; } public static global::Test.MyComponent CreateMyComponent_2(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.codegen.cs index 3cd914195b8..ec8dd14ed95 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.codegen.cs @@ -94,10 +94,10 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem1 __arg0, int __seq1, global::System.Collections.Generic.List __arg1, int __seq2, global::Microsoft.AspNetCore.Components.RenderFragment __arg2, int __seq3, global::Microsoft.AspNetCore.Components.RenderFragment.Context> __arg3) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "Items", __arg1); - __builder.AddComponentParameter(__seq2, "ChildContent", __arg2); - __builder.AddComponentParameter(__seq3, "AnotherChildContent", __arg3); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "Items", (object)__arg1); + __builder.AddAttribute(__seq2, "ChildContent", (object)__arg2); + __builder.AddAttribute(__seq3, "AnotherChildContent", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.codegen.cs index 5628eb05ca3..cffdf0837f0 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_NonGenericParameterizedChildContent_TypeInference/TestComponent.codegen.cs @@ -77,9 +77,9 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1, int __seq2, global::Microsoft.AspNetCore.Components.RenderFragment __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "GenericFragment", __arg1); - __builder.AddComponentParameter(__seq2, "IntFragment", __arg2); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "GenericFragment", (object)__arg1); + __builder.AddAttribute(__seq2, "IntFragment", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs index 242404eba95..ebbbe196e79 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs @@ -123,10 +123,10 @@ internal static class TypeInference where TItem3 : global::Image, new() { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item1", __arg0); - __builder.AddComponentParameter(__seq1, "Items2", __arg1); - __builder.AddComponentParameter(__seq2, "Item3", __arg2); - __builder.AddComponentParameter(__seq3, "ChildContent", __arg3); + __builder.AddAttribute(__seq0, "Item1", (object)__arg0); + __builder.AddAttribute(__seq1, "Items2", (object)__arg1); + __builder.AddAttribute(__seq2, "Item3", (object)__arg2); + __builder.AddAttribute(__seq3, "ChildContent", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs index 242404eba95..ebbbe196e79 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithConstrainedTypeParameters_WithSemicolon/UseTestComponent.codegen.cs @@ -123,10 +123,10 @@ internal static class TypeInference where TItem3 : global::Image, new() { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item1", __arg0); - __builder.AddComponentParameter(__seq1, "Items2", __arg1); - __builder.AddComponentParameter(__seq2, "Item3", __arg2); - __builder.AddComponentParameter(__seq3, "ChildContent", __arg3); + __builder.AddAttribute(__seq0, "Item1", (object)__arg0); + __builder.AddAttribute(__seq1, "Items2", (object)__arg1); + __builder.AddAttribute(__seq2, "Item3", (object)__arg2); + __builder.AddAttribute(__seq3, "ChildContent", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs index a53254e4a68..bc98142c97b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterArray/UseTestComponent.codegen.cs @@ -120,10 +120,10 @@ internal static class TypeInference public static global::Test.TestComponent CreateTestComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem[] __arg0, int __seq1, global::System.Collections.Generic.List __arg1, int __seq2, global::System.Func __arg2, int __seq3, global::Microsoft.AspNetCore.Components.RenderFragment __arg3) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Items1", __arg0); - __builder.AddComponentParameter(__seq1, "Items2", __arg1); - __builder.AddComponentParameter(__seq2, "Items3", __arg2); - __builder.AddComponentParameter(__seq3, "ChildContent", __arg3); + __builder.AddAttribute(__seq0, "Items1", (object)__arg0); + __builder.AddAttribute(__seq1, "Items2", (object)__arg1); + __builder.AddAttribute(__seq2, "Items3", (object)__arg2); + __builder.AddAttribute(__seq3, "ChildContent", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs index 30db097cf82..b8b0394e74f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTuple/UseTestComponent.codegen.cs @@ -102,9 +102,9 @@ internal static class TypeInference public static global::Test.TestComponent CreateTestComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, (TItem1, TItem2) __arg0, int __seq1, global::System.Collections.Generic.List<(TItem1, TItem2)> __arg1, int __seq2, global::Microsoft.AspNetCore.Components.RenderFragment<(TItem1, TItem2)> __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item1", __arg0); - __builder.AddComponentParameter(__seq1, "Items2", __arg1); - __builder.AddComponentParameter(__seq2, "ChildContent", __arg2); + __builder.AddAttribute(__seq0, "Item1", (object)__arg0); + __builder.AddAttribute(__seq1, "Items2", (object)__arg1); + __builder.AddAttribute(__seq2, "ChildContent", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs index 58fe699a191..a9f3eb8e0b7 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameterValueTupleGloballyQualifiedTypes/TestComponent.codegen.cs @@ -105,8 +105,8 @@ internal static class TypeInference public static global::Test.TestComponent CreateTestComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TParam __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment<(global::N.MyClass I1, global::N.MyStruct I2, TParam P)> __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "InferParam", __arg0); - __builder.AddComponentParameter(__seq1, "Template", __arg1); + __builder.AddAttribute(__seq0, "InferParam", (object)__arg0); + __builder.AddAttribute(__seq1, "Template", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.codegen.cs index 2186fbd100e..e01ebbe3222 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_Nullable_Generic/TestComponent.codegen.cs @@ -77,7 +77,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, T __arg0, int __seq1, System.Action> __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "MyParameter", __arg0); + __builder.AddAttribute(__seq0, "MyParameter", (object)__arg0); __builder.AddComponentReferenceCapture(__seq1, (__value) => { __arg1((global::Test.MyComponent)__value); }); __builder.CloseComponent(); return default; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.codegen.cs index 96d89ce3ff8..769b4be1547 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithSplat_GenericTypeInference/TestComponent.codegen.cs @@ -75,7 +75,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, T __arg0, int __seq1, global::System.Collections.Generic.IEnumerable> __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); __builder.AddMultipleAttributes(__seq1, __arg1); __builder.CloseComponent(); return default; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.codegen.cs index 56ff2b982d8..03f18fc190d 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_Array/TestComponent.codegen.cs @@ -68,9 +68,9 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem[] __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1, int __seq2, global::System.Linq.Expressions.Expression> __arg2) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); - __builder.AddComponentParameter(__seq2, "ValueExpression", __arg2); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); + __builder.AddAttribute(__seq2, "ValueExpression", (object)__arg2); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.codegen.cs index 6cd7d815489..8f76c5f6939 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01/TestComponent.codegen.cs @@ -47,7 +47,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::Microsoft.AspNetCore.Components.EventCallback __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "OnClick", __arg0); + __builder.AddAttribute(__seq0, "OnClick", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.codegen.cs index f0bef53fe26..718accede23 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02/TestComponent.codegen.cs @@ -47,7 +47,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Object __arg0) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "OnClick", __arg0); + __builder.AddAttribute(__seq0, "OnClick", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs index 73810635a6e..6c7ab46668a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/FormName_Component_Generic/TestComponent.codegen.cs @@ -113,20 +113,20 @@ internal static class TypeInference public static global::Test.TestComponent CreateTestComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Object __arg0, int __seq1, global::System.Object __arg1, int __seq2, global::System.Object __arg2, int __seq3, T __arg3) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "method", __arg0); - __builder.AddComponentParameter(__seq1, "@onsubmit", __arg1); - __builder.AddComponentParameter(__seq2, "@formname", __arg2); - __builder.AddComponentParameter(__seq3, "Parameter", __arg3); + __builder.AddAttribute(__seq0, "method", (object)__arg0); + __builder.AddAttribute(__seq1, "@onsubmit", (object)__arg1); + __builder.AddAttribute(__seq2, "@formname", (object)__arg2); + __builder.AddAttribute(__seq3, "Parameter", (object)__arg3); __builder.CloseComponent(); return default; } public static global::Test.TestComponent CreateTestComponent_1(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, global::System.Object __arg0, int __seq1, global::System.Object __arg1, int __seq2, global::System.Object __arg2, int __seq3, T __arg3) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "method", __arg0); - __builder.AddComponentParameter(__seq1, "@onsubmit", __arg1); - __builder.AddComponentParameter(__seq2, "@formname", __arg2); - __builder.AddComponentParameter(__seq3, "Parameter", __arg3); + __builder.AddAttribute(__seq0, "method", (object)__arg0); + __builder.AddAttribute(__seq1, "@onsubmit", (object)__arg1); + __builder.AddAttribute(__seq2, "@formname", (object)__arg2); + __builder.AddAttribute(__seq3, "Parameter", (object)__arg3); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs index 2aeceae11ca..39ea3980844 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithAfter_Action/TestComponent.codegen.cs @@ -98,8 +98,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::System.Action __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs index f99f8018ddf..a617a36e9bd 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action/TestComponent.codegen.cs @@ -98,8 +98,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs index 0f8ed5d0e27..93be3d82d1b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback/TestComponent.codegen.cs @@ -97,8 +97,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs index d20e77104ef..2941c64b171 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function/TestComponent.codegen.cs @@ -98,8 +98,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TValue __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Value", __arg0); - __builder.AddComponentParameter(__seq1, "ValueChanged", __arg1); + __builder.AddAttribute(__seq0, "Value", (object)__arg0); + __builder.AddAttribute(__seq1, "ValueChanged", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs index 33c805dfe04..c40b1fa8f51 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference/TestComponent.codegen.cs @@ -103,8 +103,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "MyEvent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "MyEvent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs index e503c1f6955..f1732115da1 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference/TestComponent.codegen.cs @@ -83,8 +83,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "MyEvent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "MyEvent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs index 5b172a2886d..2aff5dc5afa 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference/TestComponent.codegen.cs @@ -89,8 +89,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback> __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "MyEvent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "MyEvent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs index d1b54c7cced..9212ce59970 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_GenericEventCallback_TypeInference/TestComponent.codegen.cs @@ -83,8 +83,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "MyEvent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "MyEvent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs index e750b491a97..2666b9ab79e 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NestedGenericEventCallback_TypeInference/TestComponent.codegen.cs @@ -83,8 +83,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback>> __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "MyEvent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "MyEvent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs index 50844534108..79cb1a2d359 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericEventCallback_TypeInference/TestComponent.codegen.cs @@ -83,8 +83,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.EventCallback __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "MyEvent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "MyEvent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs index b4950a001be..36491956c6f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonGenericParameter_TypeInference/TestComponent.codegen.cs @@ -91,8 +91,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Test.Shared.MyClass __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "Foo", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "Foo", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.codegen.cs index e6363be5963..41731791ede 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_NonPrimitiveTypeRenderFragment/TestComponent.codegen.cs @@ -68,8 +68,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs index 600b49ba826..e14a8506502 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_UnmanagedConstraint/TestComponent.codegen.cs @@ -67,7 +67,7 @@ internal static class TypeInference where T : unmanaged { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Parameter", __arg0); + __builder.AddAttribute(__seq0, "Parameter", (object)__arg0); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.codegen.cs index 203997778c4..2106c52c7a7 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic/TestComponent.codegen.cs @@ -77,7 +77,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, System.Action> __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); __builder.AddComponentReferenceCapture(__seq1, (__value) => { __arg1((global::Test.MyComponent)__value); }); __builder.CloseComponent(); return default; diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.codegen.cs index 8447201f5db..4a221667f5f 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.codegen.cs @@ -68,8 +68,8 @@ internal static class TypeInference public static global::Test.MyComponent CreateTest_MyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, global::Microsoft.AspNetCore.Components.RenderFragment __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); - __builder.AddComponentParameter(__seq1, "ChildContent", __arg1); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); + __builder.AddAttribute(__seq1, "ChildContent", (object)__arg1); __builder.CloseComponent(); return default; } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs index 670fbd34bc4..e7b5158e826 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithKey_TypeInference/TestComponent.codegen.cs @@ -75,7 +75,7 @@ internal static class TypeInference public static global::Test.MyComponent CreateMyComponent_0(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, int seq, int __seq0, TItem __arg0, int __seq1, object __arg1) { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq0, "Item", __arg0); + __builder.AddAttribute(__seq0, "Item", (object)__arg0); __builder.SetKey(__arg1); __builder.CloseComponent(); return default; From 27a395e6b872ee34f4edbcfef5161b1fa68cc48f Mon Sep 17 00:00:00 2001 From: Jan Jones Date: Wed, 13 Sep 2023 11:00:45 +0200 Subject: [PATCH 3/3] Update a baseline --- .../RenderMode_With_TypeInference/TestComponent.codegen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.codegen.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.codegen.cs index 279fbee19e3..2cfcb713835 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.codegen.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RenderMode_With_TypeInference/TestComponent.codegen.cs @@ -97,7 +97,7 @@ internal static class TypeInference where TRenderMode : global::Microsoft.AspNetCore.Components.IComponentRenderMode { __builder.OpenComponent>(seq); - __builder.AddComponentParameter(__seq1, "RenderModeParam", __arg1); + __builder.AddAttribute(__seq1, "RenderModeParam", (object)__arg1); __builder.AddComponentRenderMode(__arg0); __builder.CloseComponent(); return default;