예제 #1
0
 /// <summary>
 /// 添加新的管道
 /// </summary>
 /// <typeparam name="InFlowContext"></typeparam>
 /// <typeparam name="OutFlowContext"></typeparam>
 /// <typeparam name="NOutFlowContext"></typeparam>
 /// <param name="flowGenerator"></param>
 /// <param name="nextPipe"></param>
 /// <returns></returns>
 public static EventFlowGenerator <InFlowContext, NOutFlowContext> AddPipe <InFlowContext, OutFlowContext, NOutFlowContext>(this EventFlowGenerator <InFlowContext, OutFlowContext> flowGenerator,
                                                                                                                            BaseSinglePipe <OutFlowContext, NOutFlowContext> nextPipe)
     where InFlowContext : IPipeContext
     where OutFlowContext : IPipeContext
     where NOutFlowContext : IPipeContext
 {
     flowGenerator.NPipeAppender.Append(nextPipe);
     return(new EventFlowGenerator <InFlowContext, NOutFlowContext>(flowGenerator.StartPipe, nextPipe));
 }
예제 #2
0
 /// <summary>
 ///  生成流体
 /// </summary>
 /// <returns></returns>
 public static EventFlow <InFlowContext, OutFlowContext> ToFlow <InFlowContext, OutFlowContext>(this EventFlowGenerator <InFlowContext, OutFlowContext> flowGenerator)
     where InFlowContext : IPipeContext
     where OutFlowContext : IPipeContext
 {
     return(new EventFlow <InFlowContext, OutFlowContext>(flowGenerator.StartPipe, flowGenerator.NPipeAppender));
 }