[Mono-dev] patch for System.Net/WebException.cs
Andrew Skiba
andrews at mainsoft.com
Mon Sep 18 08:31:05 EDT 2006
Hello.
The following code reveils 2 problems in subj: wrong initial value for
Status, and incompatibility with .Net serialization. To check the
latter, run test on .net, rename out.xml into in.xml and run test on
mono. After applying the patch the test passes and initial value for
Status is the same.
using System;
using System.Runtime.Serialization.Formatters.Soap;
using System.Net;
using System.IO;
namespace dumb_GH20
{
class Program
{
static void Main (string[] args)
{
WebException def = new WebException ();
Console.Out.Write (def.Status);
WebException e = new WebException ("message",
new Exception ("inner"), WebExceptionStatus.PipelineFailure,
null);
SoapFormatter f = new SoapFormatter ();
FileStream fs = new FileStream ("out.xml",
FileMode.CreateNew);
f.Serialize (fs, e);
WebException e1 = (WebException) f.Deserialize
(new FileStream ("in.xml", FileMode.Open));
}
}
}
Thank you.
Andrew.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WebException.patch
Type: application/octet-stream
Size: 1120 bytes
Desc: WebException.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060918/6714ec1d/attachment.obj
More information about the Mono-devel-list
mailing list