Exemplo n.º 1
0
        public static void Route(IEnumerable <string> idList, string controlName, string actionName, NodeRequest req = null)
        {
            var puser = new NodeServerPusher();

            if (req != null)
            {
                puser.request = req;
            }
            else
            {
                puser.request = new NodeRequest()
                {
                    ClientList = new ClientList()
                }
            };
            if (idList != null)
            {
                puser.request.ClientList = new ClientList(idList);
            }
            puser.request.JsCmd     = "route";
            puser.request.RouteData = new RouteDefine()
            {
                ControllerName = controlName,
                ActionName     = actionName
            };
            puser.Send();
        }
Exemplo n.º 2
0
        public static void Notify(IEnumerable <string> idList, NodeRequest req = null)
        {
            // if (request == null)
            // NodeRequest request = new NodeRequest();
            var puser = new NodeServerPusher();

            if (req != null)
            {
                puser.request = req;
            }
            else
            {
                puser.request = new NodeRequest()
                {
                    ClientList = new ClientList()
                }
            };
            if (idList != null)
            {
                puser.request.ClientList = new ClientList(idList);
            }
            puser.request.JsCmd = "notify";
            puser.Send();
            //.Send();
        }
    }