Handle overloads better
This commit is contained in:
parent
ac05647d71
commit
99ac02924b
|
@ -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++)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue