Skip to content

Commit a670a12

Browse files
committed
Fixed a bug when running on .NET Standard 2.0
1 parent 9c56126 commit a670a12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Microsoft.Toolkit.Mvvm/Messaging/IMessengerExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static Action<IMessenger, object, TToken> LoadRegistrationMethodsForType(Type re
145145
foreach (MethodInfo methodInfo in extensionsType.GetMethods(BindingFlags.Static | BindingFlags.Public))
146146
{
147147
if (methodInfo.Name is "RegisterAll" &&
148+
methodInfo.IsGenericMethod &&
148149
methodInfo.GetParameters()[1].ParameterType == recipientType)
149150
{
150151
return CreateGenericDelegate(recipientType, methodInfo);

0 commit comments

Comments
 (0)