diff --git a/Dalamud/Utility/EnumExtensions.cs b/Dalamud/Utility/EnumExtensions.cs index b4c58d95c..0bb60962e 100644 --- a/Dalamud/Utility/EnumExtensions.cs +++ b/Dalamud/Utility/EnumExtensions.cs @@ -27,4 +27,14 @@ public static class EnumExtensions .OfType() .SingleOrDefault(); } + + /// + /// Gets an indicator if enum has been flagged as obsolete (deprecated). + /// + /// The enum value that has an attached attribute. + /// Indicator if enum has been flagged as obsolete. + public static bool IsObsolete(this Enum value) + { + return GetAttribute(value) != null; + } }