@@ -991,7 +991,7 @@ public void OmitsMinimizedAttributeValueParameter()
991991 public void IncludesMinimizedAttributeValueParameterBeforeLanguageVersion5 ( )
992992 {
993993 // Arrange
994- _configuration = RazorConfiguration . Create (
994+ _configuration = new (
995995 RazorLanguageVersion . Version_3_0 ,
996996 base . Configuration . ConfigurationName ,
997997 base . Configuration . Extensions ) ;
@@ -1385,7 +1385,7 @@ public class ComponentWithEditorRequiredChildContent : ComponentBase
13851385 [ IntegrationTestFact , WorkItem ( "https://github.com/dotnet/aspnetcore/issues/18042" ) ]
13861386 public void AddAttribute_ImplicitStringConversion_TypeInference ( )
13871387 {
1388- _configuration = base . Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ;
1388+ _configuration = base . Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ;
13891389
13901390 AdditionalSyntaxTrees . Add ( Parse ( """
13911391 using Microsoft.AspNetCore.Components;
@@ -1436,7 +1436,7 @@ public class MyComponent<T> : ComponentBase
14361436 [ IntegrationTestFact , WorkItem ( "https://github.com/dotnet/aspnetcore/issues/18042" ) ]
14371437 public void AddAttribute_ImplicitStringConversion_Bind ( )
14381438 {
1439- _configuration = base . Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ;
1439+ _configuration = base . Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ;
14401440
14411441 AdditionalSyntaxTrees . Add ( Parse ( """
14421442 using Microsoft.AspNetCore.Components;
@@ -1490,7 +1490,7 @@ public class MyComponent<T> : ComponentBase
14901490 [ IntegrationTestFact , WorkItem ( "https://github.com/dotnet/aspnetcore/issues/18042" ) ]
14911491 public void AddAttribute_ImplicitStringConversion_CustomEvent ( )
14921492 {
1493- _configuration = base . Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ;
1493+ _configuration = base . Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ;
14941494
14951495 AdditionalSyntaxTrees . Add ( Parse ( """
14961496 using Microsoft.AspNetCore.Components;
@@ -1545,7 +1545,7 @@ public class MyComponent<T> : ComponentBase
15451545 [ IntegrationTestFact , WorkItem ( "https://github.com/dotnet/aspnetcore/issues/18042" ) ]
15461546 public void AddAttribute_ImplicitStringConversion_BindUnknown ( )
15471547 {
1548- _configuration = base . Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ;
1548+ _configuration = base . Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ;
15491549
15501550 AdditionalSyntaxTrees . Add ( Parse ( """
15511551 using Microsoft.AspNetCore.Components;
@@ -1578,7 +1578,7 @@ public class MyComponent : ComponentBase
15781578 [ IntegrationTestFact , WorkItem ( "https://github.com/dotnet/aspnetcore/issues/18042" ) ]
15791579 public void AddAttribute_ImplicitStringConversion_BindUnknown_Assignment ( )
15801580 {
1581- _configuration = base . Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ;
1581+ _configuration = base . Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ;
15821582
15831583 AdditionalSyntaxTrees . Add ( Parse ( """
15841584 using Microsoft.AspNetCore.Components;
@@ -1612,7 +1612,7 @@ public class MyComponent : ComponentBase
16121612 [ IntegrationTestFact , WorkItem ( "https://github.com/dotnet/aspnetcore/issues/18042" ) ]
16131613 public void AddAttribute_ImplicitBooleanConversion ( )
16141614 {
1615- _configuration = base . Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ;
1615+ _configuration = base . Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ;
16161616
16171617 AdditionalSyntaxTrees . Add ( Parse ( """
16181618 using Microsoft.AspNetCore.Components;
@@ -3926,11 +3926,11 @@ public static class BindAttributes
39263926 [ IntegrationTestFact ]
39273927 public void BindToComponent_WithGetSet_ProducesErrorOnOlderLanguageVersions ( )
39283928 {
3929- _configuration = RazorConfiguration . Create (
3929+ _configuration = new (
39303930 RazorLanguageVersion . Version_6_0 ,
39313931 "unnamed" ,
3932- Array . Empty < RazorExtension > ( ) ,
3933- false ) ;
3932+ Extensions : [ ] ,
3933+ UseConsolidatedMvcViews : false ) ;
39343934
39353935 // Arrange
39363936 AdditionalSyntaxTrees . Add ( Parse ( @"
@@ -9063,7 +9063,7 @@ @preservewhitespace true
90639063 public void Legacy_3_1_LeadingWhiteSpace_WithDirective ( )
90649064 {
90659065 // Arrange/Act
9066- _configuration = RazorConfiguration . Create (
9066+ _configuration = new (
90679067 RazorLanguageVersion . Version_3_0 ,
90689068 base . Configuration . ConfigurationName ,
90699069 base . Configuration . Extensions ) ;
@@ -9084,7 +9084,7 @@ @using System
90849084 public void Legacy_3_1_LeadingWhiteSpace_WithCSharpExpression ( )
90859085 {
90869086 // Arrange/Act
9087- _configuration = RazorConfiguration . Create (
9087+ _configuration = new (
90889088 RazorLanguageVersion . Version_3_0 ,
90899089 base . Configuration . ConfigurationName ,
90909090 base . Configuration . Extensions ) ;
@@ -9105,7 +9105,7 @@ public void Legacy_3_1_LeadingWhiteSpace_WithCSharpExpression()
91059105 public void Legacy_3_1_LeadingWhiteSpace_WithComponent ( )
91069106 {
91079107 // Arrange
9108- _configuration = RazorConfiguration . Create (
9108+ _configuration = new (
91099109 RazorLanguageVersion . Version_3_0 ,
91109110 base . Configuration . ConfigurationName ,
91119111 base . Configuration . Extensions ) ;
@@ -9141,7 +9141,7 @@ public class SomeOtherComponent : ComponentBase
91419141 public void Legacy_3_1_TrailingWhiteSpace_WithDirective ( )
91429142 {
91439143 // Arrange/Act
9144- _configuration = RazorConfiguration . Create (
9144+ _configuration = new (
91459145 RazorLanguageVersion . Version_3_0 ,
91469146 base . Configuration . ConfigurationName ,
91479147 base . Configuration . Extensions ) ;
@@ -9163,7 +9163,7 @@ public void Legacy_3_1_TrailingWhiteSpace_WithDirective()
91639163 public void Legacy_3_1_TrailingWhiteSpace_WithCSharpExpression ( )
91649164 {
91659165 // Arrange/Act
9166- _configuration = RazorConfiguration . Create (
9166+ _configuration = new (
91679167 RazorLanguageVersion . Version_3_0 ,
91689168 base . Configuration . ConfigurationName ,
91699169 base . Configuration . Extensions ) ;
@@ -9185,7 +9185,7 @@ public void Legacy_3_1_TrailingWhiteSpace_WithCSharpExpression()
91859185 public void Legacy_3_1_TrailingWhiteSpace_WithComponent ( )
91869186 {
91879187 // Arrange
9188- _configuration = RazorConfiguration . Create (
9188+ _configuration = new (
91899189 RazorLanguageVersion . Version_3_0 ,
91909190 base . Configuration . ConfigurationName ,
91919191 base . Configuration . Extensions ) ;
@@ -9219,7 +9219,7 @@ public class SomeOtherComponent : ComponentBase
92199219 public void Legacy_3_1_Whitespace_BetweenElementAndFunctions ( )
92209220 {
92219221 // Arrange
9222- _configuration = RazorConfiguration . Create (
9222+ _configuration = new (
92239223 RazorLanguageVersion . Version_3_0 ,
92249224 base . Configuration . ConfigurationName ,
92259225 base . Configuration . Extensions ) ;
@@ -9242,7 +9242,7 @@ public void Legacy_3_1_Whitespace_BetweenElementAndFunctions()
92429242 public void Legacy_3_1_WhiteSpace_InsideAttribute_InMarkupBlock ( )
92439243 {
92449244 // Arrange
9245- _configuration = RazorConfiguration . Create (
9245+ _configuration = new (
92469246 RazorLanguageVersion . Version_3_0 ,
92479247 base . Configuration . ConfigurationName ,
92489248 base . Configuration . Extensions ) ;
@@ -9260,7 +9260,7 @@ public void Legacy_3_1_WhiteSpace_InsideAttribute_InMarkupBlock()
92609260 public void Legacy_3_1_WhiteSpace_InMarkupInFunctionsBlock ( )
92619261 {
92629262 // Arrange
9263- _configuration = RazorConfiguration . Create (
9263+ _configuration = new (
92649264 RazorLanguageVersion . Version_3_0 ,
92659265 base . Configuration . ConfigurationName ,
92669266 base . Configuration . Extensions ) ;
@@ -10340,7 +10340,7 @@ public void ScriptTag_Razor8([CombinatorialValues("8.0", "latest")] string langV
1034010340 var generated = CompileToCSharp ( """
1034110341 <script>alert("Hello");</script>
1034210342 """ ,
10343- configuration : Configuration . WithVersion ( RazorLanguageVersion . Parse ( langVersion ) ) ) ;
10343+ configuration : Configuration with { LanguageVersion = RazorLanguageVersion . Parse ( langVersion ) } ) ;
1034410344 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
1034510345 AssertCSharpDocumentMatchesBaseline ( generated . CodeDocument ) ;
1034610346 CompileToAssembly ( generated ) ;
@@ -10352,7 +10352,7 @@ public void ScriptTag_Razor7()
1035210352 var generated = CompileToCSharp ( """
1035310353 <script>alert("Hello");</script>
1035410354 """ ,
10355- configuration : Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ) ;
10355+ configuration : Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ) ;
1035610356 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
1035710357 AssertCSharpDocumentMatchesBaseline ( generated . CodeDocument ) ;
1035810358 CompileToAssembly ( generated ) ;
@@ -10473,7 +10473,7 @@ public void RenderMode_Directive_FullyQualified()
1047310473 {
1047410474 var generated = CompileToCSharp ( """
1047510475 @rendermode Microsoft.AspNetCore.Components.Web.RenderMode.Server
10476- """ , throwOnFailure : true ) ;
10476+ """ , throwOnFailure : true ) ;
1047710477
1047810478 // Assert
1047910479 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
@@ -10944,7 +10944,7 @@ @using Microsoft.AspNetCore.Components.Web
1094410944 <div method="post" @onsubmit="() => { }" @formname="named-form-handler"></div>
1094510945 <div method="post" @onsubmit="() => { }" @formname="@("named-form-handler")"></div>
1094610946 """ ,
10947- configuration : Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ) ;
10947+ configuration : Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ) ;
1094810948
1094910949 // Assert
1095010950 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
@@ -11006,7 +11006,7 @@ @using Microsoft.AspNetCore.Components.Web
1100611006 <TestComponent method="post" @onsubmit="() => { }" @formname="named-form-handler" />
1100711007 <TestComponent method="post" @onsubmit="() => { }" @formname="@("named-form-handler")" />
1100811008 """ ,
11009- configuration : Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ) ;
11009+ configuration : Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ) ;
1101011010
1101111011 // Assert
1101211012 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
@@ -11046,7 +11046,7 @@ @typeparam T
1104611046 [Parameter] public T Parameter { get; set; }
1104711047 }
1104811048 """ ,
11049- configuration : Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ) ;
11049+ configuration : Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ) ;
1105011050
1105111051 // Assert
1105211052 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
@@ -11256,7 +11256,7 @@ public void FormName_RazorLangVersion7()
1125611256 @using Microsoft.AspNetCore.Components.Web
1125711257 <form method="post" @onsubmit="() => { }" @formname="named-form-handler"></form>
1125811258 """ ,
11259- configuration : Configuration . WithVersion ( RazorLanguageVersion . Version_7_0 ) ) ;
11259+ configuration : Configuration with { LanguageVersion = RazorLanguageVersion . Version_7_0 } ) ;
1126011260
1126111261 // Assert
1126211262 AssertDocumentNodeMatchesBaseline ( generated . CodeDocument ) ;
0 commit comments