Exemplo n.º 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()));
        }
Exemplo n.º 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));
        }