コード例 #1
0
        public string ProcessRestService(RESTCommand restCommand)
        {
            mServiceLog.Log.Debug("ProcessRestService (Remoting ProcessRequest) noun:(" + restCommand.Noun + ") verb:(" + restCommand.Verb + ")");

            RESTParser parser = new RESTParser();

            string response = parser.ProcessRestService(restCommand);

            Console.WriteLine("ProcessRestService RESTCommand Message Rcv: {0}", restCommand.Noun);

            return(response);
        }
コード例 #2
0
        private string GetSecureKey(string hangoutAccountId)
        {
            RESTCommand restCommand = new RESTCommand();

            restCommand.Noun = "Accounts";
            restCommand.Verb = "GetAccounts";
            restCommand.Parameters.Add("encrypted", "false");
            restCommand.Parameters.Add("accountId", hangoutAccountId);

            string servicesPath = ConfigurationManager.AppSettings["ServicesBasePath"];

            RESTParser restParser = new RESTParser(servicesPath);
            string     response   = restParser.ProcessRestService(restCommand);

            XmlDocument responseDoc = new XmlDocument();

            responseDoc.LoadXml(response);

            string secureKey = responseDoc.SelectSingleNode("/Accounts/Account").Attributes["PISecureKey"].InnerText;

            return(secureKey);
        }