Ejemplo n.º 1
0
        private Object consume(IRunnable runnable, Object parameter)
        {
            var consumers = runnableManager.GetConsumers(runnable);
            var converter = consumers.FirstOrDefault(c => c.IsConvertable(parameter));

            if (converter == null)
            {
                return(ExecuteRunnable(runnable, parameter));
            }
            return(converter.Convert(parameter, param => ExecuteRunnable(runnable, param)));
        }