1- using System ;
1+ using System ;
22using System . Collections . Generic ;
33using System . Diagnostics ;
44using System . IO . Pipelines ;
@@ -262,13 +262,13 @@ public void HandlersShouldExtensionMethodClassWithMethods(
262262 {
263263 registries
264264 . Where ( z => typeof ( ILanguageClientProxy ) . IsAssignableFrom ( z ) || typeof ( ILanguageServerRegistry ) . IsAssignableFrom ( z ) )
265- . Should ( ) . HaveCountGreaterOrEqualTo (
265+ . Should ( ) . HaveCountGreaterThanOrEqualTo (
266266 1 ,
267267 $ "{ descriptor . HandlerType . FullName } there should be methods for both handing the event and sending the event"
268268 ) ;
269269 registries
270270 . Where ( z => typeof ( ILanguageServerProxy ) . IsAssignableFrom ( z ) || typeof ( ILanguageClientRegistry ) . IsAssignableFrom ( z ) )
271- . Should ( ) . HaveCountGreaterOrEqualTo (
271+ . Should ( ) . HaveCountGreaterThanOrEqualTo (
272272 1 ,
273273 $ "{ descriptor . HandlerType . FullName } there should be methods for both handing the event and sending the event"
274274 ) ;
@@ -277,7 +277,7 @@ public void HandlersShouldExtensionMethodClassWithMethods(
277277 {
278278 registries
279279 . Where ( z => typeof ( ILanguageServerProxy ) . IsAssignableFrom ( z ) || typeof ( ILanguageClientRegistry ) . IsAssignableFrom ( z ) )
280- . Should ( ) . HaveCountGreaterOrEqualTo (
280+ . Should ( ) . HaveCountGreaterThanOrEqualTo (
281281 1 ,
282282 $ "{ descriptor . HandlerType . FullName } there should be methods for both handing the event and sending the event"
283283 ) ;
@@ -289,7 +289,7 @@ public void HandlersShouldExtensionMethodClassWithMethods(
289289 {
290290 registries
291291 . Where ( z => typeof ( ILanguageClientProxy ) . IsAssignableFrom ( z ) || typeof ( ILanguageServerRegistry ) . IsAssignableFrom ( z ) )
292- . Should ( ) . HaveCountGreaterOrEqualTo (
292+ . Should ( ) . HaveCountGreaterThanOrEqualTo (
293293 1 ,
294294 $ "{ descriptor . HandlerType . FullName } there should be methods for both handing the event and sending the event"
295295 ) ;
@@ -341,15 +341,15 @@ public void HandlersShouldHaveExpectedExtensionMethodsBasedOnDirection(
341341 extensionClass . GetMethods ( BindingFlags . Static | BindingFlags . Public )
342342 . Where ( z => z . Name == onMethodName )
343343 . Where ( z => item . matcher ( z . GetParameters ( ) [ 0 ] ) )
344- . Should ( ) . HaveCountGreaterOrEqualTo ( 1 , $ "{ descriptor . HandlerType . FullName } is missing a registry implementation for { item . type } ") ;
344+ . Should ( ) . HaveCountGreaterThanOrEqualTo ( 1 , $ "{ descriptor . HandlerType . FullName } is missing a registry implementation for { item . type } ") ;
345345 }
346346
347347 foreach ( var item in expectedRequestHandlers )
348348 {
349349 extensionClass . GetMethods ( BindingFlags . Static | BindingFlags . Public )
350350 . Where ( z => z . Name == sendMethodName )
351351 . Where ( z => item . matcher ( z . GetParameters ( ) [ 0 ] ) )
352- . Should ( ) . HaveCountGreaterOrEqualTo ( 1 , $ "{ descriptor . HandlerType . FullName } is missing a request implementation for { item . type } ") ;
352+ . Should ( ) . HaveCountGreaterThanOrEqualTo ( 1 , $ "{ descriptor . HandlerType . FullName } is missing a request implementation for { item . type } ") ;
353353 }
354354 }
355355
@@ -386,7 +386,7 @@ Func<MethodInfo, bool> ForAnyParameter(Func<ParameterInfo, bool> m)
386386 }
387387
388388 var containsCancellationToken = ForAnyParameter (
389- info => info . ParameterType . GetGenericArguments ( ) . Reverse ( ) . Take ( 2 ) . Any ( x => x == typeof ( CancellationToken ) )
389+ info => info . ParameterType . GetGenericArguments ( ) . AsEnumerable ( ) . Reverse ( ) . Take ( 2 ) . Any ( x => x == typeof ( CancellationToken ) )
390390 ) ;
391391 var returnType = descriptor . HasResponseType ? typeof ( Task < > ) . MakeGenericType ( descriptor . ResponseType ! ) : typeof ( Task ) ;
392392 var returns = ForAnyParameter ( info => info . ParameterType . GetGenericArguments ( ) . LastOrDefault ( ) == returnType ) ;
@@ -517,7 +517,7 @@ Func<MethodInfo, bool> ForAnyParameter(Func<ParameterInfo, bool> m)
517517 {
518518 var matcher = new MethodMatcher ( sendMethodRegistries , descriptor , extensionClass ) ;
519519 Func < MethodInfo , bool > containsCancellationToken =
520- info => info . GetParameters ( ) . Reverse ( ) . Take ( 2 ) . Any ( x => x . ParameterType == typeof ( CancellationToken ) ) ;
520+ info => info . GetParameters ( ) . AsEnumerable ( ) . Reverse ( ) . Take ( 2 ) . Any ( x => x . ParameterType == typeof ( CancellationToken ) ) ;
521521 var returnType = descriptor . HasResponseType ? typeof ( Task < > ) . MakeGenericType ( descriptor . ResponseType ! ) : typeof ( Task ) ;
522522 Func < MethodInfo , bool > returns = info => info . ReturnType == returnType ;
523523 Func < MethodInfo , bool > isAction = info => info . ReturnType . Name == "Void" ;
0 commit comments