diff --git a/X10D/src/ReflectionExtensions/MemberInfoExtensions.cs b/X10D/src/ReflectionExtensions/MemberInfoExtensions.cs index b6c57bd..12123ee 100644 --- a/X10D/src/ReflectionExtensions/MemberInfoExtensions.cs +++ b/X10D/src/ReflectionExtensions/MemberInfoExtensions.cs @@ -67,22 +67,23 @@ namespace X10D.ReflectionExtensions /// /// The attribute type. /// The return type of the delegate. - /// The member. + /// The member. /// A transform function to apply to the attribute. /// /// An instance of as provided from . /// /// - /// is + /// is /// -or- /// is . /// - public static TReturn? SelectFromCustomAttribute(this MemberInfo type, Func selector) + public static TReturn? SelectFromCustomAttribute(this MemberInfo member, + Func selector) where TAttribute : Attribute { - if (type is null) + if (member is null) { - throw new ArgumentNullException(nameof(type)); + throw new ArgumentNullException(nameof(member)); } if (selector is null) @@ -90,7 +91,7 @@ namespace X10D.ReflectionExtensions throw new ArgumentNullException(nameof(selector)); } - return type.GetCustomAttribute() is { } attribute + return member.GetCustomAttribute() is { } attribute ? selector(attribute) : default; }