Ejemplo n.º 1
0
        public void Invoke(IExecutionContext context)
        {
            var result    = default(Object);
            var obj       = context.Pop();
            var arguments = new Object[_length];

            for (var i = 0; i < arguments.Length; i++)
            {
                arguments[i] = context.Pop();
            }

            if (obj != null)
            {
                var function = obj as Function;

                if (function != null || TypeFunctions.TryFind(obj, out function))
                {
                    result = function.Invoke(arguments);
                }
            }

            context.Push(result);
        }