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> /// Method used to call the TwoFishService /// </summary> /// <param name="command">contains the Twofish PaymentCommand</param> /// <returns>The Twofish command response.</returns> private XmlDocument CallTwoFishService(PaymentCommand command) { XmlDocument response = null; try { TwoFishCommandBase parser = new TwoFishCommandBase(System.Reflection.MethodBase.GetCurrentMethod()); response = parser.ProcessRequest(command); } catch (Exception ex) { response = CreateErrorDoc(ex.Message); logError("CallTwoFishService", ex); } return(response); }
/// <summary> /// Call the Twofish Service command and return the XMLDocument /// </summary> /// <param name="command">PaymentCommand to execute</param> /// <param name="currentMethod">Current Method</param> /// <returns>Twofish XML Response document</returns> protected XmlDocument CallTwoFishService(PaymentCommand command, MethodBase currentMethod) { XmlDocument response = null; try { TwoFishCommandBase parser = new TwoFishCommandBase(currentMethod); response = parser.ProcessRequest(command); response = UpdateResponseNounVerb(response, currentMethod.DeclaringType.Name, currentMethod.Name); } catch (Exception ex) { response = CreateErrorDoc(ex.Message); logError("CallTwoFishService", ex); } return(response); }