static MessageBodyMemberAttribute GetMessageBodyMemberAttribute (MemberInfo mi) { object [] matts = mi.GetCustomAttributes ( typeof (MessageBodyMemberAttribute), true); return matts.Length > 0 ? (MessageBodyMemberAttribute) matts [0] : null; } }