MemberInfoExtensions

MemberInfo method extensions.

namespace Sirenix.Utilities
{
[ExtensionAttribute]
public static class MemberInfoExtensions
}

Requirements

Namespace: Sirenix.Utilities
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Extension Methods

Return Type Definition Description
MemberInfo DeAlias(this MemberInfo, bool) Returns the original, backing member of an alias member if the member is an alias.
T GetAttribute<T>(this ICustomAttributeProvider) Returns the first found non-inherited custom attribute of type T on this member Returns null if none was found
T GetAttribute<T>(this ICustomAttributeProvider, bool) Returns the first found custom attribute of type T on this member Returns null if none was found
Attribute[] GetAttributes(this ICustomAttributeProvider) Gets all attribute instances defined on a MemeberInfo.
Attribute[] GetAttributes(this ICustomAttributeProvider, bool) Gets all attribute instances on a MemberInfo.
IEnumerable<T> GetAttributes<T>(this ICustomAttributeProvider) Gets all attributes of the specified generic type.
IEnumerable<T> GetAttributes<T>(this ICustomAttributeProvider, bool) Gets all attributes of the specified generic type.
string GetNiceName(this MemberInfo) If this member is a method, returns the full method name (name + params) otherwise the member name paskal splitted
bool IsAlias(this MemberInfo) Determines whether the specified member is an alias.
bool IsDefined<T>(this ICustomAttributeProvider) Returns true if the attribute whose type is specified by the generic argument is defined on this member
bool IsDefined<T>(this ICustomAttributeProvider, bool) Returns true if the attribute whose type is specified by the generic argument is defined on this member
bool IsStatic(this MemberInfo) Determines whether a FieldInfo, PropertyInfo or MethodInfo is static.