private static Type AttributeType(Ast.Attribute node) { IExternalEntity attr = TypeSystemServices.GetOptionalEntity(node) as IExternalEntity; if (null == attr) return null; return attr.MemberInfo.DeclaringType; }