protected override void OnResponse(object sender, XmlRpcResponseEventArgs e) { string fname = string.Format("{0}/{1}-{2:0000}-response-{3}.xml", _directory, DateTime.Now.Ticks, e.RequestNum, e.ProxyID); FileStream fstm = new FileStream(fname, FileMode.Create); Util.CopyStream(e.ResponseStream, fstm); fstm.Close(); }
//This is a stress test and is therefore being disabled to prevent failures do to lack of memory //[Test] public void TestLoggerWithFewLinesOfLargeData() { Session sesh = new Session(100, ObjectManager.ConnectionFor(id), "host", 12); stream = CreateBigShortStream(); XmlRpcResponseEventArgs args = new XmlRpcResponseEventArgs(Guid.NewGuid(), 1, stream); ObjectManager.MockProxyFor(id).Raise(p => p.ResponseEvent += null, args); ObjectManager.MockProxyFor(id).VerifyAll(); stream.Close(); }
private void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args) { TextReader reader = new StreamReader(args.ResponseStream); InternalRawLoginReply = reader.ReadToEnd(); }
internal void InternalOnResponse(XmlRpcResponseEventArgs e) { OnResponse(e); }
void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args) { if (ResponseEvent != null) { TextReader txt = new StreamReader(args.ResponseStream); string response = txt.ReadToEnd(); ResponseEvent(response); } }
protected virtual void OnResponse(object sender, XmlRpcResponseEventArgs e) { }
// utility for xml-rpc response handler public static void ResponseEventHandler(object sender, XmlRpcResponseEventArgs args) { StreamReader reader = new StreamReader(args.ResponseStream, Encoding.UTF8); Console.WriteLine("\nXML-RPC RESPONSE\n" + reader.ReadToEnd()); }
/// <summary> /// /// </summary> /// <param name="e"></param> protected virtual void OnResponse(XmlRpcResponseEventArgs e) { if (ResponseEvent != null) { ResponseEvent(this, e); } }
protected override void OnResponse(object sender, XmlRpcResponseEventArgs e) { DumpStream(e.ResponseStream); }
private void LogResponse(object o, XmlRpcResponseEventArgs args) { LogSomething("XML-RPC response:", args.ResponseStream); }
private void LogResponse(object o, XmlRpcResponseEventArgs args) { if(log.IsDebugEnabled) LogMsg(Level.Debug, DumpStream(args.ResponseStream, "XML-RPC response: ")); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void OnResponse(object sender, XmlRpcResponseEventArgs e) { DumpStream(e.ResponseStream); }
protected virtual void OnResponse(object sender, XmlRpcResponseEventArgs e) { }
private void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args) { args.ResponseStream.Seek(0, System.IO.SeekOrigin.Begin); System.IO.StreamReader sr = new System.IO.StreamReader(args.ResponseStream); lastResponse = sr.ReadToEnd(); }
protected virtual void OnResponse(XmlRpcResponseEventArgs e) { ResponseEvent?.Invoke(this, e); }
protected override void OnResponse(object sender, XmlRpcResponseEventArgs e) { base.OnResponse(sender, e); this.DumpStream(e.ResponseStream); }
/// <summary>Called when a response is received</summary> /// <param name="sender">The <c>XmlRpcClientProtocol</c> from the XML-RPC /// library, who raised this event.</param> /// <param name="e">The Event arguments</param> protected override void OnResponse(object sender, XmlRpcResponseEventArgs e) { if (Writer != null) Writer.WriteLine ("Receiving <====="); DumpStream (e.ResponseStream); if (Writer != null) { Writer.WriteLine ("====="); Writer.Flush (); } }
internal void InternalOnResponse(XmlRpcResponseEventArgs e) { OnResponse(e); }
private void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args) { PrintStream(args.ResponseStream); }