Ignore it if there's two properties on a type with the same name

This commit is contained in:
2019-02-17 17:53:39 +01:00
parent 812ec7137b
commit 72623036a8

View File

@@ -94,7 +94,9 @@ namespace Upsilon.BoundTypes
}); });
foreach (var f in properties) foreach (var f in properties)
{ {
obj.Properties.Add(f.Name.ToLowerInvariant(), f); var lowerPropertyName = f.Name.ToLowerInvariant();
if (!obj.Properties.ContainsKey(lowerPropertyName))
obj.Properties.Add(lowerPropertyName, f);
} }
var methods = new Dictionary<string, UserDataBoundMethod>(); var methods = new Dictionary<string, UserDataBoundMethod>();
var backingMethods = backingType.GetMethods(generalBindAttributes); var backingMethods = backingType.GetMethods(generalBindAttributes);