using System; using System.Reflection; namespace GlitchyEngine.Extensions; /// /// Extends with useful methods. /// public static class MemberInfoExtension { /// /// Returns if the member has the specified attribute. /// /// The type of the attribute. public static bool HasCustomAttribute(this MemberInfo memberInfo) where T : Attribute { return memberInfo.GetCustomAttribute() != null; } }