예제 #1
0
 public Composing(
     ITransducer <TInput, TMedium> left,
     ITransducer <TMedium, TResult> right)
 {
     Sync  = left.SyncCompose(right);
     Async = left.AsyncCompose(right);
 }
예제 #2
0
 public AsyncComposing(
     IAsyncTransducer <TInput, TMedium> left,
     IAsyncTransducer <TMedium, TResult> right)
 {
     Left  = left;
     Right = right;
 }
예제 #3
0
파일: Core.cs 프로젝트: AndrewGaspar/TD.Net
 /// <summary>
 /// Composes two transducers together by attaching the output of the first to the input of the second.
 /// </summary>
 /// <typeparam name="A">The input.</typeparam>
 /// <typeparam name="B">b</typeparam>
 /// <typeparam name="C">c</typeparam>
 /// <typeparam name="D">d</typeparam>
 /// <typeparam name="E">e</typeparam>
 /// <typeparam name="F">f</typeparam>
 /// <typeparam name="G">The result.</typeparam>
 /// <param name="first">The first.</param>
 /// <param name="second">The second.</param>
 /// <param name="third">The third.</param>
 /// <param name="fourth">The fourth.</param>
 /// <param name="fifth">The fifth.</param>
 /// <param name="sixth">The sixth.</param>
 /// <returns>A transducer composed from the input transducers.</returns>
 public static IAsyncTransducer <A, G> AsyncCompose <A, B, C, D, E, F, G>(
     IAsyncTransducer <A, B> first,
     IAsyncTransducer <B, C> second,
     IAsyncTransducer <C, D> third,
     IAsyncTransducer <D, E> fourth,
     IAsyncTransducer <E, F> fifth,
     IAsyncTransducer <F, G> sixth) => AsyncCompose(first, second, third, fourth, fifth).AsyncCompose(sixth);
예제 #4
0
 public static IAsyncReducer <TextWriter, TInput> AsyncWriteReducer <TInput>(
     this IAsyncTransducer <TInput, string> transducer) => transducer.Apply(AsyncWriteReducer());
예제 #5
0
파일: Core.cs 프로젝트: AndrewGaspar/TD.Net
 public static IAsyncTransducer <TInput, TResult> Filtering <TInput, TResult>(
     this IAsyncTransducer <TInput, TResult> transducer, Predicate <TResult> test) => transducer.AsyncCompose(Filtering(test));
예제 #6
0
파일: Core.cs 프로젝트: AndrewGaspar/TD.Net
 public static IAsyncTransducer <TInput, TResult> Mapping <TInput, TMedium, TResult>(
     this IAsyncTransducer <TInput, TMedium> transducer, Func <TMedium, TResult> map) => transducer.AsyncCompose(Mapping(map));
예제 #7
0
파일: Core.cs 프로젝트: AndrewGaspar/TD.Net
 /// <summary>
 /// Composes two transducers together by attaching the output of the first to the input of the second.
 /// </summary>
 /// <typeparam name="A">The input.</typeparam>
 /// <typeparam name="B">b</typeparam>
 /// <typeparam name="C">c</typeparam>
 /// <typeparam name="D">d</typeparam>
 /// <typeparam name="E">The result.</typeparam>
 /// <param name="first">The first.</param>
 /// <param name="second">The second.</param>
 /// <param name="third">The third.</param>
 /// <param name="fourth">The fourth.</param>
 /// <returns>A transducer composed from the input transducers.</returns>
 public static IAsyncTransducer <A, E> AsyncCompose <A, B, C, D, E>(
     IAsyncTransducer <A, B> first,
     IAsyncTransducer <B, C> second,
     IAsyncTransducer <C, D> third,
     IAsyncTransducer <D, E> fourth) => AsyncCompose(first, second, third).AsyncCompose(fourth);
예제 #8
0
파일: Core.cs 프로젝트: AndrewGaspar/TD.Net
 /// <summary>
 /// Composes two transducers together by attaching the output of the first to the input of the second.
 /// </summary>
 /// <typeparam name="A">The starting input.</typeparam>
 /// <typeparam name="B">b</typeparam>
 /// <typeparam name="C">c</typeparam>
 /// <typeparam name="D">The output type.</typeparam>
 /// <param name="first">The first.</param>
 /// <param name="second">The second.</param>
 /// <param name="third">The third.</param>
 /// <returns>A transducer composed from the input transducers.</returns>
 public static IAsyncTransducer <A, D> AsyncCompose <A, B, C, D>(
     IAsyncTransducer <A, B> first,
     IAsyncTransducer <B, C> second,
     IAsyncTransducer <C, D> third) => AsyncCompose(first, second).AsyncCompose(third);
예제 #9
0
파일: Core.cs 프로젝트: AndrewGaspar/TD.Net
 /// <summary>
 /// Composes two transducers together by attaching the output of the first to the input of the second.
 /// </summary>
 /// <typeparam name="A">The starting input.</typeparam>
 /// <typeparam name="B">b</typeparam>
 /// <typeparam name="C">The output type.</typeparam>
 /// <param name="first">The first transducer.</param>
 /// <param name="second">The second transducer.</param>
 /// <returns>A transducer composed from the input transducers.</returns>
 public static IAsyncTransducer <A, C> AsyncCompose <A, B, C>(
     this IAsyncTransducer <A, B> first,
     IAsyncTransducer <B, C> second) =>
 new AsyncComposing <A, B, C>(first, second);