summaryrefslogtreecommitdiff
path: root/src/mscorlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src')
-rw-r--r--src/mscorlib/src/System/AggregateException.cs3
-rw-r--r--src/mscorlib/src/System/Array.cs1
-rw-r--r--src/mscorlib/src/System/ArraySegment.cs7
-rw-r--r--src/mscorlib/src/System/Attribute.cs1
-rw-r--r--src/mscorlib/src/System/Boolean.cs1
-rw-r--r--src/mscorlib/src/System/Byte.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Comparer.cs11
-rw-r--r--src/mscorlib/src/System/Collections/Generic/Comparer.cs8
-rw-r--r--src/mscorlib/src/System/Collections/Generic/Dictionary.cs9
-rw-r--r--src/mscorlib/src/System/Collections/Generic/EqualityComparer.cs10
-rw-r--r--src/mscorlib/src/System/Collections/Generic/List.cs7
-rw-r--r--src/mscorlib/src/System/Collections/ListDictionaryInternal.cs7
-rw-r--r--src/mscorlib/src/System/Collections/ObjectModel/Collection.cs3
-rw-r--r--src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs3
-rw-r--r--src/mscorlib/src/System/Decimal.cs4
-rw-r--r--src/mscorlib/src/System/Double.cs1
-rw-r--r--src/mscorlib/src/System/Enum.cs1
-rw-r--r--src/mscorlib/src/System/Exception.cs49
-rw-r--r--src/mscorlib/src/System/Globalization/CompareInfo.Windows.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/CompareInfo.cs29
-rw-r--r--src/mscorlib/src/System/Globalization/CultureInfo.cs47
-rw-r--r--src/mscorlib/src/System/Guid.cs23
-rw-r--r--src/mscorlib/src/System/Int16.cs1
-rw-r--r--src/mscorlib/src/System/Int32.cs1
-rw-r--r--src/mscorlib/src/System/Int64.cs1
-rw-r--r--src/mscorlib/src/System/IntPtr.cs3
-rw-r--r--src/mscorlib/src/System/Nullable.cs5
-rw-r--r--src/mscorlib/src/System/Object.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs14
-rw-r--r--src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs85
-rw-r--r--src/mscorlib/src/System/SByte.cs1
-rw-r--r--src/mscorlib/src/System/Single.cs1
-rw-r--r--src/mscorlib/src/System/String.cs1
-rw-r--r--src/mscorlib/src/System/TimeSpan.cs2
-rw-r--r--src/mscorlib/src/System/TimeZoneInfo.AdjustmentRule.cs28
-rw-r--r--src/mscorlib/src/System/TimeZoneInfo.TransitionTime.cs24
-rw-r--r--src/mscorlib/src/System/TimeZoneInfo.cs29
-rw-r--r--src/mscorlib/src/System/Tuple.cs80
-rw-r--r--src/mscorlib/src/System/UInt16.cs1
-rw-r--r--src/mscorlib/src/System/UInt32.cs1
-rw-r--r--src/mscorlib/src/System/UInt64.cs1
-rw-r--r--src/mscorlib/src/System/UIntPtr.cs3
-rw-r--r--src/mscorlib/src/System/ValueType.cs1
-rw-r--r--src/mscorlib/src/System/WeakReference.cs9
-rw-r--r--src/mscorlib/src/System/WeakReferenceOfT.cs9
-rw-r--r--src/mscorlib/src/mscorlib.Friends.cs2
46 files changed, 272 insertions, 259 deletions
diff --git a/src/mscorlib/src/System/AggregateException.cs b/src/mscorlib/src/System/AggregateException.cs
index 22bc323215..0b840972ef 100644
--- a/src/mscorlib/src/System/AggregateException.cs
+++ b/src/mscorlib/src/System/AggregateException.cs
@@ -30,9 +30,10 @@ namespace System
/// </remarks>
[Serializable]
[DebuggerDisplay("Count = {InnerExceptionCount}")]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class AggregateException : Exception
{
- private ReadOnlyCollection<Exception> m_innerExceptions; // Complete set of exceptions.
+ private ReadOnlyCollection<Exception> m_innerExceptions; // Complete set of exceptions. Do not rename (binary serialization)
/// <summary>
/// Initializes a new instance of the <see cref="AggregateException"/> class.
diff --git a/src/mscorlib/src/System/Array.cs b/src/mscorlib/src/System/Array.cs
index fcfeb94675..62a4ecf16e 100644
--- a/src/mscorlib/src/System/Array.cs
+++ b/src/mscorlib/src/System/Array.cs
@@ -26,6 +26,7 @@ namespace System
// Note that we make a T[] (single-dimensional w/ zero as the lower bound) implement both
// IList<U> and IReadOnlyList<U>, where T : U dynamically. See the SZArrayHelper class for details.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class Array : ICloneable, IList, IStructuralComparable, IStructuralEquatable
{
// This ctor exists solely to prevent C# from generating a protected .ctor that violates the surface area. I really want this to be a
diff --git a/src/mscorlib/src/System/ArraySegment.cs b/src/mscorlib/src/System/ArraySegment.cs
index 664352708d..7546c5bd56 100644
--- a/src/mscorlib/src/System/ArraySegment.cs
+++ b/src/mscorlib/src/System/ArraySegment.cs
@@ -26,15 +26,16 @@ namespace System
// three fields from an ArraySegment may not see the same ArraySegment from one call to another
// (ie, users could assign a new value to the old location).
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ArraySegment<T> : IList<T>, IReadOnlyList<T>
{
// Do not replace the array allocation with Array.Empty. We don't want to have the overhead of
// instantiating another generic type in addition to ArraySegment<T> for new type parameters.
public static ArraySegment<T> Empty { get; } = new ArraySegment<T>(new T[0]);
- private readonly T[] _array;
- private readonly int _offset;
- private readonly int _count;
+ private readonly T[] _array; // Do not rename (binary serialization)
+ private readonly int _offset; // Do not rename (binary serialization)
+ private readonly int _count; // Do not rename (binary serialization)
public ArraySegment(T[] array)
{
diff --git a/src/mscorlib/src/System/Attribute.cs b/src/mscorlib/src/System/Attribute.cs
index baa9a71638..23fd9aaaaf 100644
--- a/src/mscorlib/src/System/Attribute.cs
+++ b/src/mscorlib/src/System/Attribute.cs
@@ -17,6 +17,7 @@ namespace System
{
[Serializable]
[AttributeUsageAttribute(AttributeTargets.All, Inherited = true, AllowMultiple = false)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class Attribute
{
#region Private Statics
diff --git a/src/mscorlib/src/System/Boolean.cs b/src/mscorlib/src/System/Boolean.cs
index 59cab74456..a1f5064964 100644
--- a/src/mscorlib/src/System/Boolean.cs
+++ b/src/mscorlib/src/System/Boolean.cs
@@ -21,6 +21,7 @@ namespace System
// The Boolean class provides the
// object representation of the boolean primitive type.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Boolean : IComparable, IConvertible, IComparable<Boolean>, IEquatable<Boolean>
{
//
diff --git a/src/mscorlib/src/System/Byte.cs b/src/mscorlib/src/System/Byte.cs
index da3b790ac6..fafdcbb535 100644
--- a/src/mscorlib/src/System/Byte.cs
+++ b/src/mscorlib/src/System/Byte.cs
@@ -25,6 +25,7 @@ namespace System
//
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Byte : IComparable, IFormattable, IConvertible
, IComparable<Byte>, IEquatable<Byte>
{
diff --git a/src/mscorlib/src/System/Collections/Comparer.cs b/src/mscorlib/src/System/Collections/Comparer.cs
index 76e19e77f1..00259e6bdb 100644
--- a/src/mscorlib/src/System/Collections/Comparer.cs
+++ b/src/mscorlib/src/System/Collections/Comparer.cs
@@ -13,21 +13,17 @@
**
===========================================================*/
-using System;
using System.Globalization;
-using System.Runtime.Serialization;
using System.Diagnostics.Contracts;
namespace System.Collections
{
- internal sealed class Comparer : IComparer, ISerializable
+ internal sealed class Comparer : IComparer
{
private CompareInfo m_compareInfo;
public static readonly Comparer Default = new Comparer(CultureInfo.CurrentCulture);
public static readonly Comparer DefaultInvariant = new Comparer(CultureInfo.InvariantCulture);
- private const String CompareInfoName = "CompareInfo";
-
private Comparer()
{
m_compareInfo = null;
@@ -73,10 +69,5 @@ namespace System.Collections
throw new ArgumentException(SR.Argument_ImplementIComparable);
}
-
- public void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- throw new PlatformNotSupportedException();
- }
}
}
diff --git a/src/mscorlib/src/System/Collections/Generic/Comparer.cs b/src/mscorlib/src/System/Collections/Generic/Comparer.cs
index e163faa80f..47c241500d 100644
--- a/src/mscorlib/src/System/Collections/Generic/Comparer.cs
+++ b/src/mscorlib/src/System/Collections/Generic/Comparer.cs
@@ -18,6 +18,7 @@ namespace System.Collections.Generic
{
[Serializable]
[TypeDependencyAttribute("System.Collections.Generic.ObjectComparer`1")]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class Comparer<T> : IComparer, IComparer<T>
{
// To minimize generic instantiation overhead of creating the comparer per type, we keep the generic portion of the code as small
@@ -52,6 +53,7 @@ namespace System.Collections.Generic
// means another generic instantiation, which can be costly esp.
// for value types.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class GenericComparer<T> : Comparer<T> where T : IComparable<T>
{
public override int Compare(T x, T y)
@@ -74,6 +76,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class NullableComparer<T> : Comparer<T?> where T : struct, IComparable<T>
{
public override int Compare(T? x, T? y)
@@ -96,6 +99,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class ObjectComparer<T> : Comparer<T>
{
public override int Compare(T x, T y)
@@ -132,6 +136,7 @@ namespace System.Collections.Generic
// since we want to serialize as ObjectComparer for
// back-compat reasons (see below).
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class Int32EnumComparer<T> : Comparer<T>, ISerializable where T : struct
{
public Int32EnumComparer()
@@ -167,6 +172,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class UInt32EnumComparer<T> : Comparer<T>, ISerializable where T : struct
{
public UInt32EnumComparer()
@@ -198,6 +204,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class Int64EnumComparer<T> : Comparer<T>, ISerializable where T : struct
{
public Int64EnumComparer()
@@ -226,6 +233,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class UInt64EnumComparer<T> : Comparer<T>, ISerializable where T : struct
{
public UInt64EnumComparer()
diff --git a/src/mscorlib/src/System/Collections/Generic/Dictionary.cs b/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
index cd33428ca1..50724017dd 100644
--- a/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
+++ b/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
@@ -52,6 +52,7 @@ namespace System.Collections.Generic
[DebuggerTypeProxy(typeof(Mscorlib_DictionaryDebugView<,>))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue>, ISerializable, IDeserializationCallback
{
private struct Entry
@@ -74,10 +75,10 @@ namespace System.Collections.Generic
private Object _syncRoot;
// constants for serialization
- private const String VersionName = "Version";
- private const String HashSizeName = "HashSize"; // Must save buckets.Length
- private const String KeyValuePairsName = "KeyValuePairs";
- private const String ComparerName = "Comparer";
+ private const String VersionName = "Version"; // Do not rename (binary serialization)
+ private const String HashSizeName = "HashSize"; // Do not rename (binary serialization). Must save buckets.Length
+ private const String KeyValuePairsName = "KeyValuePairs"; // Do not rename (binary serialization)
+ private const String ComparerName = "Comparer"; // Do not rename (binary serialization)
public Dictionary() : this(0, null) { }
diff --git a/src/mscorlib/src/System/Collections/Generic/EqualityComparer.cs b/src/mscorlib/src/System/Collections/Generic/EqualityComparer.cs
index d6b213c9d7..760c9d10b2 100644
--- a/src/mscorlib/src/System/Collections/Generic/EqualityComparer.cs
+++ b/src/mscorlib/src/System/Collections/Generic/EqualityComparer.cs
@@ -17,6 +17,7 @@ namespace System.Collections.Generic
{
[Serializable]
[TypeDependencyAttribute("System.Collections.Generic.ObjectEqualityComparer`1")]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class EqualityComparer<T> : IEqualityComparer, IEqualityComparer<T>
{
// To minimize generic instantiation overhead of creating the comparer per type, we keep the generic portion of the code as small
@@ -69,6 +70,7 @@ namespace System.Collections.Generic
// The methods in this class look identical to the inherited methods, but the calls
// to Equal bind to IEquatable<T>.Equals(T) instead of Object.Equals(Object)
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal class GenericEqualityComparer<T> : EqualityComparer<T> where T : IEquatable<T>
{
[Pure]
@@ -137,6 +139,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class NullableEqualityComparer<T> : EqualityComparer<T?> where T : struct, IEquatable<T>
{
[Pure]
@@ -203,6 +206,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class ObjectEqualityComparer<T> : EqualityComparer<T>
{
[Pure]
@@ -275,6 +279,7 @@ namespace System.Collections.Generic
// keep the perofrmance not affected till we hit collision threshold and then we switch to the comparer which is using
// randomized string hashing GenericEqualityComparer<string>
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal class NonRandomizedStringEqualityComparer : GenericEqualityComparer<string>
{
private static IEqualityComparer<string> s_nonRandomizedComparer;
@@ -302,6 +307,7 @@ namespace System.Collections.Generic
// Performance of IndexOf on byte array is very important for some scenarios.
// We will call the C runtime function memchr, which is optimized.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class ByteEqualityComparer : EqualityComparer<byte>
{
[Pure]
@@ -353,6 +359,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal class EnumEqualityComparer<T> : EqualityComparer<T>, ISerializable where T : struct
{
[Pure]
@@ -416,6 +423,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class SByteEnumEqualityComparer<T> : EnumEqualityComparer<T> where T : struct
{
public SByteEnumEqualityComparer() { }
@@ -432,6 +440,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class ShortEnumEqualityComparer<T> : EnumEqualityComparer<T>, ISerializable where T : struct
{
public ShortEnumEqualityComparer() { }
@@ -448,6 +457,7 @@ namespace System.Collections.Generic
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class LongEnumEqualityComparer<T> : EqualityComparer<T>, ISerializable where T : struct
{
[Pure]
diff --git a/src/mscorlib/src/System/Collections/Generic/List.cs b/src/mscorlib/src/System/Collections/Generic/List.cs
index 94e794cfd2..2031ddc6ed 100644
--- a/src/mscorlib/src/System/Collections/Generic/List.cs
+++ b/src/mscorlib/src/System/Collections/Generic/List.cs
@@ -30,14 +30,15 @@ namespace System.Collections.Generic
[DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class List<T> : IList<T>, System.Collections.IList, IReadOnlyList<T>
{
private const int _defaultCapacity = 4;
- private T[] _items;
+ private T[] _items; // Do not rename (binary serialization)
[ContractPublicPropertyName("Count")]
- private int _size;
- private int _version;
+ private int _size; // Do not rename (binary serialization)
+ private int _version; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
diff --git a/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs b/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs
index 3f92038d4f..17eb89a2b2 100644
--- a/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs
+++ b/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs
@@ -20,11 +20,12 @@ namespace System.Collections
/// will be smaller and faster than a Hashtable if the number of elements is 10 or less.
/// This should not be used if performance is important for large numbers of elements.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal class ListDictionaryInternal : IDictionary
{
- private DictionaryNode head;
- private int version;
- private int count;
+ private DictionaryNode head; // Do not rename (binary serialization)
+ private int version; // Do not rename (binary serialization)
+ private int count; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
diff --git a/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs b/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs
index d9801dfaaf..8e5de70e72 100644
--- a/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs
+++ b/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs
@@ -15,9 +15,10 @@ namespace System.Collections.ObjectModel
[Serializable]
[DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Collection<T> : IList<T>, IList, IReadOnlyList<T>
{
- private IList<T> items;
+ private IList<T> items; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
diff --git a/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
index b484879c27..03c7d45e16 100644
--- a/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
+++ b/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
@@ -15,9 +15,10 @@ namespace System.Collections.ObjectModel
[Serializable]
[DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ReadOnlyCollection<T> : IList<T>, IList, IReadOnlyList<T>
{
- private IList<T> list;
+ private IList<T> list; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
diff --git a/src/mscorlib/src/System/Decimal.cs b/src/mscorlib/src/System/Decimal.cs
index ce59a99334..b120a368da 100644
--- a/src/mscorlib/src/System/Decimal.cs
+++ b/src/mscorlib/src/System/Decimal.cs
@@ -59,6 +59,7 @@ namespace System
[StructLayout(LayoutKind.Sequential)]
[Serializable]
[System.Runtime.Versioning.NonVersionable] // This only applies to field layout
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Decimal : IFormattable, IComparable, IConvertible, IComparable<Decimal>, IEquatable<Decimal>, IDeserializationCallback
{
// Sign mask for the flags field. A value of zero in this bit indicates a
@@ -132,7 +133,8 @@ namespace System
// positive and 1 meaning negative.
//
// NOTE: Do not change the order in which these fields are declared. The
- // native methods in this class rely on this particular order.
+ // native methods in this class rely on this particular order.
+ // Do not rename (binary serialization).
private int flags;
private int hi;
private int lo;
diff --git a/src/mscorlib/src/System/Double.cs b/src/mscorlib/src/System/Double.cs
index 30fa1a58b3..b64bb72ed2 100644
--- a/src/mscorlib/src/System/Double.cs
+++ b/src/mscorlib/src/System/Double.cs
@@ -23,6 +23,7 @@ namespace System
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Double : IComparable, IFormattable, IConvertible
, IComparable<Double>, IEquatable<Double>
{
diff --git a/src/mscorlib/src/System/Enum.cs b/src/mscorlib/src/System/Enum.cs
index 489f36739c..25a4ff34d3 100644
--- a/src/mscorlib/src/System/Enum.cs
+++ b/src/mscorlib/src/System/Enum.cs
@@ -15,6 +15,7 @@ using System.Diagnostics.Contracts;
namespace System
{
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class Enum : ValueType, IComparable, IFormattable, IConvertible
{
#region Private Constants
diff --git a/src/mscorlib/src/System/Exception.cs b/src/mscorlib/src/System/Exception.cs
index 8d01b4c461..725adac4a9 100644
--- a/src/mscorlib/src/System/Exception.cs
+++ b/src/mscorlib/src/System/Exception.cs
@@ -28,6 +28,7 @@ namespace System
using System.Diagnostics.Contracts;
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Exception : ISerializable
{
private void Init()
@@ -75,17 +76,17 @@ namespace System
throw new ArgumentNullException(nameof(info));
Contract.EndContractBlock();
- _className = info.GetString("ClassName");
- _message = info.GetString("Message");
- _data = (IDictionary)(info.GetValueNoThrow("Data", typeof(IDictionary)));
- _innerException = (Exception)(info.GetValue("InnerException", typeof(Exception)));
- _helpURL = info.GetString("HelpURL");
- _stackTraceString = info.GetString("StackTraceString");
- _remoteStackTraceString = info.GetString("RemoteStackTraceString");
- _remoteStackIndex = info.GetInt32("RemoteStackIndex");
-
- HResult = info.GetInt32("HResult");
- _source = info.GetString("Source");
+ _className = info.GetString("ClassName"); // Do not rename (binary serialization)
+ _message = info.GetString("Message"); // Do not rename (binary serialization)
+ _data = (IDictionary)(info.GetValueNoThrow("Data", typeof(IDictionary))); // Do not rename (binary serialization)
+ _innerException = (Exception)(info.GetValue("InnerException", typeof(Exception))); // Do not rename (binary serialization)
+ _helpURL = info.GetString("HelpURL"); // Do not rename (binary serialization)
+ _stackTraceString = info.GetString("StackTraceString"); // Do not rename (binary serialization)
+ _remoteStackTraceString = info.GetString("RemoteStackTraceString"); // Do not rename (binary serialization)
+ _remoteStackIndex = info.GetInt32("RemoteStackIndex"); // Do not rename (binary serialization)
+
+ HResult = info.GetInt32("HResult"); // Do not rename (binary serialization)
+ _source = info.GetString("Source"); // Do not rename (binary serialization)
// Get the WatsonBuckets that were serialized - this is particularly
// done to support exceptions going across AD transitions.
@@ -93,7 +94,7 @@ namespace System
// We use the no throw version since we could be deserializing a pre-V4
// exception object that may not have this entry. In such a case, we would
// get null.
- _watsonBuckets = (Object)info.GetValueNoThrow("WatsonBuckets", typeof(byte[]));
+ _watsonBuckets = (Object)info.GetValueNoThrow("WatsonBuckets", typeof(byte[])); // Do not rename (binary serialization)
if (_className == null || HResult == 0)
@@ -459,20 +460,20 @@ namespace System
_source = Source; // Set the Source information correctly before serialization
}
- info.AddValue("ClassName", GetClassName(), typeof(String));
- info.AddValue("Message", _message, typeof(String));
- info.AddValue("Data", _data, typeof(IDictionary));
- info.AddValue("InnerException", _innerException, typeof(Exception));
- info.AddValue("HelpURL", _helpURL, typeof(String));
- info.AddValue("StackTraceString", tempStackTraceString, typeof(String));
- info.AddValue("RemoteStackTraceString", _remoteStackTraceString, typeof(String));
- info.AddValue("RemoteStackIndex", _remoteStackIndex, typeof(Int32));
- info.AddValue("ExceptionMethod", null, typeof(String));
- info.AddValue("HResult", HResult);
- info.AddValue("Source", _source, typeof(String));
+ info.AddValue("ClassName", GetClassName(), typeof(String)); // Do not rename (binary serialization)
+ info.AddValue("Message", _message, typeof(String)); // Do not rename (binary serialization)
+ info.AddValue("Data", _data, typeof(IDictionary)); // Do not rename (binary serialization)
+ info.AddValue("InnerException", _innerException, typeof(Exception)); // Do not rename (binary serialization)
+ info.AddValue("HelpURL", _helpURL, typeof(String)); // Do not rename (binary serialization)
+ info.AddValue("StackTraceString", tempStackTraceString, typeof(String)); // Do not rename (binary serialization)
+ info.AddValue("RemoteStackTraceString", _remoteStackTraceString, typeof(String)); // Do not rename (binary serialization)
+ info.AddValue("RemoteStackIndex", _remoteStackIndex, typeof(Int32)); // Do not rename (binary serialization)
+ info.AddValue("ExceptionMethod", null, typeof(String)); // Do not rename (binary serialization)
+ info.AddValue("HResult", HResult); // Do not rename (binary serialization)
+ info.AddValue("Source", _source, typeof(String)); // Do not rename (binary serialization)
// Serialize the Watson bucket details as well
- info.AddValue("WatsonBuckets", _watsonBuckets, typeof(byte[]));
+ info.AddValue("WatsonBuckets", _watsonBuckets, typeof(byte[])); // Do not rename (binary serialization)
}
// This method will clear the _stackTrace of the exception object upon deserialization
diff --git a/src/mscorlib/src/System/Globalization/CompareInfo.Windows.cs b/src/mscorlib/src/System/Globalization/CompareInfo.Windows.cs
index eb4dc5613e..0df5463a2f 100644
--- a/src/mscorlib/src/System/Globalization/CompareInfo.Windows.cs
+++ b/src/mscorlib/src/System/Globalization/CompareInfo.Windows.cs
@@ -469,6 +469,7 @@ namespace System.Globalization
Debug.Assert(!_invariantMode);
Interop.Kernel32.NlsVersionInfoEx nlsVersion = new Interop.Kernel32.NlsVersionInfoEx();
+ nlsVersion.dwNLSVersionInfoSize = Marshal.SizeOf(typeof(Interop.Kernel32.NlsVersionInfoEx));
Interop.Kernel32.GetNLSVersionEx(Interop.Kernel32.COMPARE_STRING, _sortName, &nlsVersion);
return new SortVersion(
nlsVersion.dwNLSVersion,
diff --git a/src/mscorlib/src/System/Globalization/CompareInfo.cs b/src/mscorlib/src/System/Globalization/CompareInfo.cs
index 593e86415d..bfdbdc546b 100644
--- a/src/mscorlib/src/System/Globalization/CompareInfo.cs
+++ b/src/mscorlib/src/System/Globalization/CompareInfo.cs
@@ -34,6 +34,7 @@ namespace System.Globalization
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public partial class CompareInfo : IDeserializationCallback
{
// Mask used to check if IndexOf()/LastIndexOf()/IsPrefix()/IsPostfix() has the right flags.
@@ -69,11 +70,13 @@ namespace System.Globalization
private string _sortName; // The name that defines our behavior.
[OptionalField(VersionAdded = 3)]
- private SortVersion m_sortVersion; // Do not rename (binary serialization)
+ private SortVersion m_SortVersion; // Do not rename (binary serialization)
// _invariantMode is defined for the perf reason as accessing the instance field is faster than access the static property GlobalizationMode.Invariant
[NonSerialized]
private readonly bool _invariantMode = GlobalizationMode.Invariant;
+
+ private int culture; // Do not rename (binary serialization). The fields sole purpose is to support Desktop serialization.
internal CompareInfo(CultureInfo culture)
{
@@ -233,14 +236,26 @@ namespace System.Globalization
private void OnDeserialized()
{
- if (m_name != null)
+ // If we didn't have a name, use the LCID
+ if (m_name == null)
+ {
+ // From whidbey, didn't have a name
+ CultureInfo ci = CultureInfo.GetCultureInfo(this.culture);
+ m_name = ci._name;
+ }
+ else
{
InitSort(CultureInfo.GetCultureInfo(m_name));
}
}
[OnSerializing]
- private void OnSerializing(StreamingContext ctx) { }
+ private void OnSerializing(StreamingContext ctx)
+ {
+ // This is merely for serialization compatibility with Whidbey/Orcas, it can go away when we don't want that compat any more.
+ culture = CultureInfo.GetCultureInfo(this.Name).LCID; // This is the lcid of the constructing culture (still have to dereference to get target sort)
+ Contract.Assert(m_name != null, "CompareInfo.OnSerializing - expected m_name to be set already");
+ }
///////////////////////////----- Name -----/////////////////////////////////
//
@@ -1208,11 +1223,11 @@ namespace System.Globalization
{
get
{
- if (m_sortVersion == null)
+ if (m_SortVersion == null)
{
if (_invariantMode)
{
- m_sortVersion = new SortVersion(0, CultureInfo.LOCALE_INVARIANT, new Guid(0, 0, 0, 0, 0, 0, 0,
+ m_SortVersion = new SortVersion(0, CultureInfo.LOCALE_INVARIANT, new Guid(0, 0, 0, 0, 0, 0, 0,
(byte) (CultureInfo.LOCALE_INVARIANT >> 24),
(byte) ((CultureInfo.LOCALE_INVARIANT & 0x00FF0000) >> 16),
(byte) ((CultureInfo.LOCALE_INVARIANT & 0x0000FF00) >> 8),
@@ -1220,11 +1235,11 @@ namespace System.Globalization
}
else
{
- m_sortVersion = GetSortVersion();
+ m_SortVersion = GetSortVersion();
}
}
- return m_sortVersion;
+ return m_SortVersion;
}
}
diff --git a/src/mscorlib/src/System/Globalization/CultureInfo.cs b/src/mscorlib/src/System/Globalization/CultureInfo.cs
index 16e2d291a1..ee64bc52e2 100644
--- a/src/mscorlib/src/System/Globalization/CultureInfo.cs
+++ b/src/mscorlib/src/System/Globalization/CultureInfo.cs
@@ -206,6 +206,26 @@ namespace System.Globalization
InitializeFromName(name, useUserOverride);
}
+ private CultureInfo(CultureData cultureData)
+ {
+ Debug.Assert(cultureData != null);
+ _cultureData = cultureData;
+ _name = cultureData.CultureName;
+ _isInherited = false;
+ }
+
+ private static CultureInfo CreateCultureInfoNoThrow(string name, bool useUserOverride)
+ {
+ Debug.Assert(name != null);
+ CultureData cultureData = CultureData.GetCultureData(name, useUserOverride);
+ if (cultureData == null)
+ {
+ return null;
+ }
+
+ return new CultureInfo(cultureData);
+ }
+
public CultureInfo(int culture) : this(culture, true)
{
}
@@ -533,25 +553,22 @@ namespace System.Globalization
{
if (null == _parent)
{
- try
- {
- string parentName = _cultureData.SPARENT;
+ string parentName = _cultureData.SPARENT;
- if (String.IsNullOrEmpty(parentName))
+ if (String.IsNullOrEmpty(parentName))
+ {
+ _parent = InvariantCulture;
+ }
+ else
+ {
+ _parent = CreateCultureInfoNoThrow(parentName, _cultureData.UseUserOverride);
+ if (_parent == null)
{
+ // For whatever reason our IPARENT or SPARENT wasn't correct, so use invariant
+ // We can't allow ourselves to fail. In case of custom cultures the parent of the
+ // current custom culture isn't installed.
_parent = InvariantCulture;
}
- else
- {
- _parent = new CultureInfo(parentName, _cultureData.UseUserOverride);
- }
- }
- catch (ArgumentException)
- {
- // For whatever reason our IPARENT or SPARENT wasn't correct, so use invariant
- // We can't allow ourselves to fail. In case of custom cultures the parent of the
- // current custom culture isn't installed.
- _parent = InvariantCulture;
}
}
return _parent;
diff --git a/src/mscorlib/src/System/Guid.cs b/src/mscorlib/src/System/Guid.cs
index f64211d5d0..e3b3a6f944 100644
--- a/src/mscorlib/src/System/Guid.cs
+++ b/src/mscorlib/src/System/Guid.cs
@@ -18,6 +18,7 @@ namespace System
[StructLayout(LayoutKind.Sequential)]
[Serializable]
[System.Runtime.Versioning.NonVersionable] // This only applies to field layout
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Guid : IFormattable, IComparable
, IComparable<Guid>, IEquatable<Guid>
{
@@ -25,17 +26,17 @@ namespace System
////////////////////////////////////////////////////////////////////////////////
// Member variables
////////////////////////////////////////////////////////////////////////////////
- private int _a;
- private short _b;
- private short _c;
- private byte _d;
- private byte _e;
- private byte _f;
- private byte _g;
- private byte _h;
- private byte _i;
- private byte _j;
- private byte _k;
+ private int _a; // Do not rename (binary serialization)
+ private short _b; // Do not rename (binary serialization)
+ private short _c; // Do not rename (binary serialization)
+ private byte _d; // Do not rename (binary serialization)
+ private byte _e; // Do not rename (binary serialization)
+ private byte _f; // Do not rename (binary serialization)
+ private byte _g; // Do not rename (binary serialization)
+ private byte _h; // Do not rename (binary serialization)
+ private byte _i; // Do not rename (binary serialization)
+ private byte _j; // Do not rename (binary serialization)
+ private byte _k; // Do not rename (binary serialization)
diff --git a/src/mscorlib/src/System/Int16.cs b/src/mscorlib/src/System/Int16.cs
index aced05df6d..82e5dd5a38 100644
--- a/src/mscorlib/src/System/Int16.cs
+++ b/src/mscorlib/src/System/Int16.cs
@@ -22,6 +22,7 @@ namespace System
{
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Int16 : IComparable, IFormattable, IConvertible
, IComparable<Int16>, IEquatable<Int16>
{
diff --git a/src/mscorlib/src/System/Int32.cs b/src/mscorlib/src/System/Int32.cs
index afee0e42d7..503552117d 100644
--- a/src/mscorlib/src/System/Int32.cs
+++ b/src/mscorlib/src/System/Int32.cs
@@ -22,6 +22,7 @@ namespace System
{
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Int32 : IComparable, IFormattable, IConvertible
, IComparable<Int32>, IEquatable<Int32>
{
diff --git a/src/mscorlib/src/System/Int64.cs b/src/mscorlib/src/System/Int64.cs
index 619bf7e5d7..015387233c 100644
--- a/src/mscorlib/src/System/Int64.cs
+++ b/src/mscorlib/src/System/Int64.cs
@@ -21,6 +21,7 @@ namespace System
{
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Int64 : IComparable, IFormattable, IConvertible
, IComparable<Int64>, IEquatable<Int64>
{
diff --git a/src/mscorlib/src/System/IntPtr.cs b/src/mscorlib/src/System/IntPtr.cs
index 55c86e3795..e3439801ff 100644
--- a/src/mscorlib/src/System/IntPtr.cs
+++ b/src/mscorlib/src/System/IntPtr.cs
@@ -23,9 +23,10 @@ namespace System
using System.Diagnostics.Contracts;
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct IntPtr : IEquatable<IntPtr>, ISerializable
{
- unsafe private void* _value; // The compiler treats void* closest to uint hence explicit casts are required to preserve int behavior
+ unsafe private void* _value; // The compiler treats void* closest to uint hence explicit casts are required to preserve int behavior. Do not rename (binary serialization)
public static readonly IntPtr Zero;
diff --git a/src/mscorlib/src/System/Nullable.cs b/src/mscorlib/src/System/Nullable.cs
index 31a62ecea8..a2c7c350c9 100644
--- a/src/mscorlib/src/System/Nullable.cs
+++ b/src/mscorlib/src/System/Nullable.cs
@@ -23,10 +23,11 @@ namespace System
//
[Serializable]
[System.Runtime.Versioning.NonVersionable] // This only applies to field layout
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Nullable<T> where T : struct
{
- private bool hasValue;
- internal T value;
+ private bool hasValue; // Do not rename (binary serialization)
+ internal T value; // Do not rename (binary serialization)
[System.Runtime.Versioning.NonVersionable]
public Nullable(T value)
diff --git a/src/mscorlib/src/System/Object.cs b/src/mscorlib/src/System/Object.cs
index a476557911..8df1caa9e5 100644
--- a/src/mscorlib/src/System/Object.cs
+++ b/src/mscorlib/src/System/Object.cs
@@ -34,6 +34,7 @@ namespace System
[Serializable]
[ClassInterface(ClassInterfaceType.AutoDual)]
[System.Runtime.InteropServices.ComVisible(true)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Object
{
// Creates a new instance of an Object.
diff --git a/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs b/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs
index 9d34b48177..49a55181d4 100644
--- a/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs
+++ b/src/mscorlib/src/System/Reflection/Assembly.CoreCLR.cs
@@ -52,7 +52,19 @@ namespace System.Reflection
string requestedAssemblyPath = Path.Combine(Path.GetDirectoryName(requestorPath), requestedAssemblyName.Name+".dll");
// Load the dependency via LoadFrom so that it goes through the same path of being in the LoadFrom list.
- return Assembly.LoadFrom(requestedAssemblyPath);
+ Assembly resolvedAssembly = null;
+
+ try
+ {
+ resolvedAssembly = Assembly.LoadFrom(requestedAssemblyPath);
+ }
+ catch(FileNotFoundException)
+ {
+ // Catch FileNotFoundException when attempting to resolve assemblies via this handler to account for missing assemblies.
+ resolvedAssembly = null;
+ }
+
+ return resolvedAssembly;
}
public static Assembly LoadFrom(String assemblyFile)
diff --git a/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs b/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs
deleted file mode 100644
index 3179df09b7..0000000000
--- a/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*============================================================
-**
-**
-**
-**
-**
-** Purpose: Provides a localizable way of retrieving a file
-** that is linked into your assembly and/or satellite assembly
-** while also leaving the file on disk for unmanaged tools.
-**
-**
-===========================================================*/
-
-// Removing LooselyLinkedResourceReference from Whidbey. We don't
-// yet have any strong customer need for it yet.
-#if LOOSELY_LINKED_RESOURCE_REFERENCE
-
-namespace System.Resources {
- using System.Reflection;
- using System.Diagnostics.Contracts;
- using System.IO;
- using System.Runtime.InteropServices;
- using System.Globalization;
-
- [Serializable]
-
- public struct LooselyLinkedResourceReference {
- private String _manifestResourceName;
- private String _typeName;
-
- public LooselyLinkedResourceReference(String looselyLinkedResourceName, String typeName)
- {
- if (looselyLinkedResourceName == null)
- throw new ArgumentNullException(nameof(looselyLinkedResourceName));
- if (typeName == null)
- throw new ArgumentNullException(nameof(typeName));
- if (looselyLinkedResourceName.Length == 0)
- throw new ArgumentException(SR.Argument_EmptyName, nameof(looselyLinkedResourceName));
- if (typeName.Length == 0)
- throw new ArgumentException(SR.Argument_EmptyName, nameof(typeName));
- Contract.EndContractBlock();
-
- _manifestResourceName = looselyLinkedResourceName;
- _typeName = typeName;
- }
-
- public String LooselyLinkedResourceName {
- get { return _manifestResourceName; }
- }
-
- public String TypeName {
- get { return _typeName; }
- }
-
- public Object Resolve(Assembly assembly)
- {
- if (assembly == null)
- throw new ArgumentNullException(nameof(assembly));
- Contract.EndContractBlock();
-
- Stream data = assembly.GetManifestResourceStream(_manifestResourceName);
- if (data == null)
- throw new MissingManifestResourceException(SR.Format(SR.MissingManifestResource_LooselyLinked, _manifestResourceName, assembly.FullName));
-
- Type type = Type.GetType(_typeName, true);
-
- Object obj = Activator.CreateInstance(type, new Object[] { data });
- return obj;
- }
-
- // For good debugging with tools like ResView
- public override String ToString()
- {
- // This is for debugging only. Since we use the property names,
- // this does not need to be localized.
- return "LooselyLinkedResourceName = \""+ _manifestResourceName +"\", TypeName = \"" + _typeName + "\"";
- }
- }
-}
-
-#endif // LOOSELY_LINKED_RESOURCE_REFERENCE
diff --git a/src/mscorlib/src/System/SByte.cs b/src/mscorlib/src/System/SByte.cs
index 9e550936fe..8a0ab3e129 100644
--- a/src/mscorlib/src/System/SByte.cs
+++ b/src/mscorlib/src/System/SByte.cs
@@ -21,6 +21,7 @@ namespace System
// A place holder class for signed bytes.
[Serializable]
[CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct SByte : IComparable, IFormattable, IConvertible
, IComparable<SByte>, IEquatable<SByte>
{
diff --git a/src/mscorlib/src/System/Single.cs b/src/mscorlib/src/System/Single.cs
index 24e6839be6..c94e673c26 100644
--- a/src/mscorlib/src/System/Single.cs
+++ b/src/mscorlib/src/System/Single.cs
@@ -22,6 +22,7 @@ namespace System
{
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Single : IComparable, IFormattable, IConvertible
, IComparable<Single>, IEquatable<Single>
{
diff --git a/src/mscorlib/src/System/String.cs b/src/mscorlib/src/System/String.cs
index 0a17c1ee24..c2b7466d92 100644
--- a/src/mscorlib/src/System/String.cs
+++ b/src/mscorlib/src/System/String.cs
@@ -40,6 +40,7 @@ namespace System
// (indices) are zero-based.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed partial class String : IComparable, ICloneable, IConvertible, IEnumerable
, IComparable<String>, IEnumerable<char>, IEquatable<String>
{
diff --git a/src/mscorlib/src/System/TimeSpan.cs b/src/mscorlib/src/System/TimeSpan.cs
index 9166656d0f..ca60bcb16f 100644
--- a/src/mscorlib/src/System/TimeSpan.cs
+++ b/src/mscorlib/src/System/TimeSpan.cs
@@ -68,7 +68,7 @@ namespace System
// internal so that DateTime doesn't have to call an extra get
// method for some arithmetic operations.
- internal long _ticks;
+ internal long _ticks; // Do not rename (binary serialization)
//public TimeSpan() {
// _ticks = 0;
diff --git a/src/mscorlib/src/System/TimeZoneInfo.AdjustmentRule.cs b/src/mscorlib/src/System/TimeZoneInfo.AdjustmentRule.cs
index c0c27eeab7..79fe8db815 100644
--- a/src/mscorlib/src/System/TimeZoneInfo.AdjustmentRule.cs
+++ b/src/mscorlib/src/System/TimeZoneInfo.AdjustmentRule.cs
@@ -212,13 +212,13 @@ namespace System
}
Contract.EndContractBlock();
- info.AddValue("DateStart", _dateStart);
- info.AddValue("DateEnd", _dateEnd);
- info.AddValue("DaylightDelta", _daylightDelta);
- info.AddValue("DaylightTransitionStart", _daylightTransitionStart);
- info.AddValue("DaylightTransitionEnd", _daylightTransitionEnd);
- info.AddValue("BaseUtcOffsetDelta", _baseUtcOffsetDelta);
- info.AddValue("NoDaylightTransitions", _noDaylightTransitions);
+ info.AddValue("DateStart", _dateStart); // Do not rename (binary serialization)
+ info.AddValue("DateEnd", _dateEnd); // Do not rename (binary serialization)
+ info.AddValue("DaylightDelta", _daylightDelta); // Do not rename (binary serialization)
+ info.AddValue("DaylightTransitionStart", _daylightTransitionStart); // Do not rename (binary serialization)
+ info.AddValue("DaylightTransitionEnd", _daylightTransitionEnd); // Do not rename (binary serialization)
+ info.AddValue("BaseUtcOffsetDelta", _baseUtcOffsetDelta); // Do not rename (binary serialization)
+ info.AddValue("NoDaylightTransitions", _noDaylightTransitions); // Do not rename (binary serialization)
}
private AdjustmentRule(SerializationInfo info, StreamingContext context)
@@ -228,19 +228,19 @@ namespace System
throw new ArgumentNullException(nameof(info));
}
- _dateStart = (DateTime)info.GetValue("DateStart", typeof(DateTime));
- _dateEnd = (DateTime)info.GetValue("DateEnd", typeof(DateTime));
- _daylightDelta = (TimeSpan)info.GetValue("DaylightDelta", typeof(TimeSpan));
- _daylightTransitionStart = (TransitionTime)info.GetValue("DaylightTransitionStart", typeof(TransitionTime));
- _daylightTransitionEnd = (TransitionTime)info.GetValue("DaylightTransitionEnd", typeof(TransitionTime));
+ _dateStart = (DateTime)info.GetValue("DateStart", typeof(DateTime)); // Do not rename (binary serialization)
+ _dateEnd = (DateTime)info.GetValue("DateEnd", typeof(DateTime)); // Do not rename (binary serialization)
+ _daylightDelta = (TimeSpan)info.GetValue("DaylightDelta", typeof(TimeSpan)); // Do not rename (binary serialization)
+ _daylightTransitionStart = (TransitionTime)info.GetValue("DaylightTransitionStart", typeof(TransitionTime)); // Do not rename (binary serialization)
+ _daylightTransitionEnd = (TransitionTime)info.GetValue("DaylightTransitionEnd", typeof(TransitionTime)); // Do not rename (binary serialization)
- object o = info.GetValueNoThrow("BaseUtcOffsetDelta", typeof(TimeSpan));
+ object o = info.GetValueNoThrow("BaseUtcOffsetDelta", typeof(TimeSpan)); // Do not rename (binary serialization)
if (o != null)
{
_baseUtcOffsetDelta = (TimeSpan)o;
}
- o = info.GetValueNoThrow("NoDaylightTransitions", typeof(bool));
+ o = info.GetValueNoThrow("NoDaylightTransitions", typeof(bool)); // Do not rename (binary serialization)
if (o != null)
{
_noDaylightTransitions = (bool)o;
diff --git a/src/mscorlib/src/System/TimeZoneInfo.TransitionTime.cs b/src/mscorlib/src/System/TimeZoneInfo.TransitionTime.cs
index 1e1d9d328b..0fe3dab0b6 100644
--- a/src/mscorlib/src/System/TimeZoneInfo.TransitionTime.cs
+++ b/src/mscorlib/src/System/TimeZoneInfo.TransitionTime.cs
@@ -132,12 +132,12 @@ namespace System
}
Contract.EndContractBlock();
- info.AddValue("TimeOfDay", _timeOfDay);
- info.AddValue("Month", _month);
- info.AddValue("Week", _week);
- info.AddValue("Day", _day);
- info.AddValue("DayOfWeek", _dayOfWeek);
- info.AddValue("IsFixedDateRule", _isFixedDateRule);
+ info.AddValue("TimeOfDay", _timeOfDay); // Do not rename (binary serialization)
+ info.AddValue("Month", _month); // Do not rename (binary serialization)
+ info.AddValue("Week", _week); // Do not rename (binary serialization)
+ info.AddValue("Day", _day); // Do not rename (binary serialization)
+ info.AddValue("DayOfWeek", _dayOfWeek); // Do not rename (binary serialization)
+ info.AddValue("IsFixedDateRule", _isFixedDateRule); // Do not rename (binary serialization)
}
private TransitionTime(SerializationInfo info, StreamingContext context)
@@ -147,12 +147,12 @@ namespace System
throw new ArgumentNullException(nameof(info));
}
- _timeOfDay = (DateTime)info.GetValue("TimeOfDay", typeof(DateTime));
- _month = (byte)info.GetValue("Month", typeof(byte));
- _week = (byte)info.GetValue("Week", typeof(byte));
- _day = (byte)info.GetValue("Day", typeof(byte));
- _dayOfWeek = (DayOfWeek)info.GetValue("DayOfWeek", typeof(DayOfWeek));
- _isFixedDateRule = (bool)info.GetValue("IsFixedDateRule", typeof(bool));
+ _timeOfDay = (DateTime)info.GetValue("TimeOfDay", typeof(DateTime)); // Do not rename (binary serialization)
+ _month = (byte)info.GetValue("Month", typeof(byte)); // Do not rename (binary serialization)
+ _week = (byte)info.GetValue("Week", typeof(byte)); // Do not rename (binary serialization)
+ _day = (byte)info.GetValue("Day", typeof(byte)); // Do not rename (binary serialization)
+ _dayOfWeek = (DayOfWeek)info.GetValue("DayOfWeek", typeof(DayOfWeek)); // Do not rename (binary serialization)
+ _isFixedDateRule = (bool)info.GetValue("IsFixedDateRule", typeof(bool)); // Do not rename (binary serialization)
}
}
}
diff --git a/src/mscorlib/src/System/TimeZoneInfo.cs b/src/mscorlib/src/System/TimeZoneInfo.cs
index 8ed7e229c0..a492275a71 100644
--- a/src/mscorlib/src/System/TimeZoneInfo.cs
+++ b/src/mscorlib/src/System/TimeZoneInfo.cs
@@ -29,6 +29,7 @@ namespace System
};
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089")]
public sealed partial class TimeZoneInfo : IEquatable<TimeZoneInfo>, ISerializable, IDeserializationCallback
{
private enum TimeZoneInfoResult
@@ -1040,13 +1041,13 @@ namespace System
}
Contract.EndContractBlock();
- info.AddValue("Id", _id);
- info.AddValue("DisplayName", _displayName);
- info.AddValue("StandardName", _standardDisplayName);
- info.AddValue("DaylightName", _daylightDisplayName);
- info.AddValue("BaseUtcOffset", _baseUtcOffset);
- info.AddValue("AdjustmentRules", _adjustmentRules);
- info.AddValue("SupportsDaylightSavingTime", _supportsDaylightSavingTime);
+ info.AddValue("Id", _id); // Do not rename (binary serialization)
+ info.AddValue("DisplayName", _displayName); // Do not rename (binary serialization)
+ info.AddValue("StandardName", _standardDisplayName); // Do not rename (binary serialization)
+ info.AddValue("DaylightName", _daylightDisplayName); // Do not rename (binary serialization)
+ info.AddValue("BaseUtcOffset", _baseUtcOffset); // Do not rename (binary serialization)
+ info.AddValue("AdjustmentRules", _adjustmentRules); // Do not rename (binary serialization)
+ info.AddValue("SupportsDaylightSavingTime", _supportsDaylightSavingTime); // Do not rename (binary serialization)
}
private TimeZoneInfo(SerializationInfo info, StreamingContext context)
@@ -1056,13 +1057,13 @@ namespace System
throw new ArgumentNullException(nameof(info));
}
- _id = (string)info.GetValue("Id", typeof(string));
- _displayName = (string)info.GetValue("DisplayName", typeof(string));
- _standardDisplayName = (string)info.GetValue("StandardName", typeof(string));
- _daylightDisplayName = (string)info.GetValue("DaylightName", typeof(string));
- _baseUtcOffset = (TimeSpan)info.GetValue("BaseUtcOffset", typeof(TimeSpan));
- _adjustmentRules = (AdjustmentRule[])info.GetValue("AdjustmentRules", typeof(AdjustmentRule[]));
- _supportsDaylightSavingTime = (bool)info.GetValue("SupportsDaylightSavingTime", typeof(bool));
+ _id = (string)info.GetValue("Id", typeof(string)); // Do not rename (binary serialization)
+ _displayName = (string)info.GetValue("DisplayName", typeof(string)); // Do not rename (binary serialization)
+ _standardDisplayName = (string)info.GetValue("StandardName", typeof(string)); // Do not rename (binary serialization)
+ _daylightDisplayName = (string)info.GetValue("DaylightName", typeof(string)); // Do not rename (binary serialization)
+ _baseUtcOffset = (TimeSpan)info.GetValue("BaseUtcOffset", typeof(TimeSpan)); // Do not rename (binary serialization)
+ _adjustmentRules = (AdjustmentRule[])info.GetValue("AdjustmentRules", typeof(AdjustmentRule[])); // Do not rename (binary serialization)
+ _supportsDaylightSavingTime = (bool)info.GetValue("SupportsDaylightSavingTime", typeof(bool)); // Do not rename (binary serialization)
}
private AdjustmentRule GetAdjustmentRuleForTime(DateTime dateTime, out int? ruleIndex)
diff --git a/src/mscorlib/src/System/Tuple.cs b/src/mscorlib/src/System/Tuple.cs
index a118df02bd..6a8758278c 100644
--- a/src/mscorlib/src/System/Tuple.cs
+++ b/src/mscorlib/src/System/Tuple.cs
@@ -105,9 +105,10 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
@@ -204,10 +205,11 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
@@ -318,11 +320,12 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2, T3> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
- private readonly T3 m_Item3;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
+ private readonly T3 m_Item3; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
@@ -443,12 +446,13 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2, T3, T4> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
- private readonly T3 m_Item3;
- private readonly T4 m_Item4;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
+ private readonly T3 m_Item3; // Do not rename (binary serialization)
+ private readonly T4 m_Item4; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
@@ -579,13 +583,14 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2, T3, T4, T5> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
- private readonly T3 m_Item3;
- private readonly T4 m_Item4;
- private readonly T5 m_Item5;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
+ private readonly T3 m_Item3; // Do not rename (binary serialization)
+ private readonly T4 m_Item4; // Do not rename (binary serialization)
+ private readonly T5 m_Item5; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
@@ -726,14 +731,15 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2, T3, T4, T5, T6> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
- private readonly T3 m_Item3;
- private readonly T4 m_Item4;
- private readonly T5 m_Item5;
- private readonly T6 m_Item6;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
+ private readonly T3 m_Item3; // Do not rename (binary serialization)
+ private readonly T4 m_Item4; // Do not rename (binary serialization)
+ private readonly T5 m_Item5; // Do not rename (binary serialization)
+ private readonly T6 m_Item6; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
@@ -884,15 +890,16 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2, T3, T4, T5, T6, T7> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
- private readonly T3 m_Item3;
- private readonly T4 m_Item4;
- private readonly T5 m_Item5;
- private readonly T6 m_Item6;
- private readonly T7 m_Item7;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
+ private readonly T3 m_Item3; // Do not rename (binary serialization)
+ private readonly T4 m_Item4; // Do not rename (binary serialization)
+ private readonly T5 m_Item5; // Do not rename (binary serialization)
+ private readonly T6 m_Item6; // Do not rename (binary serialization)
+ private readonly T7 m_Item7; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
@@ -1053,16 +1060,17 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
{
- private readonly T1 m_Item1;
- private readonly T2 m_Item2;
- private readonly T3 m_Item3;
- private readonly T4 m_Item4;
- private readonly T5 m_Item5;
- private readonly T6 m_Item6;
- private readonly T7 m_Item7;
- private readonly TRest m_Rest;
+ private readonly T1 m_Item1; // Do not rename (binary serialization)
+ private readonly T2 m_Item2; // Do not rename (binary serialization)
+ private readonly T3 m_Item3; // Do not rename (binary serialization)
+ private readonly T4 m_Item4; // Do not rename (binary serialization)
+ private readonly T5 m_Item5; // Do not rename (binary serialization)
+ private readonly T6 m_Item6; // Do not rename (binary serialization)
+ private readonly T7 m_Item7; // Do not rename (binary serialization)
+ private readonly TRest m_Rest; // Do not rename (binary serialization)
public T1 Item1 { get { return m_Item1; } }
public T2 Item2 { get { return m_Item2; } }
diff --git a/src/mscorlib/src/System/UInt16.cs b/src/mscorlib/src/System/UInt16.cs
index c7be2e9a1f..746ed7ba49 100644
--- a/src/mscorlib/src/System/UInt16.cs
+++ b/src/mscorlib/src/System/UInt16.cs
@@ -21,6 +21,7 @@ namespace System
// Wrapper for unsigned 16 bit integers.
[Serializable]
[CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct UInt16 : IComparable, IFormattable, IConvertible
, IComparable<UInt16>, IEquatable<UInt16>
{
diff --git a/src/mscorlib/src/System/UInt32.cs b/src/mscorlib/src/System/UInt32.cs
index 2731047e06..f696816b98 100644
--- a/src/mscorlib/src/System/UInt32.cs
+++ b/src/mscorlib/src/System/UInt32.cs
@@ -23,6 +23,7 @@ namespace System
// * Wrapper for unsigned 32 bit integers.
[Serializable]
[CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct UInt32 : IComparable, IFormattable, IConvertible
, IComparable<UInt32>, IEquatable<UInt32>
{
diff --git a/src/mscorlib/src/System/UInt64.cs b/src/mscorlib/src/System/UInt64.cs
index a54bb69ba4..03cdcc5f40 100644
--- a/src/mscorlib/src/System/UInt64.cs
+++ b/src/mscorlib/src/System/UInt64.cs
@@ -21,6 +21,7 @@ namespace System
// Wrapper for unsigned 64 bit integers.
[Serializable]
[CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct UInt64 : IComparable, IFormattable, IConvertible
, IComparable<UInt64>, IEquatable<UInt64>
{
diff --git a/src/mscorlib/src/System/UIntPtr.cs b/src/mscorlib/src/System/UIntPtr.cs
index 08e494297b..1bed651e6f 100644
--- a/src/mscorlib/src/System/UIntPtr.cs
+++ b/src/mscorlib/src/System/UIntPtr.cs
@@ -21,9 +21,10 @@ namespace System
[Serializable]
[CLSCompliant(false)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct UIntPtr : IEquatable<UIntPtr>, ISerializable
{
- unsafe private void* _value;
+ unsafe private void* _value; // Do not rename (binary serialization)
public static readonly UIntPtr Zero;
diff --git a/src/mscorlib/src/System/ValueType.cs b/src/mscorlib/src/System/ValueType.cs
index 0cd08bd26f..e5b5528314 100644
--- a/src/mscorlib/src/System/ValueType.cs
+++ b/src/mscorlib/src/System/ValueType.cs
@@ -19,6 +19,7 @@ using System.Runtime.Versioning;
namespace System
{
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class ValueType
{
public override bool Equals(Object obj)
diff --git a/src/mscorlib/src/System/WeakReference.cs b/src/mscorlib/src/System/WeakReference.cs
index 60878b8e1c..a6a30c1978 100644
--- a/src/mscorlib/src/System/WeakReference.cs
+++ b/src/mscorlib/src/System/WeakReference.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")]
public class WeakReference : ISerializable
{
// If you fix bugs here, please fix them in WeakReference<T> at the same time.
@@ -57,8 +58,8 @@ namespace System
}
Contract.EndContractBlock();
- Object target = info.GetValue("TrackedObject", typeof(Object));
- bool trackResurrection = info.GetBoolean("TrackResurrection");
+ Object target = info.GetValue("TrackedObject", typeof(Object)); // Do not rename (binary serialization)
+ bool trackResurrection = info.GetBoolean("TrackResurrection"); // Do not rename (binary serialization)
Create(target, trackResurrection);
}
@@ -108,8 +109,8 @@ namespace System
throw new ArgumentNullException(nameof(info));
}
Contract.EndContractBlock();
- info.AddValue("TrackedObject", Target, typeof(Object));
- info.AddValue("TrackResurrection", IsTrackResurrection());
+ info.AddValue("TrackedObject", Target, typeof(Object)); // Do not rename (binary serialization)
+ info.AddValue("TrackResurrection", IsTrackResurrection()); // Do not rename (binary serialization)
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
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)]
diff --git a/src/mscorlib/src/mscorlib.Friends.cs b/src/mscorlib/src/mscorlib.Friends.cs
index b02b4829d9..709ec21191 100644
--- a/src/mscorlib/src/mscorlib.Friends.cs
+++ b/src/mscorlib/src/mscorlib.Friends.cs
@@ -13,3 +13,5 @@ using System.Runtime.CompilerServices;
// Depends on WindowsRuntimeImportAttribute
[assembly: InternalsVisibleTo("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000", AllInternalsVisible = false)]
+// Cross framework serialization needs access to internals
+[assembly: InternalsVisibleTo("mscorlib, PublicKey=00000000000000000400000000000000", AllInternalsVisible=false)]