protected override void PostProcessData() { MSNSLPCall call = null; if (sidToCall.ContainsKey(sessionID)) { call = sidToCall[sessionID]; } if (transferred > 0) { int n = (int)transferred; if (n > 128) { n = 128; } byte[] data = new byte[n]; PreviewData.Position = (long)initialOffset; PreviewData.Read(data, 0, data.Length); int remaining = 0; if ((int)transferred > data.Length) { remaining = (int)transferred - data.Length; } SetBodyFromTruncatedPreviewData(data, remaining); if (flags == 0x20 && initialOffset + transferred >= dataSize) { PreviewData.Position = 0; try { PreviewImage = new Bitmap(PreviewData); } catch (ArgumentException) { } } } if (call != null) { ContextID = call.CallID; } }
protected virtual void PostProcessSLP() { MSNSLPCall call = null; string str; str = GetSLPData(); if (str != null) { BodyText = str; string[] firstLineAndRest = str.Split(lineDelimiters, 2, StringSplitOptions.None); if (firstLineAndRest.Length > 1) { Dictionary <string, string> slpHeaderFields, sessionHeaderFields; string slpBody, sessionBody; ParseHTTPStyle(firstLineAndRest[1], out slpHeaderFields, out slpBody); ParseHTTPStyle(slpBody, out sessionHeaderFields, out sessionBody); if (slpHeaderFields.ContainsKey("CALL-ID") && sessionHeaderFields.ContainsKey("SESSIONID")) { string cid = slpHeaderFields["CALL-ID"]; UInt32 sid = Convert.ToUInt32(sessionHeaderFields["SESSIONID"]); if (cidToCall.ContainsKey(cid)) { call = cidToCall[cid]; } else { call = new MSNSLPCall(cid); cidToCall[cid] = call; sidToCall[sid] = call; } } } } if (call != null) { ContextID = call.CallID; } }
protected virtual void PostProcessSLP() { MSNSLPCall call = null; string str; str = GetSLPData(); if (str != null) { BodyText = str; string[] firstLineAndRest = str.Split(lineDelimiters, 2, StringSplitOptions.None); if (firstLineAndRest.Length > 1) { Dictionary<string, string> slpHeaderFields, sessionHeaderFields; string slpBody, sessionBody; ParseHTTPStyle(firstLineAndRest[1], out slpHeaderFields, out slpBody); ParseHTTPStyle(slpBody, out sessionHeaderFields, out sessionBody); if (slpHeaderFields.ContainsKey("CALL-ID") && sessionHeaderFields.ContainsKey("SESSIONID")) { string cid = slpHeaderFields["CALL-ID"]; UInt32 sid = Convert.ToUInt32(sessionHeaderFields["SESSIONID"]); if (cidToCall.ContainsKey(cid)) { call = cidToCall[cid]; } else { call = new MSNSLPCall(cid); cidToCall[cid] = call; sidToCall[sid] = call; } } } } if (call != null) ContextID = call.CallID; }