public void P_Extension_Handler(ARWServer server, ARWObject obj)
        {
            string cmd = obj.eventParams.GetString("cmd");

            ExtensionRequest req = ARWEvents.extensionRequests.Where(a => a.cmd == cmd).FirstOrDefault();

            if (req != null)
            {
                req.handler(obj);
            }
        }
Exemplo n.º 2
0
        public void AddExtensionRequest(string cmd, EventHandler handler)
        {
            ExtensionRequest isEventExist = ARWEvents.extensionRequests.Where(a => a.cmd == cmd).FirstOrDefault();

            if (isEventExist != null)
            {
                return;
            }

            ExtensionRequest newEvent = new ExtensionRequest();

            newEvent.cmd     = cmd;
            newEvent.handler = handler;

            ARWEvents.extensionRequests.Add(newEvent);
        }