File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,8 @@ public static void TryInvokeFunc()
149149 static MethodInfo GetMethod ( int argCount )
150150 {
151151 const BindingFlags flags = BindingFlags . Public | BindingFlags . Static | BindingFlags . DeclaredOnly ;
152- return Single ( typeof ( Func ) . GetMethods ( flags ) , candidate => candidate . Name == nameof ( Func . TryInvoke ) && candidate . GetParameters ( ) . Length == argCount + 1 ) ;
152+ return Single ( typeof ( Func ) . GetMethods ( flags ) ,
153+ candidate => candidate . Name is nameof ( Func . TryInvoke ) && candidate . GetParameters ( ) . Length == argCount + 1 ) ;
153154 }
154155
155156 var successValue = Expression . Constant ( 42 , typeof ( int ) ) ;
@@ -611,7 +612,7 @@ static MethodInfo GetMethod(int argCount)
611612 {
612613 const BindingFlags flags = BindingFlags . Public | BindingFlags . Static | BindingFlags . DeclaredOnly ;
613614 return Single ( typeof ( DelegateHelpers ) . GetMethods ( flags ) ,
614- candidate => candidate . Name == nameof ( DelegateHelpers . TryInvoke ) && candidate . GetParameters ( ) . Length == argCount + 1 ) ;
615+ candidate => candidate . Name is nameof ( DelegateHelpers . TryInvoke ) && candidate . GetParameters ( ) . Length == argCount + 1 ) ;
615616 }
616617
617618 var successValue = Expression . Empty ( ) ;
You can’t perform that action at this time.
0 commit comments