public static bool IsComposite(PropertyInfo pi) { if (pi == null) return false; return (pi.GetCustomAttributes(typeof(CompositionAttribute), false).Length > 0); }