ReflectionUtils.IsObsolete method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Reflection
Assembly Skybrud.Essentials.dll

IsObsolete(MemberInfo)

Static

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)

Static

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)

Static

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)

Static

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)

Static

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)

Static

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>()

Static

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)

Static

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.