private SyntaxAttribute GetSyntaxAttribute(MemberInfo memberInfo) { var attributes = memberInfo.GetCustomAttributes(typeof(SyntaxAttribute), true); if (attributes.Length == 0) { return null; } return (SyntaxAttribute)attributes[0]; }