@@ -78,7 +78,7 @@ public ComponentParameterCollectionBuilder<TComponent> Add<TChildComponent>(Expr
7878 /// <param name="parameterSelector">A lambda function that selects the parameter.</param>
7979 /// <param name="markup">The markup string to pass to the <see cref="RenderFragment"/>.</param>
8080 /// <returns>This <see cref="ComponentParameterCollectionBuilder{TComponent}"/>.</returns>
81- public ComponentParameterCollectionBuilder < TComponent > Add ( Expression < Func < TComponent , RenderFragment ? > > parameterSelector , [ StringSyntax ( "Html" ) ] string markup )
81+ public ComponentParameterCollectionBuilder < TComponent > Add ( Expression < Func < TComponent , RenderFragment ? > > parameterSelector , [ StringSyntax ( "Html" ) ] string markup )
8282 => Add ( parameterSelector , markup . ToMarkupRenderFragment ( ) ) ;
8383
8484 /// <summary>
@@ -266,7 +266,7 @@ public ComponentParameterCollectionBuilder<TComponent> AddChildContent(RenderFra
266266 /// </summary>
267267 /// <param name="markup">The markup string to pass the ChildContent parameter wrapped in a <see cref="RenderFragment"/>.</param>
268268 /// <returns>This <see cref="ComponentParameterCollectionBuilder{TComponent}"/>.</returns>
269- public ComponentParameterCollectionBuilder < TComponent > AddChildContent ( [ StringSyntax ( "Html" ) ] string markup )
269+ public ComponentParameterCollectionBuilder < TComponent > AddChildContent ( [ StringSyntax ( "Html" ) ] string markup )
270270 => AddChildContent ( markup . ToMarkupRenderFragment ( ) ) ;
271271
272272 /// <summary>
@@ -344,11 +344,11 @@ public ComponentParameterCollectionBuilder<TComponent> Bind<TValue>(
344344 Action < TValue > changedAction ,
345345 Expression < Func < TValue > > ? valueExpression = null )
346346 {
347- #if ! NET8_0_OR_GREATER
347+ #if ! NET8_0_OR_GREATER
348348 var ( parameterName , _, isCascading ) = GetParameterInfo ( parameterSelector ) ;
349- #else
349+ #else
350350 var ( parameterName , _, isCascading ) = GetParameterInfo ( parameterSelector , initialValue ) ;
351- #endif
351+ #endif
352352
353353 if ( isCascading )
354354 throw new ArgumentException ( "Using Bind with a cascading parameter is not allowed." , parameterName ) ;
@@ -397,6 +397,13 @@ static string TrimEnd(string source, string value)
397397 : source ;
398398 }
399399
400+ #if NET9_0_OR_GREATER
401+ public ComponentParameterCollectionBuilder < TComponent > SetAssignedRenderMode ( IComponentRenderMode ? renderMode )
402+ {
403+ return this ;
404+ }
405+ #endif
406+
400407 /// <summary>
401408 /// Try to add a <paramref name="value"/> for a parameter with the <paramref name="name"/>, if
402409 /// <typeparamref name="TComponent"/> has a property with that name, AND that property has a <see cref="ParameterAttribute"/>
@@ -454,14 +461,14 @@ Expression<Func<TComponent, TValue>> parameterSelector
454461 : propInfoCandidate ;
455462
456463 var paramAttr = propertyInfo ? . GetCustomAttribute < ParameterAttribute > ( inherit : true ) ;
457- #if ! NET8_0_OR_GREATER
464+ #if ! NET8_0_OR_GREATER
458465 var cascadingParamAttr = propertyInfo ? . GetCustomAttribute < CascadingParameterAttribute > ( inherit : true ) ;
459466
460467 if ( propertyInfo is null || ( paramAttr is null && cascadingParamAttr is null ) )
461468 throw new ArgumentException ( $ "The parameter selector '{ parameterSelector } ' does not resolve to a public property on the component '{ typeof ( TComponent ) } ' with a [Parameter] or [CascadingParameter] attribute.", nameof ( parameterSelector ) ) ;
462469
463470 return ( propertyInfo . Name , CascadingValueName : cascadingParamAttr ? . Name , IsCascading : cascadingParamAttr is not null ) ;
464- #else
471+ #else
465472 var cascadingParamAttrBase = propertyInfo ? . GetCustomAttribute < CascadingParameterAttributeBase > ( inherit : true ) ;
466473
467474 if ( propertyInfo is null || ( paramAttr is null && cascadingParamAttrBase is null ) )
@@ -494,7 +501,7 @@ static ArgumentException CreateErrorMessageForSupplyFromQuery(
494501 NavigationManager.NavigateTo(uri);
495502 """ ) ;
496503 }
497- #endif
504+ #endif
498505 }
499506
500507 private static bool HasChildContentParameter ( )
0 commit comments