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

This commit is contained in:
Deukhoofd 2019-02-17 17:53:39 +01:00
parent 812ec7137b
commit 72623036a8
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 3 additions and 1 deletions

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);