ReflectionUtils.IsObsolete method
Namespace | Skybrud.Essentials.Reflection |
---|---|
Assembly | Skybrud.Essentials.dll |
IsObsolete(MemberInfo)
Returns whether the specified member
is marked as obsolete.
public static bool IsObsolete(MemberInfo member)
Parameters
member
MemberInfo
The method.
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 method.
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(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 enum value
is marked as obsolete.
public static bool IsObsolete(Enum value, ObsoleteAttribute attribute)
Parameters
value
Enum
The enum value.
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(Type)
Returns whether type
is marked as obsolete.
public static bool IsObsolete(Type type)
Parameters
type
Type
The type to check.
Returns
true
if the member has been marked as obsolete; otherwise false
.
IsObsolete(Type, out ObsoleteAttribute)
Returns whether type
is marked as obsolete.
public static bool IsObsolete(Type type, ObsoleteAttribute attribute)
Parameters
type
Type
The type to check.
attribute
ObsoleteAttribute
An instance of ObsoleteAttribute if the type has been marked as obsolete.
Returns
true
if the member has been marked as obsolete; otherwise false
.
IsObsolete<T>()
Returns whether T
is marked as obsolete.
public static bool IsObsolete<T>()
Type Parameters
T
The type to check.
Returns
true
if the member has been marked as obsolete; otherwise false
.
IsObsolete<T>(out ObsoleteAttribute)
Returns whether T
is marked as obsolete.
public static bool IsObsolete<T>(ObsoleteAttribute attribute)
Type Parameters
T
The type to check.
Parameters
attribute
ObsoleteAttribute
An instance of ObsoleteAttribute if the type has been marked as obsolete.
Returns
true
if the member has been marked as obsolete; otherwise false
.