/// <summary> /// Add title row on top of table /// </summary> /// <param name="builder"></param> /// <param name="title"></param> /// <returns></returns> public static ConsoleTableBuilder WithTitle(this ConsoleTableBuilder builder, string title, TextAligntment titleAligntment = TextAligntment.Center) { builder.TableTitle = title; builder.TableTitleTextAlignment = titleAligntment; return(builder); }
/// <summary> /// Add title row on top of table /// </summary> /// <param name="builder"></param> /// <param name="title"></param> /// <param name="foregroundColor">text color</param> /// <param name="backgroundColor">background color</param> /// <returns></returns> public static ConsoleTableBuilder WithTitle(this ConsoleTableBuilder builder, string title, ConsoleColor foregroundColor, ConsoleColor backgroundColor, TextAligntment titleAligntment = TextAligntment.Center) { builder.TableTitle = title; builder.TableTitleColor = new ConsoleColorNullable(foregroundColor, backgroundColor); builder.TableTitleTextAlignment = titleAligntment; return(builder); }