mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
fix: only bind to members of the same member type
This commit is contained in:
@@ -117,7 +117,10 @@ namespace ICD.Common.Utils.Extensions
|
|||||||
.Union(extends.DeclaringType?
|
.Union(extends.DeclaringType?
|
||||||
.GetInterfaces()
|
.GetInterfaces()
|
||||||
.SelectMany(interfaceType => interfaceType
|
.SelectMany(interfaceType => interfaceType
|
||||||
.GetMember(extends.Name)
|
.GetMember(
|
||||||
|
extends.Name,
|
||||||
|
extends.MemberType,
|
||||||
|
BindingFlags.Instance)
|
||||||
.FirstOrDefault()?
|
.FirstOrDefault()?
|
||||||
.GetCustomAttributes<T>(true) ?? Enumerable.Empty<T>())?
|
.GetCustomAttributes<T>(true) ?? Enumerable.Empty<T>())?
|
||||||
.Except(null) ?? Enumerable.Empty<T>())
|
.Except(null) ?? Enumerable.Empty<T>())
|
||||||
|
|||||||
Reference in New Issue
Block a user