コード例 #1
0
 /// <summary>
 /// Transform the values of all result alternatives.
 /// </summary>
 /// <typeparam name="TInput"></typeparam>
 /// <typeparam name="TMiddle"></typeparam>
 /// <typeparam name="TOutput"></typeparam>
 /// <param name="multiParser"></param>
 /// <param name="transform"></param>
 /// <returns></returns>
 public static IMultiParser <TInput, TOutput> Transform <TInput, TMiddle, TOutput>(this IMultiParser <TInput, TMiddle> multiParser, Func <TMiddle, TOutput> transform)
 => ParserMethods <TInput> .Transform(multiParser, transform);
コード例 #2
0
 /// <summary>
 /// Transform the output of the given parser. Synonym for Transform.
 /// </summary>
 /// <typeparam name="TInput"></typeparam>
 /// <typeparam name="TMiddle"></typeparam>
 /// <typeparam name="TOutput"></typeparam>
 /// <param name="parser"></param>
 /// <param name="transform"></param>
 /// <returns></returns>
 public static IParser <TInput, TOutput> Map <TInput, TMiddle, TOutput>(this IParser <TInput, TMiddle> parser, Func <TMiddle, TOutput> transform)
 => ParserMethods <TInput> .Transform(parser, transform);