private Hangout.Server.WebServices.CommandParser GetCommandParser(string noun) { Hangout.Server.WebServices.CommandParser parser = null; Hangout.Server.WebServices.HangoutCommandBase hangoutParser = new Hangout.Server.WebServices.HangoutCommandBase("Form1"); if (hangoutParser.GetCommandClassType(noun) != null) { parser = (Hangout.Server.WebServices.CommandParser)hangoutParser; } else { parser = new TwoFishCommandBase("HangoutCommand"); } return(parser); }
/// <summary> /// Main entry point for the state server to use the PaymentItems /// This will limited to Hangout commands /// </summary> /// <param name="xmlMessage">PaymentCommand string xml message</param> /// <returns>string XML response message</returns> public string ProcessMessage(string xmlMessage) { string response = ""; try { ServiceCommandSerializer paymentSerializer = new ServiceCommandSerializer(); PaymentCommand command = (PaymentCommand)paymentSerializer.DeserializeCommandData(xmlMessage, typeof(PaymentCommand)); Hangout.Server.WebServices.HangoutCommandBase parser = new Hangout.Server.WebServices.HangoutCommandBase("InvokePaymentItemsProcess"); response = parser.ProcessRequest(command).InnerXml; } catch (Exception ex) { response = CreateErrorDoc(ex.Message); } return(response); }