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();
 }
Beispiel #2
0
        //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();

        }
Beispiel #3
0
 private void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args)
 {
     TextReader reader = new StreamReader(args.ResponseStream);
     InternalRawLoginReply = reader.ReadToEnd();
 }
 internal void InternalOnResponse(XmlRpcResponseEventArgs e)
 {
     OnResponse(e);
 }
Beispiel #5
0
 void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args)
 {
     if (ResponseEvent != null) {
         TextReader txt = new StreamReader(args.ResponseStream);
         string response = txt.ReadToEnd();
         ResponseEvent(response);
     }
 }
Beispiel #6
0
 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);
     }
 }
Beispiel #9
0
 protected override void OnResponse(object sender, XmlRpcResponseEventArgs e)
 {
   DumpStream(e.ResponseStream);
 }
 private void LogResponse(object o, XmlRpcResponseEventArgs args)
 {
     LogSomething("XML-RPC response:", args.ResponseStream);
 }
Beispiel #11
0
 private void LogResponse(object o, XmlRpcResponseEventArgs args)
 {
     if(log.IsDebugEnabled)
         LogMsg(Level.Debug, DumpStream(args.ResponseStream, "XML-RPC response: "));
 }
Beispiel #12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected override void OnResponse(object sender, XmlRpcResponseEventArgs e)
 {
     DumpStream(e.ResponseStream);
 }
Beispiel #13
0
 protected virtual void OnResponse(object sender, XmlRpcResponseEventArgs e)
 {
 }
Beispiel #14
0
 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);
 }
Beispiel #16
0
 protected override void OnResponse(object sender,
     XmlRpcResponseEventArgs e)
 {
     base.OnResponse(sender, e);
       this.DumpStream(e.ResponseStream);
 }
Beispiel #17
0
 /// <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);
 }
Beispiel #19
0
 private void proxy_ResponseEvent(object sender, XmlRpcResponseEventArgs args) {
     PrintStream(args.ResponseStream);
 }