Version 3.0.0.2

MemberInfoExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class MemberInfoExtensions
Inheritance
  • System.Object
  • MemberInfoExtensions

Methods

DeAlias(MemberInfo, Boolean)
public static MemberInfo DeAlias(this MemberInfo memberInfo, bool throwOnNotAliased = false)
Parameters
System.Reflection.MemberInfo memberInfo

System.Boolean throwOnNotAliased

Returns
System.Reflection.MemberInfo

GetAttribute<T>(ICustomAttributeProvider)
public static T GetAttribute<T>(this ICustomAttributeProvider member)
    where T : Attribute
Parameters
System.Reflection.ICustomAttributeProvider member

Returns
T

Type Parameters
T

GetAttribute<T>(ICustomAttributeProvider, Boolean)
public static T GetAttribute<T>(this ICustomAttributeProvider member, bool inherit)
    where T : Attribute
Parameters
System.Reflection.ICustomAttributeProvider member

System.Boolean inherit

Returns
T

Type Parameters
T

GetAttributes(ICustomAttributeProvider)
public static Attribute[] GetAttributes(this ICustomAttributeProvider member)
Parameters
System.Reflection.ICustomAttributeProvider member

Returns
System.Attribute[]

GetAttributes(ICustomAttributeProvider, Boolean)
public static Attribute[] GetAttributes(this ICustomAttributeProvider member, bool inherit)
Parameters
System.Reflection.ICustomAttributeProvider member

System.Boolean inherit

Returns
System.Attribute[]

GetAttributes<T>(ICustomAttributeProvider)
public static IEnumerable<T> GetAttributes<T>(this ICustomAttributeProvider member)
    where T : Attribute
Parameters
System.Reflection.ICustomAttributeProvider member

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

GetAttributes<T>(ICustomAttributeProvider, Boolean)
public static IEnumerable<T> GetAttributes<T>(this ICustomAttributeProvider member, bool inherit)
    where T : Attribute
Parameters
System.Reflection.ICustomAttributeProvider member

System.Boolean inherit

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

GetNiceName(MemberInfo)
public static string GetNiceName(this MemberInfo member)
Parameters
System.Reflection.MemberInfo member

Returns
System.String

IsAlias(MemberInfo)
public static bool IsAlias(this MemberInfo memberInfo)
Parameters
System.Reflection.MemberInfo memberInfo

Returns
System.Boolean

IsDefined<T>(ICustomAttributeProvider)
public static bool IsDefined<T>(this ICustomAttributeProvider member)
    where T : Attribute
Parameters
System.Reflection.ICustomAttributeProvider member

Returns
System.Boolean

Type Parameters
T

IsDefined<T>(ICustomAttributeProvider, Boolean)
public static bool IsDefined<T>(this ICustomAttributeProvider member, bool inherit)
    where T : Attribute
Parameters
System.Reflection.ICustomAttributeProvider member

System.Boolean inherit

Returns
System.Boolean

Type Parameters
T

IsStatic(MemberInfo)
public static bool IsStatic(this MemberInfo member)
Parameters
System.Reflection.MemberInfo member

Returns
System.Boolean

SignaturesAreEqual(MemberInfo, MemberInfo)
public static bool SignaturesAreEqual(this MemberInfo a, MemberInfo b)
Parameters
System.Reflection.MemberInfo a

System.Reflection.MemberInfo b

Returns
System.Boolean