Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 10b3cde

Browse files
committed
Fix find static method by its signature on .NET Core
1 parent 2689dc4 commit 10b3cde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ServiceStack.Text/PlatformExtensions.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,12 @@ public static MethodInfo GetStaticMethod(this Type type, string methodName, Type
790790
{
791791
if (method.IsStatic && method.Name == methodName)
792792
{
793-
return method;
793+
if (types == null)
794+
return method;
795+
796+
var methodParams = method.GetParameters().Select(p => p.ParameterType);
797+
if (methodParams.SequenceEqual(types))
798+
return method;
794799
}
795800
}
796801

0 commit comments

Comments
 (0)