using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NotVisualComponent.Models { public class TableWithHeaderConfig : DocumentConfig { public (int Columns, int Rows) ColumnsRowsDataCount { get; set; } public List<(int Column, int Row)>? ColumnsRowsWidth { get; set; } public List<(int ColumnIndex, int RowIndex, string Header, string PropertyName)>? Headers { get; set; } public List? Data { get; set; } public string NullReplace { get; set; } = "null"; public void CheckFields() { if (Data == null || Data.Count == 0) throw new ArgumentNullException("No data"); if (ColumnsRowsWidth is null || ColumnsRowsWidth.Count == 0) throw new ArgumentNullException("Rows width invalid"); if (Headers is null || Headers.Count == 0) throw new ArgumentNullException("Header data invalid"); } } }