@@ -49,7 +49,7 @@ public bool CanSupplyValue(in CascadingParameterInfo parameterInfo)
4949 if ( customSerializer != null )
5050 {
5151 // Use reflection to call the generic TryTake method with the custom serializer
52- var tryTakeMethod = typeof ( PersistentComponentState ) . GetMethod ( nameof ( PersistentComponentState . TryTake ) , BindingFlags . Instance | BindingFlags . Public , [ typeof ( string ) , serializerType , parameterInfo . PropertyType . MakeByRefType ( ) ] ) ;
52+ var tryTakeMethod = typeof ( PersistentComponentState ) . GetMethod ( nameof ( PersistentComponentState . TryTake ) , BindingFlags . Instance | BindingFlags . NonPublic , [ typeof ( string ) , serializerType , parameterInfo . PropertyType . MakeByRefType ( ) ] ) ;
5353 if ( tryTakeMethod != null )
5454 {
5555 var parameters = new object ? [ ] { storageKey , customSerializer , null } ;
@@ -86,7 +86,7 @@ public void Subscribe(ComponentState subscriber, in CascadingParameterInfo param
8686 if ( customSerializer != null )
8787 {
8888 // Use reflection to call the generic PersistAsync method with the custom serializer
89- var persistMethod = typeof ( PersistentComponentState ) . GetMethod ( nameof ( PersistentComponentState . PersistAsync ) , BindingFlags . Instance | BindingFlags . Public , [ typeof ( string ) , propertyType , serializerType , typeof ( CancellationToken ) ] ) ;
89+ var persistMethod = typeof ( PersistentComponentState ) . GetMethod ( nameof ( PersistentComponentState . PersistAsync ) , BindingFlags . Instance | BindingFlags . NonPublic , [ typeof ( string ) , propertyType , serializerType , typeof ( CancellationToken ) ] ) ;
9090 if ( persistMethod != null )
9191 {
9292 var task = ( Task ) persistMethod . Invoke ( state , [ storageKey , property , customSerializer , CancellationToken . None ] ) ! ;
0 commit comments