Exemplo n.º 1
0
        private byte[] GetGridUserInfo(Dictionary <string, object> request)
        {
            string user = String.Empty;

            if (!request.ContainsKey("UserID"))
            {
                return(FailureResult());
            }

            user = request["UserID"].ToString();

            GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(user);

            Dictionary <string, object> result = new Dictionary <string, object>();

            if (guinfo != null)
            {
                result["result"] = guinfo.ToKeyValuePairs();
            }
            else
            {
                result["result"] = "null";
            }

            string xmlString = ServerUtils.BuildXmlResponse(result);

            //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString);
            return(Util.UTF8NoBomEncoding.GetBytes(xmlString));
        }
Exemplo n.º 2
0
        byte[] LoggedIn(Dictionary <string, object> request)
        {
            string user = String.Empty;

            if (!request.ContainsKey("UserID"))
            {
                return(FailureResult());
            }

            user = request["UserID"].ToString();

            GridUserInfo guinfo = m_GridUserService.LoggedIn(user);

            Dictionary <string, object> result = new Dictionary <string, object>();

            result["result"] = guinfo.ToKeyValuePairs();

            string xmlString = ServerUtils.BuildXmlResponse(result);
            //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString);
            UTF8Encoding encoding = new UTF8Encoding();

            return(encoding.GetBytes(xmlString));
        }