summaryrefslogtreecommitdiff
path: root/src/mscorlib/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/shared')
-rw-r--r--src/mscorlib/shared/System/Char.cs1
-rw-r--r--src/mscorlib/shared/System/Collections/DictionaryEntry.cs5
-rw-r--r--src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs5
-rw-r--r--src/mscorlib/shared/System/DateTime.cs5
-rw-r--r--src/mscorlib/shared/System/DateTimeOffset.cs9
-rw-r--r--src/mscorlib/shared/System/Globalization/SortVersion.cs1
-rw-r--r--src/mscorlib/shared/System/Reflection/Assembly.cs5
-rw-r--r--src/mscorlib/shared/System/Reflection/Module.cs5
-rw-r--r--src/mscorlib/shared/System/Reflection/ParameterInfo.cs41
-rw-r--r--src/mscorlib/shared/System/StringComparer.cs137
-rw-r--r--src/mscorlib/shared/System/Text/StringBuilder.cs10
-rw-r--r--src/mscorlib/shared/System/ValueTuple.cs9
-rw-r--r--src/mscorlib/shared/System/Version.cs9
13 files changed, 197 insertions, 45 deletions
diff --git a/src/mscorlib/shared/System/Char.cs b/src/mscorlib/shared/System/Char.cs
index 3fad7a4..7244176 100644
--- a/src/mscorlib/shared/System/Char.cs
+++ b/src/mscorlib/shared/System/Char.cs
@@ -21,6 +21,7 @@ namespace System
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Char : IComparable, IComparable<Char>, IEquatable<Char>, IConvertible
{
//
diff --git a/src/mscorlib/shared/System/Collections/DictionaryEntry.cs b/src/mscorlib/shared/System/Collections/DictionaryEntry.cs
index 290306d..3c1c0be 100644
--- a/src/mscorlib/shared/System/Collections/DictionaryEntry.cs
+++ b/src/mscorlib/shared/System/Collections/DictionaryEntry.cs
@@ -9,10 +9,11 @@ namespace System.Collections
// A DictionaryEntry holds a key and a value from a dictionary.
// It is returned by IDictionaryEnumerator::GetEntry().
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct DictionaryEntry
{
- private Object _key;
- private Object _value;
+ private Object _key; // Do not rename (binary serialization)
+ private Object _value; // Do not rename (binary serialization)
// Constructs a new DictionaryEnumerator by setting the Key
// and Value fields appropriately.
diff --git a/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs b/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs
index fc51af2..aeafecd 100644
--- a/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs
+++ b/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs
@@ -46,10 +46,11 @@ namespace System.Collections.Generic
// It is used by the IEnumerable<T> implementation for both IDictionary<TKey, TValue>
// and IReadOnlyDictionary<TKey, TValue>.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct KeyValuePair<TKey, TValue>
{
- private TKey key; // DO NOT change the field name, it's required for compatibility with desktop .NET as it appears in serialization payload.
- private TValue value; // DO NOT change the field name, it's required for compatibility with desktop .NET as it appears in serialization payload.
+ private TKey key; // Do not rename (binary serialization)
+ private TValue value; // Do not rename (binary serialization)
public KeyValuePair(TKey key, TValue value)
{
diff --git a/src/mscorlib/shared/System/DateTime.cs b/src/mscorlib/shared/System/DateTime.cs
index ddb72da..4fd9727 100644
--- a/src/mscorlib/shared/System/DateTime.cs
+++ b/src/mscorlib/shared/System/DateTime.cs
@@ -54,6 +54,7 @@ namespace System
//
[StructLayout(LayoutKind.Auto)]
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public partial struct DateTime : IComparable, IFormattable, IConvertible, IComparable<DateTime>, IEquatable<DateTime>, ISerializable
{
// Number of 100ns ticks per time unit
@@ -125,8 +126,8 @@ namespace System
private const UInt64 KindLocalAmbiguousDst = 0xC000000000000000;
private const Int32 KindShift = 62;
- private const String TicksField = "ticks";
- private const String DateDataField = "_dateData";
+ private const String TicksField = "ticks"; // Do not rename (binary serialization)
+ private const String DateDataField = "dateData"; // Do not rename (binary serialization)
// The data is stored as an unsigned 64-bit integeter
// Bits 01-62: The value of 100-nanosecond ticks where 0 represents 1/1/0001 12:00am, up until the value
diff --git a/src/mscorlib/shared/System/DateTimeOffset.cs b/src/mscorlib/shared/System/DateTimeOffset.cs
index d5ccbd9..ab35bdb 100644
--- a/src/mscorlib/shared/System/DateTimeOffset.cs
+++ b/src/mscorlib/shared/System/DateTimeOffset.cs
@@ -30,6 +30,7 @@ namespace System
[StructLayout(LayoutKind.Auto)]
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct DateTimeOffset : IComparable, IFormattable, IComparable<DateTimeOffset>, IEquatable<DateTimeOffset>, ISerializable, IDeserializationCallback
{
// Constants
@@ -573,8 +574,8 @@ namespace System
throw new ArgumentNullException(nameof(info));
}
- info.AddValue("DateTime", _dateTime);
- info.AddValue("OffsetMinutes", _offsetMinutes);
+ info.AddValue("DateTime", _dateTime); // Do not rename (binary serialization)
+ info.AddValue("OffsetMinutes", _offsetMinutes); // Do not rename (binary serialization)
}
@@ -585,8 +586,8 @@ namespace System
throw new ArgumentNullException(nameof(info));
}
- _dateTime = (DateTime)info.GetValue("DateTime", typeof(DateTime));
- _offsetMinutes = (Int16)info.GetValue("OffsetMinutes", typeof(Int16));
+ _dateTime = (DateTime)info.GetValue("DateTime", typeof(DateTime)); // Do not rename (binary serialization)
+ _offsetMinutes = (Int16)info.GetValue("OffsetMinutes", typeof(Int16)); // Do not rename (binary serialization)
}
// Returns the hash code for this DateTimeOffset.
diff --git a/src/mscorlib/shared/System/Globalization/SortVersion.cs b/src/mscorlib/shared/System/Globalization/SortVersion.cs
index 94c04d7..46e9a83 100644
--- a/src/mscorlib/shared/System/Globalization/SortVersion.cs
+++ b/src/mscorlib/shared/System/Globalization/SortVersion.cs
@@ -5,6 +5,7 @@
namespace System.Globalization
{
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class SortVersion : IEquatable<SortVersion>
{
private int m_NlsVersion; // Do not rename (binary serialization)
diff --git a/src/mscorlib/shared/System/Reflection/Assembly.cs b/src/mscorlib/shared/System/Reflection/Assembly.cs
index b965c9f..d35ffc7 100644
--- a/src/mscorlib/shared/System/Reflection/Assembly.cs
+++ b/src/mscorlib/shared/System/Reflection/Assembly.cs
@@ -125,10 +125,7 @@ namespace System.Reflection
public virtual FileStream[] GetFiles() => GetFiles(getResourceModules: false);
public virtual FileStream[] GetFiles(bool getResourceModules) { throw NotImplemented.ByDesign; }
- public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- throw new PlatformNotSupportedException();
- }
+ public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; }
public override string ToString()
{
diff --git a/src/mscorlib/shared/System/Reflection/Module.cs b/src/mscorlib/shared/System/Reflection/Module.cs
index 7822e9f..56f83c4 100644
--- a/src/mscorlib/shared/System/Reflection/Module.cs
+++ b/src/mscorlib/shared/System/Reflection/Module.cs
@@ -110,10 +110,7 @@ namespace System.Reflection
public Type ResolveType(int metadataToken) => ResolveType(metadataToken, null, null);
public virtual Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw NotImplemented.ByDesign; }
- public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- throw new PlatformNotSupportedException();
- }
+ public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; }
public override bool Equals(object o) => base.Equals(o);
public override int GetHashCode() => base.GetHashCode();
diff --git a/src/mscorlib/shared/System/Reflection/ParameterInfo.cs b/src/mscorlib/shared/System/Reflection/ParameterInfo.cs
index fd130e5..94bfffa 100644
--- a/src/mscorlib/shared/System/Reflection/ParameterInfo.cs
+++ b/src/mscorlib/shared/System/Reflection/ParameterInfo.cs
@@ -54,7 +54,46 @@ namespace System.Reflection
public object GetRealObject(StreamingContext context)
{
- throw new PlatformNotSupportedException();
+ // Once all the serializable fields have come in we can set up the real
+ // instance based on just two of them (MemberImpl and PositionImpl).
+
+ if (MemberImpl == null)
+ throw new SerializationException(SR.Serialization_InsufficientState);
+
+ ParameterInfo[] args = null;
+
+ switch (MemberImpl.MemberType)
+ {
+ case MemberTypes.Constructor:
+ case MemberTypes.Method:
+ if (PositionImpl == -1)
+ {
+ if (MemberImpl.MemberType == MemberTypes.Method)
+ return ((MethodInfo)MemberImpl).ReturnParameter;
+ else
+ throw new SerializationException(SR.Serialization_BadParameterInfo);
+ }
+ else
+ {
+ args = ((MethodBase)MemberImpl).GetParametersNoCopy();
+
+ if (args != null && PositionImpl < args.Length)
+ return args[PositionImpl];
+ else
+ throw new SerializationException(SR.Serialization_BadParameterInfo);
+ }
+
+ case MemberTypes.Property:
+ args = ((PropertyInfo)MemberImpl).GetIndexParameters();
+
+ if (args != null && PositionImpl > -1 && PositionImpl < args.Length)
+ return args[PositionImpl];
+ else
+ throw new SerializationException(SR.Serialization_BadParameterInfo);
+
+ default:
+ throw new SerializationException(SR.Serialization_NoParameterInfo);
+ }
}
public override string ToString() => ParameterType.FormatTypeName() + " " + Name;
diff --git a/src/mscorlib/shared/System/StringComparer.cs b/src/mscorlib/shared/System/StringComparer.cs
index b327e77..6990378 100644
--- a/src/mscorlib/shared/System/StringComparer.cs
+++ b/src/mscorlib/shared/System/StringComparer.cs
@@ -6,15 +6,17 @@ using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Diagnostics.Contracts;
+using System.Runtime.Serialization;
namespace System
{
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public abstract class StringComparer : IComparer, IEqualityComparer, IComparer<string>, IEqualityComparer<string>
{
private static readonly CultureAwareComparer s_invariantCulture = new CultureAwareComparer(CultureInfo.InvariantCulture, false);
private static readonly CultureAwareComparer s_invariantCultureIgnoreCase = new CultureAwareComparer(CultureInfo.InvariantCulture, true);
- private static readonly OrdinalComparer s_ordinal = new OrdinalComparer();
+ private static readonly OrdinalCaseSensitiveComparer s_ordinal = new OrdinalCaseSensitiveComparer();
private static readonly OrdinalIgnoreCaseComparer s_ordinalIgnoreCase = new OrdinalIgnoreCaseComparer();
public static StringComparer InvariantCulture
@@ -170,30 +172,33 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class CultureAwareComparer : StringComparer
{
- private readonly CompareInfo _compareInfo;
- private readonly CompareOptions _options;
+ private readonly CompareInfo _compareInfo; // Do not rename (binary serialization)
+ private readonly bool _ignoreCase; // Do not rename (binary serialization)
internal CultureAwareComparer(CultureInfo culture, bool ignoreCase)
{
_compareInfo = culture.CompareInfo;
- _options = ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None;
+ _ignoreCase = ignoreCase;
}
+ private CompareOptions Options => _ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None;
+
public override int Compare(string x, string y)
{
if (object.ReferenceEquals(x, y)) return 0;
if (x == null) return -1;
if (y == null) return 1;
- return _compareInfo.Compare(x, y, _options);
+ return _compareInfo.Compare(x, y, Options);
}
public override bool Equals(string x, string y)
{
if (object.ReferenceEquals(x, y)) return true;
if (x == null || y == null) return false;
- return _compareInfo.Compare(x, y, _options) == 0;
+ return _compareInfo.Compare(x, y, Options) == 0;
}
public override int GetHashCode(string obj)
@@ -202,7 +207,7 @@ namespace System
{
throw new ArgumentNullException(nameof(obj));
}
- return _compareInfo.GetHashCodeOfString(obj, _options);
+ return _compareInfo.GetHashCodeOfString(obj, Options);
}
// Equals method for the comparer itself.
@@ -211,20 +216,108 @@ namespace System
CultureAwareComparer comparer = obj as CultureAwareComparer;
return
comparer != null &&
- _options == comparer._options &&
+ _ignoreCase == comparer._ignoreCase &&
_compareInfo.Equals(comparer._compareInfo);
}
public override int GetHashCode()
{
int hashCode = _compareInfo.GetHashCode();
- return _options == CompareOptions.None ? hashCode : ~hashCode;
+ return _ignoreCase ? ~hashCode : hashCode;
+ }
+ }
+
+ [Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ internal class OrdinalComparer : StringComparer
+ {
+ private readonly bool _ignoreCase; // Do not rename (binary serialization)
+
+ internal OrdinalComparer(bool ignoreCase)
+ {
+ _ignoreCase = ignoreCase;
+ }
+
+ public override int Compare(string x, string y)
+ {
+ if (ReferenceEquals(x, y))
+ return 0;
+ if (x == null)
+ return -1;
+ if (y == null)
+ return 1;
+
+ if (_ignoreCase)
+ {
+ return string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
+ }
+
+ return string.CompareOrdinal(x, y);
+ }
+
+ public override bool Equals(string x, string y)
+ {
+ if (ReferenceEquals(x, y))
+ return true;
+ if (x == null || y == null)
+ return false;
+
+ if (_ignoreCase)
+ {
+ if (x.Length != y.Length)
+ {
+ return false;
+ }
+ return (string.Compare(x, y, StringComparison.OrdinalIgnoreCase) == 0);
+ }
+ return x.Equals(y);
+ }
+
+ public override int GetHashCode(string obj)
+ {
+ if (obj == null)
+ {
+#if CORECLR
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj);
+#else
+ throw new ArgumentNullException(nameof(obj));
+#endif
+ }
+ Contract.EndContractBlock();
+
+ if (_ignoreCase)
+ {
+ return TextInfo.GetHashCodeOrdinalIgnoreCase(obj);
+ }
+
+ return obj.GetHashCode();
+ }
+
+ // Equals method for the comparer itself.
+ public override bool Equals(object obj)
+ {
+ OrdinalComparer comparer = obj as OrdinalComparer;
+ if (comparer == null)
+ {
+ return false;
+ }
+ return (this._ignoreCase == comparer._ignoreCase);
+ }
+
+ public override int GetHashCode()
+ {
+ int hashCode = nameof(OrdinalComparer).GetHashCode();
+ return _ignoreCase ? (~hashCode) : hashCode;
}
}
[Serializable]
- internal sealed class OrdinalComparer : StringComparer
+ internal sealed class OrdinalCaseSensitiveComparer : OrdinalComparer, ISerializable
{
+ public OrdinalCaseSensitiveComparer() : base(false)
+ {
+ }
+
public override int Compare(string x, string y) => string.CompareOrdinal(x, y);
public override bool Equals(string x, string y) => string.Equals(x, y);
@@ -242,14 +335,20 @@ namespace System
return obj.GetHashCode();
}
- // Equals/GetHashCode methods for the comparer itself.
- public override bool Equals(object obj) => obj is OrdinalComparer;
- public override int GetHashCode() => nameof(OrdinalComparer).GetHashCode();
+ public void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.SetType(typeof(OrdinalComparer));
+ info.AddValue("_ignoreCase", false);
+ }
}
- [Serializable]
- internal sealed class OrdinalIgnoreCaseComparer : StringComparer
+ [Serializable]
+ internal sealed class OrdinalIgnoreCaseComparer : OrdinalComparer, ISerializable
{
+ public OrdinalIgnoreCaseComparer() : base(true)
+ {
+ }
+
public override int Compare(string x, string y) => string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
public override bool Equals(string x, string y) => string.Equals(x, y, StringComparison.OrdinalIgnoreCase);
@@ -267,8 +366,10 @@ namespace System
return TextInfo.GetHashCodeOrdinalIgnoreCase(obj);
}
- // Equals/GetHashCode methods for the comparer itself.
- public override bool Equals(object obj) => obj is OrdinalIgnoreCaseComparer;
- public override int GetHashCode() => nameof(OrdinalIgnoreCaseComparer).GetHashCode();
+ public void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.SetType(typeof(OrdinalComparer));
+ info.AddValue("_ignoreCase", true);
+ }
}
}
diff --git a/src/mscorlib/shared/System/Text/StringBuilder.cs b/src/mscorlib/shared/System/Text/StringBuilder.cs
index 3a06114..1167016 100644
--- a/src/mscorlib/shared/System/Text/StringBuilder.cs
+++ b/src/mscorlib/shared/System/Text/StringBuilder.cs
@@ -35,6 +35,7 @@ namespace System.Text
// Console.WriteLine(sb2);
//
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed partial class StringBuilder : ISerializable
{
// A StringBuilder is internally represented as a linked list of blocks each of which holds
@@ -58,10 +59,11 @@ namespace System.Text
//
//
internal const int DefaultCapacity = 16;
- private const String CapacityField = "Capacity";
- private const String MaxCapacityField = "m_MaxCapacity";
- private const String StringValueField = "m_StringValue";
- private const String ThreadIDField = "m_currentThread";
+ private const String CapacityField = "Capacity"; // Do not rename (binary serialization)
+ private const String MaxCapacityField = "m_MaxCapacity"; // Do not rename (binary serialization)
+ private const String StringValueField = "m_StringValue"; // Do not rename (binary serialization)
+ private const String ThreadIDField = "m_currentThread"; // Do not rename (binary serialization)
+
// We want to keep chunk arrays out of large object heap (< 85K bytes ~ 40K chars) to be sure.
// Making the maximum chunk size big means less allocation code called, but also more waste
// in unused characters and slower inserts / replaces (since you do need to slide characters over
diff --git a/src/mscorlib/shared/System/ValueTuple.cs b/src/mscorlib/shared/System/ValueTuple.cs
index e0cd02e..3464f27 100644
--- a/src/mscorlib/shared/System/ValueTuple.cs
+++ b/src/mscorlib/shared/System/ValueTuple.cs
@@ -29,6 +29,7 @@ namespace System
/// - their members (such as Item1, Item2, etc) are fields rather than properties.
/// </summary>
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple
: IEquatable<ValueTuple>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple>, IValueTupleInternal, ITuple
{
@@ -298,6 +299,7 @@ namespace System
/// <summary>Represents a 1-tuple, or singleton, as a value type.</summary>
/// <typeparam name="T1">The type of the tuple's only component.</typeparam>
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1>
: IEquatable<ValueTuple<T1>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1>>, IValueTupleInternal, ITuple
{
@@ -464,6 +466,7 @@ namespace System
/// <typeparam name="T2">The type of the tuple's second component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2>
: IEquatable<ValueTuple<T1, T2>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2>>, IValueTupleInternal, ITuple
{
@@ -674,6 +677,7 @@ namespace System
/// <typeparam name="T3">The type of the tuple's third component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2, T3>
: IEquatable<ValueTuple<T1, T2, T3>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3>>, IValueTupleInternal, ITuple
{
@@ -882,6 +886,7 @@ namespace System
/// <typeparam name="T4">The type of the tuple's fourth component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2, T3, T4>
: IEquatable<ValueTuple<T1, T2, T3, T4>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4>>, IValueTupleInternal, ITuple
{
@@ -1109,6 +1114,7 @@ namespace System
/// <typeparam name="T5">The type of the tuple's fifth component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2, T3, T4, T5>
: IEquatable<ValueTuple<T1, T2, T3, T4, T5>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5>>, IValueTupleInternal, ITuple
{
@@ -1355,6 +1361,7 @@ namespace System
/// <typeparam name="T6">The type of the tuple's sixth component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2, T3, T4, T5, T6>
: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6>>, IValueTupleInternal, ITuple
{
@@ -1620,6 +1627,7 @@ namespace System
/// <typeparam name="T7">The type of the tuple's seventh component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7>
: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7>>, IValueTupleInternal, ITuple
{
@@ -1904,6 +1912,7 @@ namespace System
/// <typeparam name="TRest">The type of the tuple's eighth component.</typeparam>
[Serializable]
[StructLayout(LayoutKind.Auto)]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>
: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IValueTupleInternal, ITuple
where TRest : struct
diff --git a/src/mscorlib/shared/System/Version.cs b/src/mscorlib/shared/System/Version.cs
index 54b2052..a2140ab 100644
--- a/src/mscorlib/shared/System/Version.cs
+++ b/src/mscorlib/shared/System/Version.cs
@@ -16,14 +16,15 @@ namespace System
// specified component.
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class Version : ICloneable, IComparable
, IComparable<Version>, IEquatable<Version>
{
// AssemblyName depends on the order staying the same
- private readonly int _Major;
- private readonly int _Minor;
- private readonly int _Build = -1;
- private readonly int _Revision = -1;
+ private readonly int _Major; // Do not rename (binary serialization)
+ private readonly int _Minor; // Do not rename (binary serialization)
+ private readonly int _Build = -1; // Do not rename (binary serialization)
+ private readonly int _Revision = -1; // Do not rename (binary serialization)
public Version(int major, int minor, int build, int revision)
{