@@ -438,8 +438,8 @@ private static bool TryMapCommandTypesFromMethod(
438438 commandClassType = "global::CommunityToolkit.Mvvm.Input.RelayCommand" ;
439439 delegateType = "global::System.Action" ;
440440 supportsCancellation = false ;
441- commandTypeArguments = ImmutableArray . Create ( parameter . Type . GetFullyQualifiedName ( ) ) ;
442- delegateTypeArguments = ImmutableArray . Create ( parameter . Type . GetFullyQualifiedName ( ) ) ;
441+ commandTypeArguments = ImmutableArray . Create ( parameter . Type . GetFullyQualifiedNameWithNullabilityAnnotations ( ) ) ;
442+ delegateTypeArguments = ImmutableArray . Create ( parameter . Type . GetFullyQualifiedNameWithNullabilityAnnotations ( ) ) ;
443443
444444 return true ;
445445 }
@@ -472,7 +472,7 @@ private static bool TryMapCommandTypesFromMethod(
472472 delegateType = "global::System.Func" ;
473473 supportsCancellation = true ;
474474 commandTypeArguments = ImmutableArray < string > . Empty ;
475- delegateTypeArguments = ImmutableArray . Create ( singleParameter . Type . GetFullyQualifiedName ( ) , "global::System.Threading.Tasks.Task" ) ;
475+ delegateTypeArguments = ImmutableArray . Create ( "global::System.Threading.CancellationToken" , "global::System.Threading.Tasks.Task" ) ;
476476
477477 return true ;
478478 }
@@ -482,8 +482,8 @@ private static bool TryMapCommandTypesFromMethod(
482482 commandClassType = "global::CommunityToolkit.Mvvm.Input.AsyncRelayCommand" ;
483483 delegateType = "global::System.Func" ;
484484 supportsCancellation = false ;
485- commandTypeArguments = ImmutableArray . Create ( singleParameter . Type . GetFullyQualifiedName ( ) ) ;
486- delegateTypeArguments = ImmutableArray . Create ( singleParameter . Type . GetFullyQualifiedName ( ) , "global::System.Threading.Tasks.Task" ) ;
485+ commandTypeArguments = ImmutableArray . Create ( singleParameter . Type . GetFullyQualifiedNameWithNullabilityAnnotations ( ) ) ;
486+ delegateTypeArguments = ImmutableArray . Create ( singleParameter . Type . GetFullyQualifiedNameWithNullabilityAnnotations ( ) , "global::System.Threading.Tasks.Task" ) ;
487487
488488 return true ;
489489 }
@@ -498,8 +498,8 @@ private static bool TryMapCommandTypesFromMethod(
498498 commandClassType = "global::CommunityToolkit.Mvvm.Input.AsyncRelayCommand" ;
499499 delegateType = "global::System.Func" ;
500500 supportsCancellation = true ;
501- commandTypeArguments = ImmutableArray . Create ( firstParameter . Type . GetFullyQualifiedName ( ) ) ;
502- delegateTypeArguments = ImmutableArray . Create ( firstParameter . Type . GetFullyQualifiedName ( ) , secondParameter . Type . GetFullyQualifiedName ( ) , "global::System.Threading.Tasks.Task" ) ;
501+ commandTypeArguments = ImmutableArray . Create ( firstParameter . Type . GetFullyQualifiedNameWithNullabilityAnnotations ( ) ) ;
502+ delegateTypeArguments = ImmutableArray . Create ( firstParameter . Type . GetFullyQualifiedNameWithNullabilityAnnotations ( ) , "global::System.Threading.CancellationToken" , "global::System.Threading.Tasks.Task" ) ;
503503
504504 return true ;
505505 }
0 commit comments