public static void PrintItems <T>(this TextWriter writer, IEnumerable <T> items)
        {
            var properties = typeof(T).GetProperties();

            var query = from item in properties
                        where item.PropertyType.IsArray == false
                        select item;

            var headers = from item in query
                          let displayName = item.GetDisplayName()
                                            select displayName != string.Empty ? displayName : item.Name;

            var dataBuilder = new TableDataBuilder(headers.ToArray());

            foreach (var item in items)
            {
                dataBuilder.Add(query.Select(i => i.GetValue(item, null)).ToArray());
            }

            writer.PrintTableData(dataBuilder.Data, true);
        }
 public static void Print(this TextWriter writer, TableDataBuilder tableData)
 {
     PrintTableData(writer, tableData.Data, tableData.HasHeader);
 }