diff --git a/Upsilon/BaseTypes/UserData/UserDataMethod.cs b/Upsilon/BaseTypes/UserData/UserDataMethod.cs index 30443dd..a23dbd1 100644 --- a/Upsilon/BaseTypes/UserData/UserDataMethod.cs +++ b/Upsilon/BaseTypes/UserData/UserDataMethod.cs @@ -75,6 +75,8 @@ namespace Upsilon.BaseTypes.UserData { foreach (var userDataMethodPart in MethodParts) { + if (userDataMethodPart.Parameters.Length < parameterTypes.Length) + continue; bool valid = true; for (var index = 0; index < userDataMethodPart.Parameters.Length; index++) { diff --git a/Upsilon/BoundTypes/UserDataBoundTypeDefinition.cs b/Upsilon/BoundTypes/UserDataBoundTypeDefinition.cs index 2319b36..15e62fe 100644 --- a/Upsilon/BoundTypes/UserDataBoundTypeDefinition.cs +++ b/Upsilon/BoundTypes/UserDataBoundTypeDefinition.cs @@ -75,7 +75,11 @@ namespace Upsilon.BoundTypes } foreach (var f in methods) { - obj.Properties.Add(f.Name.ToLowerInvariant(), f); + var cleanedName = f.Name.ToLowerInvariant(); + // TODO: handle this better, considering overloads + if (obj.Properties.ContainsKey(cleanedName)) + continue; + obj.Properties.Add(cleanedName, f); } return obj;