public static WebException DeserializeWebException(string str) { using (Stream stream = new MemoryStream()) { StringToStream(EncodingHelper.Base64Decode(str), stream); stream.Seek(0, SeekOrigin.Begin); Dictionary<string, string> dictionary = DeserializeDictionary(stream); WebResponse replayerWebResponse = new ReplayerWebResponse(dictionary); return new WebException("", null, WebExceptionStatus.UnknownError, replayerWebResponse); } }
public static WebException DeserializeWebException(string str) { using (Stream stream = new MemoryStream()) { StringToStream(EncodingHelper.Base64Decode(str), stream); stream.Seek(0, SeekOrigin.Begin); Dictionary <string, string> dictionary = DeserializeDictionary(stream); WebResponse replayerWebResponse = new ReplayerWebResponse(dictionary); return(new WebException("", null, WebExceptionStatus.UnknownError, replayerWebResponse)); } }