@@ -342,9 +342,9 @@ public ComponentParameterCollectionBuilder<TComponent> Bind<TValue>(
342342
343343 if ( isCascading )
344344 throw new ArgumentException ( "Using Bind with a cascading parameter is not allowed." , parameterName ) ;
345-
345+
346346 if ( changedAction is null )
347- throw new ArgumentNullException ( nameof ( changedAction ) ) ;
347+ throw new ArgumentNullException ( nameof ( changedAction ) ) ;
348348
349349 var changedName = $ "{ parameterName } Changed";
350350 var expressionName = $ "{ parameterName } Expression";
@@ -360,7 +360,7 @@ public ComponentParameterCollectionBuilder<TComponent> Bind<TValue>(
360360 AddParameter ( changedName , EventCallback . Factory . Create ( changedAction . Target ! , changedAction ) ) ;
361361
362362 return ! HasPublicParameterProperty ( expressionName )
363- ? this
363+ ? this
364364 : AddParameter ( expressionName , valueExpression ?? ( ( ) => initialValue ) ) ;
365365
366366 static void AssertBindTargetIsCorrect ( string parameterName , Expression < Func < TComponent , TValue > > parameterSelector )
@@ -380,8 +380,8 @@ static void AssertBindTargetIsCorrect(string parameterName, Expression<Func<TCom
380380 $ "Try { selectorExpression . Replace ( parameterName , possibleSelector , StringComparison . Ordinal ) } instead.") ;
381381 }
382382 }
383-
384- static string TrimEnd ( string source , string value )
383+
384+ static string TrimEnd ( string source , string value )
385385 => source . EndsWith ( value , StringComparison . Ordinal )
386386 ? source . Remove ( source . LastIndexOf ( value , StringComparison . Ordinal ) )
387387 : source ;
@@ -431,7 +431,7 @@ private static (string Name, string? CascadingValueName, bool IsCascading) GetPa
431431 if ( parameterSelector is null )
432432 throw new ArgumentNullException ( nameof ( parameterSelector ) ) ;
433433
434- if ( ! ( parameterSelector . Body is MemberExpression memberExpression ) || ! ( memberExpression . Member is PropertyInfo propInfoCandidate ) )
434+ if ( parameterSelector . Body is not MemberExpression { Member : PropertyInfo propInfoCandidate } )
435435 throw new ArgumentException ( $ "The parameter selector '{ parameterSelector } ' does not resolve to a public property on the component '{ typeof ( TComponent ) } '.", nameof ( parameterSelector ) ) ;
436436
437437 var propertyInfo = propInfoCandidate . DeclaringType != TComponentType
@@ -474,20 +474,20 @@ private static RenderFragment GetRenderFragment<TChildComponent>(Action<Componen
474474 var childBuilder = new ComponentParameterCollectionBuilder < TChildComponent > ( childParameterBuilder ) ;
475475 return childBuilder . Build ( ) . ToRenderFragment < TChildComponent > ( ) ;
476476 }
477-
477+
478478 private static bool HasPublicParameterProperty ( string parameterName )
479479 {
480480 var type = typeof ( TComponent ) ;
481481 var property = type . GetProperty ( parameterName ) ;
482482
483483 return property != null && property . GetCustomAttributes ( inherit : true ) . Any ( a => a is ParameterAttribute ) ;
484484 }
485-
485+
486486 private static bool IsConcreteGenericOf ( Type type , Type openGeneric )
487487 {
488488 if ( ! type . IsGenericType )
489489 return false ;
490490
491491 return type . GetGenericTypeDefinition ( ) == openGeneric ;
492492 }
493- }
493+ }
0 commit comments