Hello mono:: team!!
Here is another ;) small patch.
(feedback welcomed) 

Best regards.
cesar
Index: WeakReference.cs
===================================================================
RCS file: /mono/mcs/class/corlib/System/WeakReference.cs,v
retrieving revision 1.1
diff -u -r1.1 WeakReference.cs
--- WeakReference.cs    26 Feb 2002 20:30:39 -0000      1.1
+++ WeakReference.cs    14 Aug 2002 05:09:01 -0000
@@ -53,10 +53,8 @@
                        if (info == null)
                                throw new ArgumentNullException ("info");
 
-                       this.isLongReference = info.GetBoolean("IsLongReference");
-                       //TODO: How to load the exact type?
-                       //Does that matter? No idea :(
-                       Object target = 
info.GetValue("TargetObject",typeof(System.Object));
+                       this.isLongReference = info.GetBoolean ("TrackResurrection");
+                       Object target = info.GetValue ("TrackedObject", typeof 
+(System.Object));
 
                        AllocateHandle(target);
                }
@@ -99,20 +97,17 @@
                        gcHandle.Free();
                }
 
-               //TODO
-               public virtual void GetObjectData(SerializationInfo 
info,StreamingContext context)
+               public virtual void GetObjectData(SerializationInfo info, 
+StreamingContext context)
                {
                        if (info == null)
                                throw new ArgumentNullException ("info");
 
-                       info.AddValue("IsLongReference",this.isLongReference);
-                       try
-                       {
-                               info.AddValue("TargetObject",Target);
-                       }
-                       catch(Exception)
-                       {
-                               info.AddValue("TargetObject",null);
+                       info.AddValue ("TrackResurrection", TrackResurrection);
+                       
+                       try {
+                               info.AddValue ("TrackedObject", Target);
+                       } catch(Exception) {
+                               info.AddValue("TrackedObject",null);
                        }
                }
        }
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0"; 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<SOAP-ENV:Body>
<a1:WeakReference id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/ns/System";>
<TrackedObject id="ref-2" xsi:type="SOAP-ENC:string">hey hey hey</TrackedObject>
<TrackResurrection>false</TrackResurrection>
</a1:WeakReference>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Reply via email to