/[dgee]/dgee/cslib/DotGNU/XmlRpc/Serialization/MethodCallFormatter.cs
ViewVC logotype

Diff of /dgee/cslib/DotGNU/XmlRpc/Serialization/MethodCallFormatter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by csmith, Sun Sep 21 10:55:47 2003 UTC revision 1.3 by csmith, Tue Oct 28 00:38:38 2003 UTC
# Line 53  namespace DotGNU.XmlRpc.Serialization.Fo Line 53  namespace DotGNU.XmlRpc.Serialization.Fo
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
72          Console.Out.WriteLine          Console.Out.WriteLine
73            ( "BUMMER: wrong type given: {0}, expected and object of type {1}",            ( "MethodCallFormatter: Oh No!  wrong type given: {0}, expected and object of type {1}",
74              o.GetType(), "DotGNU.XmlRpc.XmlRpcMethod" );              o.GetType(), "DotGNU.XmlRpc.XmlRpcMethod" );
75        }        }
76      }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26