private static string ConvertToString(SuppressMessageAttribute attr) {
     List<string> args = new List<string>();
     args.Add(String.Format("\"{0}\"", attr.Category));
     args.Add(String.Format("\"{0}\"", attr.CheckId));
     if (!String.IsNullOrEmpty(attr.Scope)) {
         args.Add(String.Format("Scope = \"{0}\"", attr.Scope));
     }
     if (!String.IsNullOrEmpty(attr.Target)) {
         args.Add(String.Format("Target = \"{0}\"", attr.Target));
     }
     if (!String.IsNullOrEmpty(attr.MessageId)) {
         args.Add(String.Format("MessageID = \"{0}\"", attr.MessageId));
     }
     return String.Format("SuppressMessage({0})", String.Join(", ", args.ToArray()));
 }
 private static string FormatErrorMessage(SuppressMessageAttribute attr, string target, string targetType) {
     return String.Format("\t({0}) {1}: {2}", targetType, target, ConvertToString(attr));
 }