summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/WeakReferenceOfT.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/WeakReferenceOfT.cs')
-rw-r--r--src/mscorlib/src/System/WeakReferenceOfT.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mscorlib/src/System/WeakReferenceOfT.cs b/src/mscorlib/src/System/WeakReferenceOfT.cs
index fbb6f09..7347683 100644
--- a/src/mscorlib/src/System/WeakReferenceOfT.cs
+++ b/src/mscorlib/src/System/WeakReferenceOfT.cs
@@ -20,6 +20,7 @@ using System.Diagnostics.Contracts;
namespace System
{
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
// This class is sealed to mitigate security issues caused by Object::MemberwiseClone.
public sealed class WeakReference<T> : ISerializable
where T : class
@@ -52,8 +53,8 @@ namespace System
}
Contract.EndContractBlock();
- T target = (T)info.GetValue("TrackedObject", typeof(T));
- bool trackResurrection = info.GetBoolean("TrackResurrection");
+ T target = (T)info.GetValue("TrackedObject", typeof(T)); // Do not rename (binary serialization)
+ bool trackResurrection = info.GetBoolean("TrackResurrection"); // Do not rename (binary serialization)
Create(target, trackResurrection);
}
@@ -105,8 +106,8 @@ namespace System
}
Contract.EndContractBlock();
- info.AddValue("TrackedObject", this.Target, typeof(T));
- info.AddValue("TrackResurrection", IsTrackResurrection());
+ info.AddValue("TrackedObject", this.Target, typeof(T)); // Do not rename (binary serialization)
+ info.AddValue("TrackResurrection", IsTrackResurrection()); // Do not rename (binary serialization)
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]