53 |
public void Serialize( Stream stream, object o ) |
public void Serialize( Stream stream, object o ) |
54 |
{ |
{ |
55 |
if( o is XmlRpcMethod ) { |
if( o is XmlRpcMethod ) { |
56 |
StringWriter s = new StringWriter(); |
//StringWriter s = new StringWriter(); |
57 |
XmlRpcWriter w = new XmlRpcWriter( s ); |
//XmlRpcWriter w = new XmlRpcWriter( s ); |
58 |
w.Write( (XmlRpcMethod)o ); |
//w.Write( (XmlRpcMethod)o ); |
59 |
|
|
60 |
|
//StreamWriter sw = new StreamWriter( stream ); |
61 |
|
//sw.Write( s.ToString() ); |
62 |
|
//sw.Flush(); |
63 |
|
|
64 |
|
|
65 |
StreamWriter sw = new StreamWriter( stream ); |
StreamWriter sw = new StreamWriter( stream ); |
66 |
sw.Write( s.ToString() ); |
XmlRpcWriter w = new XmlRpcWriter( sw ); |
67 |
sw.Flush(); |
w.Write( (XmlRpcMethod)o ); |
68 |
|
w.Flush(); |
69 |
} |
} |
70 |
else { |
else { |
71 |
// TODO This should be an exception |
// TODO This should be an exception |