コード例 #1
0
 public ParseSelectablePagedListComponent(IPagingTrait <Selectable <TResult> > paging)
 {
     Parse = value =>
     {
         return((TList)paging.Paging.PagedChoices.SelectMany(x => x.Value).Where(x => x.IsSelected).Select(x => x.Item).ToList());
     };
 }
コード例 #2
0
 public DisplayPagedListChoices(IPagingTrait <TResult> paging, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _paging  = paging;
     _convert = convert;
     _console = console;
 }
コード例 #3
0
 public DisplaySelectablePagedChoices(IPagingTrait <Selectable <TResult> > paging, IConvertToStringTrait <TResult> convert, IConsole console)
 {
     _paging  = paging;
     _convert = convert;
     _console = console;
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 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);
 }
コード例 #6
0
 public static void Parse <TResult>(this IParseTrait <Dictionary <int, List <Selectable <TResult> > >, List <TResult> > trait, IPagingTrait <Selectable <TResult> > paging)
 {
     trait.Parse = new ParseSelectablePagedListComponent <List <TResult>, TResult>(paging);
 }
コード例 #7
0
 public static void Paging <TResult>(this IPagingTrait <TResult> trait, List <TResult> chocies, int pageSize)
 {
     trait.Paging = new PagingComponent <TResult>(chocies, pageSize);
 }