mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-11 02:35:05 +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?
|
||||
.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>())
|
||||
|
||||
Reference in New Issue
Block a user