fix: only bind to members of the same member type

This commit is contained in:
Jeffery Thompson
2018-05-15 11:41:11 -04:00
parent 72a4b19f97
commit 567ee4a1ae

View File

@@ -117,7 +117,10 @@ namespace ICD.Common.Utils.Extensions
.Union(extends.DeclaringType?
.GetInterfaces()
.SelectMany(interfaceType => interfaceType
.GetMember(extends.Name)
.GetMember(
extends.Name,
extends.MemberType,
BindingFlags.Instance)
.FirstOrDefault()?
.GetCustomAttributes<T>(true) ?? Enumerable.Empty<T>())?
.Except(null) ?? Enumerable.Empty<T>())