static void RenderItems(ConventionResult resultInfo, StringBuilder stringBuilder, IConventionFormatContext context)
 {
     foreach (var conventionFailure in resultInfo.Data)
     {
         stringBuilder.Append("\t");
         stringBuilder.AppendLine(context.FormatDataAsString(conventionFailure));
     }
 }
 public string Process(IConventionFormatContext context, ConventionResult result)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("Il y a ").Append(result.Data.Length).AppendLine(" types en erreur : ");
     foreach(var t in result.Data)
     {
         sb.AppendLine(((Type)t).Name);
     }
     return sb.ToString();
 }
 public string Process(IConventionFormatContext context, ConventionResult result)
 {
     var formatter = new DefaultFormatter(result.DataType);
     var message = new StringBuilder();
     message.AppendLine(string.Join(",", formatter.DesribeType()));
     foreach (var item in result.Data)
     {
         message.AppendLine(string.Join(",", formatter.DesribeItem(item, context)));
     }
     return message.ToString();
 }
        public string Process(IConventionFormatContext context, ConventionResult result)
        {
            var description = new StringBuilder();
            var title = string.Format("'{0}' for '{1}'", result.ConventionTitle, result.DataDescription);
            description.AppendLine(title);
            description.AppendLine(string.Empty.PadRight(title.Length, '-'));
            description.AppendLine();

            RenderItems(result, description, context);

            return description.ToString();
        }
 protected bool Equals(ConventionResult other)
 {
     return DataType == other.DataType && string.Equals(ConventionTitle, other.ConventionTitle) && string.Equals(DataDescription, other.DataDescription);
 }
 protected bool Equals(ConventionResult other)
 {
     return(DataType == other.DataType && string.Equals(ConventionTitle, other.ConventionTitle) && string.Equals(DataDescription, other.DataDescription));
 }