Пример #1
0
        public T Return()
        {
            var materializedParameters = new List <object>();

            foreach (var inputParam in InputParameters)
            {
                materializedParameters.Add(inputParam.DynamicInvoke());
            }

            return((T)InputFunction.DynamicInvoke(materializedParameters.ToArray()));
        }
Пример #2
0
        public IFlow <TResult> Call <TResult>(Func <T, TResult> doSomething)
        {
            return(FlowFactory.Create <TResult>(
                       doSomething,
                       new Delegate[]
            {
                new Func <object>(() =>
                {
                    var materializedParameters = new List <object>();
                    foreach (var inputParam in InputParameters)
                    {
                        materializedParameters.Add(inputParam.DynamicInvoke());
                    }

                    return InputFunction.DynamicInvoke(materializedParameters.ToArray());
                })
            },
                       _parameters));
        }