using System; using System.Reflection; namespace DCFApixels.DragonECS { internal static class ReflectionExtensions { public static bool TryGetAttribute(this MemberInfo self, out T attribute) where T : Attribute { attribute = self.GetCustomAttribute(); return attribute != null; } } }