55 |
{ |
{ |
56 |
if( o is XmlRpcResponse ){ |
if( o is XmlRpcResponse ){ |
57 |
StreamWriter sw = new StreamWriter( stream ); |
StreamWriter sw = new StreamWriter( stream ); |
|
StringWriter s = new StringWriter(); |
|
58 |
XmlRpcWriter w = new XmlRpcWriter( sw ); |
XmlRpcWriter w = new XmlRpcWriter( sw ); |
59 |
w.Write( (XmlRpcResponse)o ); |
w.Write( (XmlRpcResponse)o ); |
60 |
sw.Write( s.ToString() ); |
w.Flush(); |
|
sw.Flush(); |
|
61 |
} |
} |
62 |
else { |
else { |
63 |
|
// TODO This should be an exception |
64 |
Console.Out.WriteLine |
Console.Out.WriteLine |
65 |
( "BUMMER: wrong type given: {0}, expected and object of type {1}", |
( "iMethodResponseFormatter: On No! Wrong type given: {0}, expected and object of type {1}", |
66 |
o.GetType(), "DotGNU.XmlRpc.XmlRpcResponse" ); |
o.GetType(), "DotGNU.XmlRpc.XmlRpcResponse" ); |
67 |
} |
} |
68 |
} |
} |