/// <summary>
 /// Создание отчёта об ошибках в коде для парсера.
 /// </summary>
 /// <param name="error">Ошибка</param>
 /// <param name="previous">Предыдущий отчёт об ошибках.</param>
 public ReportParserInfo(ReportParserInfoLine error = null, ReportParserInfo previous = null)
 {
     errors = new List <ReportParserInfoLine>();
     if (previous != null)
     {
         AddRange(previous);
     }
     if (error != null)
     {
         Add(error);
     }
 }
 /// <summary>
 /// Создание отчёта об ошибках в коде для парсера.
 /// </summary>
 /// <param name="errors">Список ошибок.</param>
 /// <param name="previous">Предыдущий отчёт об ошибках.</param>
 public ReportParserInfo(IEnumerable <ReportParserInfoLine> errors, ReportParserInfo previous = null)
 {
     if (previous == null)
     {
         if (errors == null)
         {
             this.errors = new List <ReportParserInfoLine>();
         }
         else
         {
             this.errors = new List <ReportParserInfoLine>(errors);
         }
     }
     else
     {
         this.errors = new List <ReportParserInfoLine>(previous);
         if (errors != null)
         {
             AddRange(errors);
         }
     }
 }
Пример #3
0
 internal ReportParserReadOnly(ReportParserInfo parent = null)
     : base(parent)
 {
     errors = ((List <ReportParserInfoLine>)errors).AsReadOnly();
 }
 /// <summary>
 /// Создание отчёта об ошибках в коде для парсера.
 /// </summary>
 /// <param name="previous">Предыдущий отчёт об ошибках.</param>
 /// <param name="errors">Список ошибок.</param>
 public ReportParserInfo(ReportParserInfo previous, params ReportParserInfoLine[] errors)
     : this(errors, previous)
 {
 }