Esempio n. 1
0
 public TableMeasurer(Table table, RenderContext options)
     : base(table, options)
 {
     _explicitWidth = table.Width;
     _border        = table.Border;
     _padRightCell  = table.PadRightCell;
 }
        /// <summary>
        /// Sets the border.
        /// </summary>
        /// <typeparam name="T">An object type with a border.</typeparam>
        /// <param name="obj">The object to set the border for.</param>
        /// <param name="border">The border to use.</param>
        /// <returns>The same instance so that multiple calls can be chained.</returns>
        public static T Border <T>(this T obj, TableBorder border)
            where T : class, IHasTableBorder
        {
            if (obj is null)
            {
                throw new ArgumentNullException(nameof(obj));
            }

            obj.Border = border;
            return(obj);
        }