void DeserializeWithFormatPlugin(object PluginNameObject) { string PluginName = PluginNameObject.ToString(); try { Response Res = DisplayedResponse.GetClone(true); FormatPlugin FP = FormatPlugin.Get(PluginName); CurrentFormatXml = FP.ToXmlFromResponse(Res); CurrentXmlNameValueArray = FormatPlugin.XmlToArray(CurrentFormatXml); ShowStatusMsg(""); SetDeserializedDataInUi(PluginName, CurrentFormatXml, CurrentXmlNameValueArray); ShowProgressBar(false); } catch (ThreadAbortException) { ShowStatusMsg(""); } catch (Exception Exp) { IronException.Report(string.Format("Error converting Response to {0}", PluginName), Exp); ShowErrorMsg(string.Format("Unable to parse Response body as {0}", PluginName)); ShowProgressBar(false); } }
void AutoDetectFormatAndSetBodyParameters(object ResObj) { try { Response Res = ((Response)ResObj).GetClone(); string FPName = FormatPlugin.Get(Res); if (FPName.Length > 0 && FPName != "Normal") { try { FormatPlugin FP = FormatPlugin.Get(FPName); CurrentFormatXml = FP.ToXmlFromResponse(Res); CurrentXmlNameValueArray = FormatPlugin.XmlToArray(CurrentFormatXml); SetDeserializedDataInUi(FP.Name, CurrentFormatXml, CurrentXmlNameValueArray); } catch { } } this.ResetBodyTypeFormatPluginsParametersChangedStatus(); ShowStatusMsg(""); ShowProgressBar(false); } catch {} }