public DisplayListQuestion(string message, IConvertToStringTrait <TResult> convert, IDefaultTrait <List <TResult> > @default, IConsole console)
 {
     _message = message;
     _convert = convert;
     _default = @default;
     _console = console;
 }
 public RenderQuestion(string message, IConvertToStringTrait <TResult> convert, IDefaultTrait <TResult> @default, IConsole console)
 {
     _message = message;
     _convert = convert;
     _default = @default;
     _console = console;
 }
 public DisplaySelectablePagedChoices(IPagingTrait <Selectable <TResult> > paging, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _paging  = paging;
     _convert = convert;
     _console = console;
 }
示例#4
0
 public DisplaySelectableChoices(List <Selectable <TResult> > choices, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _choices = choices;
     _convert = convert;
     _console = console;
 }
 public static void Confirm <TResult>(this IConfirmTrait <List <TResult> > trait, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     trait.Confirm = new ConfirmListComponent <List <TResult>, TResult>(convert, console);
 }
示例#6
0
 public ConfirmComponent(IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _convert = convert;
     _console = console;
 }
 public static void ConvertToString <TResult>(this IConvertToStringTrait <TResult> trait)
 {
     trait.Convert = new ConvertToStringComponent <TResult>();
 }
 public static void RenderChoices <TResult>(this IRenderChoicesTrait <TResult> trait, Dictionary <ConsoleKey, TResult> choices, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     trait.RenderChoices = new DisplayExtendedChoices <TResult>(choices, convert, console);
 }
 public static void RenderRawChoices <TResult>(this IRenderChoicesTrait <TResult> trait, IPagingTrait <TResult> paging, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     trait.RenderChoices = new DisplaPagedRawChoices <TResult>(paging, convert, console);
 }
 public static void RenderRawChoices <TResult>(this IRenderChoicesTrait <TResult> trait, List <TResult> choices, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     trait.RenderChoices = new DisplaRawChoices <TResult>(choices, convert, console);
 }
 public static void RenderQuestion <TResult>(this IRenderQuestionTrait trait, string message, IConvertToStringTrait <TResult> convert, IDefaultTrait <TResult> @default, IConsole console)
 {
     trait.RenderQuestion = new RenderQuestion <TResult>(message, convert, @default, console);
 }
 public static void RenderConfirmQuestion(this IRenderQuestionTrait trait, string message, IConvertToStringTrait <bool> convert, IDefaultTrait <bool> @default, IConsole console)
 {
     trait.RenderQuestion = new DisplayConfirmQuestion <bool>(message, convert, @default, console);
 }
 public static void RenderChoices <TResult>(this IRenderChoicesTrait <TResult> trait, IPagingTrait <Selectable <TResult> > paging, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     trait.RenderChoices = new DisplaySelectablePagedChoices <TResult>(paging, convert, console);
 }
 public DisplayPagedListChoices(IPagingTrait <TResult> paging, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _paging  = paging;
     _convert = convert;
     _console = console;
 }
 public static void ConvertToString <TResult>(this IConvertToStringTrait <TResult> trait, Func <TResult, string> convertFn)
 {
     trait.Convert = new ConvertToStringComponent <TResult>(convertFn);
 }
 public DisplayExtendedChoices(Dictionary <ConsoleKey, TResult> choicesDictionary, IConvertToStringTrait <TResult> convertToString, IConsole console)
 {
     _choicesDictionary = choicesDictionary;
     _convertToString   = convertToString;
     _console           = console;
 }
示例#17
0
 public DisplaRawChoices(List <TResult> choices, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _choices = choices;
     _convert = convert;
     _console = console;
 }