Aurora.Addon.HyperGrid.InstantMessageServerConnector.doIMSending C# (CSharp) Метод

doIMSending() защищенный Метод

This actually does the XMLRPC Request
protected doIMSending ( string httpInfo, Hashtable xmlrpcdata ) : bool
httpInfo string
xmlrpcdata System.Collections.Hashtable The Instant Message data Hashtable
Результат bool
        protected virtual bool doIMSending(string httpInfo, Hashtable xmlrpcdata)
        {
            ArrayList SendParams = new ArrayList ();
            SendParams.Add (xmlrpcdata);
            XmlRpcRequest GridReq = new XmlRpcRequest ("grid_instant_message", SendParams);
            try
            {
                XmlRpcResponse GridResp = GridReq.Send (httpInfo, 7000);

                Hashtable responseData = (Hashtable)GridResp.Value;

                if (responseData.ContainsKey ("success"))
                {
                    if ((string)responseData["success"] == "TRUE")
                        return true;
                    else
                        return false;
                }
                else
                    return false;
            }
            catch (WebException e)
            {
                MainConsole.Instance.ErrorFormat ("[GRID INSTANT MESSAGE]: Error sending message to " + httpInfo, e.Message);
            }

            return false;
        }