Skip to content

Commit

Permalink
fix: IsMethodPresent not using NotImplemented
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Jan 7, 2021
1 parent 69318b4 commit 881bb0b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Uno.Foundation/Metadata/ApiInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ public static bool IsTypePresent(string typeName)
}

public static bool IsMethodPresent(string typeName, string methodName)
=> GetValidType(typeName)?.GetMethod(methodName) != null;
=> IsImplementedByUno(
GetValidType(typeName)
?.GetMethod(methodName));

public static bool IsMethodPresent(string typeName, string methodName, uint inputParameterCount)
=> GetValidType(typeName)
=> IsImplementedByUno(
GetValidType(typeName)
?.GetMethods()
?.Where(m => m.Name == methodName && m.GetParameters().Length == inputParameterCount)
.Any() ?? false;
?.FirstOrDefault(m => m.Name == methodName && m.GetParameters().Length == inputParameterCount));

public static bool IsEventPresent(string typeName, string eventName)
=> IsImplementedByUno(
Expand Down

0 comments on commit 881bb0b

Please sign in to comment.