using System; namespace zero.Core.Utils { public class TableColumn { public string Name { get; set; } public bool IsSeparator { get; set; } public Func FieldSelector { get; set; } public double Width { get; set; } public TableColumnType ColumnType { get; set; } public TableColumn Type(TableColumnType type) { ColumnType = type; return this; } public TableColumn Size(double width) { Width = width; return this; } public TableColumn For(Func fieldSelector) { FieldSelector = fieldSelector; return this; } public TableColumn Currency() { ColumnType = TableColumnType.Currency; return this; } public TableColumn Link() { ColumnType = TableColumnType.Link; return this; } } public enum TableColumnType { Default, Currency, Link } }