Пример #1
0
        // This unbinds a delegate manually
        internal void UnbindEndDelegate(Assembly asm, ActionDelegate d, EndActionAttribute a)
        {
            // Make proper name
            string actionname = a.GetFullActionName(asm);

            // Unbind delegate to action
            actions[actionname].UnbindEnd(d);
        }
Пример #2
0
        // This binds a delegate manually
        internal void BindEndDelegate(Assembly asm, ActionDelegate d, EndActionAttribute a)
        {
            // Make proper name
            string actionname = a.GetFullActionName(asm);

            // Bind delegate to action
            if (Exists(actionname))
            {
                actions[actionname].BindEnd(d);
            }
            else
            {
                General.ErrorLogger.Add(ErrorType.Warning, "Could not bind delegate for " + d.Method.Name + " to action \"" + a.ActionName + "\" (" + actionname + "), that action does not exist. Refer to, or edit Actions.cfg for all available application actions.");
            }
        }