public FooterRows DeepCloneWithFormat(FooterRowsFormat format)
        {
            var result = new FooterRows(
                this.Rows?.DeepClone(),
                format);

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FooterRows"/> class.
        /// </summary>
        /// <param name="rows">The rows.</param>
        /// <param name="format">OPTIONAL format to apply to all footer rows.  DEFAULT is to leave the format unchanged.</param>
        public FooterRows(
            IReadOnlyList<FlatRow> rows,
            FooterRowsFormat 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;
        }