public DataRows DeepCloneWithFormat(DataRowsFormat format) { var result = new DataRows( this.Rows?.DeepClone(), format); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="DataRows"/> class. /// </summary> /// <param name="rows">The rows (at the root level of the row-tree).</param> /// <param name="format">OPTIONAL format to apply to all data rows. DEFAULT is to leave the format unchanged.</param> public DataRows( IReadOnlyList <Row> rows, DataRowsFormat format = null) { if (rows == null) { throw new ArgumentNullException(nameof(rows)); } if (rows.Any(_ => _ == null)) { throw new ArgumentException(Invariant($"{nameof(rows)} contains at least one null element.")); } this.Rows = rows; this.Format = format; }