From 567ee4a1ae0767ca908128671297d0be153aa49f Mon Sep 17 00:00:00 2001 From: Jeffery Thompson Date: Tue, 15 May 2018 11:41:11 -0400 Subject: [PATCH] fix: only bind to members of the same member type --- ICD.Common.Utils/Extensions/ReflectionExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ICD.Common.Utils/Extensions/ReflectionExtensions.cs b/ICD.Common.Utils/Extensions/ReflectionExtensions.cs index d299843..a1ccc8a 100644 --- a/ICD.Common.Utils/Extensions/ReflectionExtensions.cs +++ b/ICD.Common.Utils/Extensions/ReflectionExtensions.cs @@ -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(true) ?? Enumerable.Empty())? .Except(null) ?? Enumerable.Empty())