ReflectionExtensions.IsObsolete method
Namespace | Skybrud.Essentials.Reflection.Extensions |
---|---|
Assembly | Skybrud.Essentials.dll |
IsObsolete(MemberInfo)
Returns whether the specified member
is marked as obsolete.
public static bool IsObsolete(this MemberInfo member)
Parameters
member
MemberInfo
The member.
Returns
true
if the member has been marked as obsolete; otherwise false
.
IsObsolete(MemberInfo, out ObsoleteAttribute)
Returns whether the specified member
is marked as obsolete.
public static bool IsObsolete(MemberInfo member, ObsoleteAttribute attribute)
Parameters
member
MemberInfo
The member.
attribute
ObsoleteAttribute
An instance of ObsoleteAttribute if the member has been marked as obsolete.
Returns
true
if the member has been marked as obsolete; otherwise false
.
IsObsolete(Enum)
Returns whether the specified enum value
is marked as obsolete.
public static bool IsObsolete(this Enum value)
Parameters
value
Enum
The enum value.
Returns
true
if the enum value has been marked as obsolete; otherwise false
.
IsObsolete(Enum, out ObsoleteAttribute)
Returns whether the specified value
is marked as obsolete.
public static bool IsObsolete(this Enum value, ObsoleteAttribute attribute)
Parameters
value
Enum
The enum value.
attribute
ObsoleteAttribute
An instance of ObsoleteAttribute if the enum value has been marked as obsolete.
Returns
true
if the enum value has been marked as obsolete; otherwise false
.
IsObsolete(Type)
Returns whether the specified type
is marked as obsolete.
public static bool IsObsolete(this Type type)
Parameters
type
Type
The type.
Returns
true
if the member has been marked as obsolete; otherwise false
.
IsObsolete(Type, out ObsoleteAttribute)
Returns whether the specified type
is marked as obsolete.
public static bool IsObsolete(Type type, ObsoleteAttribute attribute)
Parameters
type
Type
The type.
attribute
ObsoleteAttribute
An instance of ObsoleteAttribute if the type has been marked as obsolete.
Returns
true
if the type has been marked as obsolete; otherwise false
.