using System;
using System.Linq;
namespace Spectre.Console
{
///
/// Contains extension methods for .
///
public static class GridExtensions
{
///
/// Adds a new row to the grid.
///
/// The grid to add the row to.
/// The columns to add.
public static void AddRow(this Grid grid, params string[] columns)
{
if (grid is null)
{
throw new ArgumentNullException(nameof(grid));
}
if (columns is null)
{
throw new ArgumentNullException(nameof(columns));
}
grid.AddRow(columns.Select(column => new Markup(column)).ToArray());
}
}
}