mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
fix: only bind to members of the same member type
This commit is contained in:
parent
72a4b19f97
commit
567ee4a1ae
1 changed files with 4 additions and 1 deletions
|
|
@ -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>())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue