Example #1
0
        protected virtual object CallDelegate(string id, params InvokeParam[] args)
        {
            _invokeParameters.Clear();

            foreach (var param in args)
            {
                _invokeParameters.Set(param);
            }

            _invokeParameters.Set(new InvokeParam("binding", Binding));
            _invokeParameters.Set(new InvokeParam("sender", this));

            object definition;

            if (_delegates.TryGetValue(id, out definition))
            {
                return(DefinitionResolver.InvokeMethod(Controller, Binding, _delegates[id], _invokeParameters));
            }

            return(null);
        }