コード例 #1
0
ファイル: Flow.cs プロジェクト: lanicon/NFlow
        /// <summary>
        /// Trigger the execution of the flow passing an existing context
        /// </summary>
        /// <param name="context"></param>
        public void Execute(FlowContext <T> context)
        {
            this.Context = context;
            this.Context.Variables.Merge(DefaultVariables, false);

            foreach (var action in Actions)
            {
                TracingProviders.OnActionExecuting(action);

                action.Execute(Context);

                TracingProviders.OnActionExecuted(action);
            }
        }
コード例 #2
0
ファイル: Flow.cs プロジェクト: lanicon/NFlow
 /// <summary>
 /// Register a flow middleware
 /// </summary>
 /// <param name="middleware"></param>
 /// <returns></returns>
 public Flow <T> Register(IFlowMiddleware <T> middleware)
 {
     TracingProviders.Register(middleware);
     return(this);
 }