diff options
Diffstat (limited to 'src/mscorlib/src/System/WeakReferenceOfT.cs')
-rw-r--r-- | src/mscorlib/src/System/WeakReferenceOfT.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mscorlib/src/System/WeakReferenceOfT.cs b/src/mscorlib/src/System/WeakReferenceOfT.cs index b8195df6d9..0972e5fb9e 100644 --- a/src/mscorlib/src/System/WeakReferenceOfT.cs +++ b/src/mscorlib/src/System/WeakReferenceOfT.cs @@ -46,7 +46,7 @@ namespace System internal WeakReference(SerializationInfo info, StreamingContext context) { if (info == null) { - throw new ArgumentNullException("info"); + throw new ArgumentNullException(nameof(info)); } Contract.EndContractBlock(); @@ -81,10 +81,8 @@ namespace System private extern T Target { [MethodImplAttribute(MethodImplOptions.InternalCall)] - [SecuritySafeCritical] get; [MethodImplAttribute(MethodImplOptions.InternalCall)] - [SecuritySafeCritical] set; } @@ -95,14 +93,12 @@ namespace System // This is needed for subclasses deriving from WeakReference<T>, however. // Additionally, there may be some cases during shutdown when we run this finalizer. [MethodImplAttribute(MethodImplOptions.InternalCall)] - [SecuritySafeCritical] extern ~WeakReference(); - [SecurityCritical] public void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) { - throw new ArgumentNullException("info"); + throw new ArgumentNullException(nameof(info)); } Contract.EndContractBlock(); @@ -111,11 +107,9 @@ namespace System } [MethodImplAttribute(MethodImplOptions.InternalCall)] - [SecuritySafeCritical] private extern void Create(T target, bool trackResurrection); [MethodImplAttribute(MethodImplOptions.InternalCall)] - [SecuritySafeCritical] private extern bool IsTrackResurrection(); } } |