public static void Parse <TInput, TResult>(this IParseTrait <TInput, TResult> trait, Func <TInput, TResult> parseFn) { trait.Parse = new ParseComponent <TInput, TResult>(parseFn); }
public static void Parse <TResult>(this IParseTrait <string, TResult> trait) where TResult : struct { trait.Parse = new ParseComponent <string, TResult>(value => value.To <TResult>()); }
public static void Parse <TResult>(this IParseTrait <List <Selectable <TResult> >, List <TResult> > trait, List <Selectable <TResult> > choices) { trait.Parse = new ParseSelectableListComponent <List <TResult>, TResult>(choices); }
public static void Parse <TResult>(this IParseTrait <int, TResult> trait, List <TResult> choices) { trait.Parse = new ParseListComponent <TResult>(choices); }
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); }
public static void Parse <TResult>(this IParseTrait <ConsoleKey, TResult> trait, Dictionary <ConsoleKey, TResult> choices) { trait.Parse = new ParseDictionaryComponent <ConsoleKey, TResult>(choices); }