summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/WeakReferenceOfT.cs
diff options
context:
space:
mode:
authorjiseob.jang <jiseob.jang@samsung.com>2017-09-06 20:40:24 +0900
committerjiseob.jang <jiseob.jang@samsung.com>2017-09-07 11:55:42 +0900
commitcb9516da9df966079e5a34490139eec68c38dafa (patch)
tree39d5565943e78c35dd013cc771ed2980788fff38 /src/mscorlib/src/System/WeakReferenceOfT.cs
parent61d6a817e39d3bae0f47dbc09838d51db22a5d30 (diff)
downloadcoreclr-cb9516da9df966079e5a34490139eec68c38dafa.tar.gz
coreclr-cb9516da9df966079e5a34490139eec68c38dafa.tar.bz2
coreclr-cb9516da9df966079e5a34490139eec68c38dafa.zip
Imported Upstream version 2.0.0.12082upstream/2.0.0.12082
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 fbb6f09098..7347683e2f 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)]