summaryrefslogtreecommitdiff
path: root/src/mscorlib
diff options
context:
space:
mode:
authorViktor Hofer <viktor.hofer@microsoft.com>2017-06-06 01:17:54 +0200
committerGitHub <noreply@github.com>2017-06-06 01:17:54 +0200
commit5b9680fcc9b6fe9429f4a649bf5215de273fcbec (patch)
treee2dd1650377b3d96a6f91afbe0824e7d19004e47 /src/mscorlib
parentbe6dc5d8895658cc03204231dc39aff516033683 (diff)
downloadcoreclr-5b9680fcc9b6fe9429f4a649bf5215de273fcbec.tar.gz
coreclr-5b9680fcc9b6fe9429f4a649bf5215de273fcbec.tar.bz2
coreclr-5b9680fcc9b6fe9429f4a649bf5215de273fcbec.zip
TypeForwardedFrom attributes on coretypes for NetFX serialization (#12059)
* TypeForwardedFrom attributes on coretypes for NetFX serialization * ValueTuple added * Removed StubEnvironment typeforwards * Modified FQAN for some special type forwards * Support desktop to core serialization with InternalsVisibleTo for mscorlib * Remove typeforwards from nested types * Removed unused file
Diffstat (limited to 'src/mscorlib')
-rw-r--r--src/mscorlib/System.Private.CoreLib.csproj1
-rw-r--r--src/mscorlib/shared/System/Char.cs1
-rw-r--r--src/mscorlib/shared/System/Collections/DictionaryEntry.cs1
-rw-r--r--src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs1
-rw-r--r--src/mscorlib/shared/System/DateTime.cs1
-rw-r--r--src/mscorlib/shared/System/DateTimeOffset.cs1
-rw-r--r--src/mscorlib/shared/System/Globalization/SortVersion.cs1
-rw-r--r--src/mscorlib/shared/System/StringComparer.cs4
-rw-r--r--src/mscorlib/shared/System/Text/StringBuilder.cs1
-rw-r--r--src/mscorlib/shared/System/ValueTuple.cs9
-rw-r--r--src/mscorlib/shared/System/Version.cs1
-rw-r--r--src/mscorlib/src/System/AggregateException.cs1
-rw-r--r--src/mscorlib/src/System/Array.cs1
-rw-r--r--src/mscorlib/src/System/ArraySegment.cs1
-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/Generic/Comparer.cs8
-rw-r--r--src/mscorlib/src/System/Collections/Generic/Dictionary.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Generic/EqualityComparer.cs10
-rw-r--r--src/mscorlib/src/System/Collections/Generic/List.cs1
-rw-r--r--src/mscorlib/src/System/Collections/ListDictionaryInternal.cs1
-rw-r--r--src/mscorlib/src/System/Collections/ObjectModel/Collection.cs1
-rw-r--r--src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs1
-rw-r--r--src/mscorlib/src/System/Decimal.cs1
-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.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/CompareInfo.cs1
-rw-r--r--src/mscorlib/src/System/Guid.cs1
-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.cs1
-rw-r--r--src/mscorlib/src/System/Nullable.cs1
-rw-r--r--src/mscorlib/src/System/Object.cs1
-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/TimeZoneInfo.cs1
-rw-r--r--src/mscorlib/src/System/Tuple.cs8
-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.cs1
-rw-r--r--src/mscorlib/src/System/ValueType.cs1
-rw-r--r--src/mscorlib/src/System/WeakReference.cs1
-rw-r--r--src/mscorlib/src/System/WeakReferenceOfT.cs1
-rw-r--r--src/mscorlib/src/mscorlib.Friends.cs2
50 files changed, 83 insertions, 86 deletions
diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj
index 4d3be41d0a..5ae9c69360 100644
--- a/src/mscorlib/System.Private.CoreLib.csproj
+++ b/src/mscorlib/System.Private.CoreLib.csproj
@@ -617,7 +617,6 @@
<Compile Include="$(BclSourcesRoot)\System\Resources\__HResults.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\FileBasedResourceGroveler.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\IResourceGroveler.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Resources\LooselyLinkedResourceReference.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\ManifestBasedResourceGroveler.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\ResourceManager.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\ResourceReader.cs" />
diff --git a/src/mscorlib/shared/System/Char.cs b/src/mscorlib/shared/System/Char.cs
index 3fad7a4827..72441763e9 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 290306d006..0815c93319 100644
--- a/src/mscorlib/shared/System/Collections/DictionaryEntry.cs
+++ b/src/mscorlib/shared/System/Collections/DictionaryEntry.cs
@@ -9,6 +9,7 @@ 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;
diff --git a/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs b/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs
index fc51af25f8..6280218063 100644
--- a/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs
+++ b/src/mscorlib/shared/System/Collections/Generic/KeyValuePair.cs
@@ -46,6 +46,7 @@ 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.
diff --git a/src/mscorlib/shared/System/DateTime.cs b/src/mscorlib/shared/System/DateTime.cs
index ddb72da77d..02f07d2865 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
diff --git a/src/mscorlib/shared/System/DateTimeOffset.cs b/src/mscorlib/shared/System/DateTimeOffset.cs
index d5ccbd9195..6df35fed1e 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
diff --git a/src/mscorlib/shared/System/Globalization/SortVersion.cs b/src/mscorlib/shared/System/Globalization/SortVersion.cs
index 94c04d7063..46e9a833ec 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/StringComparer.cs b/src/mscorlib/shared/System/StringComparer.cs
index b327e770d5..765f43ea1a 100644
--- a/src/mscorlib/shared/System/StringComparer.cs
+++ b/src/mscorlib/shared/System/StringComparer.cs
@@ -10,6 +10,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 StringComparer : IComparer, IEqualityComparer, IComparer<string>, IEqualityComparer<string>
{
private static readonly CultureAwareComparer s_invariantCulture = new CultureAwareComparer(CultureInfo.InvariantCulture, false);
@@ -170,6 +171,7 @@ 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;
@@ -223,6 +225,7 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class OrdinalComparer : StringComparer
{
public override int Compare(string x, string y) => string.CompareOrdinal(x, y);
@@ -248,6 +251,7 @@ namespace System
}
[Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
internal sealed class OrdinalIgnoreCaseComparer : StringComparer
{
public override int Compare(string x, string y) => string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
diff --git a/src/mscorlib/shared/System/Text/StringBuilder.cs b/src/mscorlib/shared/System/Text/StringBuilder.cs
index 3a06114bff..29f0cdb18b 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
diff --git a/src/mscorlib/shared/System/ValueTuple.cs b/src/mscorlib/shared/System/ValueTuple.cs
index e0cd02e914..3464f2781c 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 54b2052ddb..b88db7e6b4 100644
--- a/src/mscorlib/shared/System/Version.cs
+++ b/src/mscorlib/shared/System/Version.cs
@@ -16,6 +16,7 @@ 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>
{
diff --git a/src/mscorlib/src/System/AggregateException.cs b/src/mscorlib/src/System/AggregateException.cs
index 22bc323215..4f87357c20 100644
--- a/src/mscorlib/src/System/AggregateException.cs
+++ b/src/mscorlib/src/System/AggregateException.cs
@@ -30,6 +30,7 @@ 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.
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..d515b468da 100644
--- a/src/mscorlib/src/System/ArraySegment.cs
+++ b/src/mscorlib/src/System/ArraySegment.cs
@@ -26,6 +26,7 @@ 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
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/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..34ee7a3ee4 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
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..f94acb8fdd 100644
--- a/src/mscorlib/src/System/Collections/Generic/List.cs
+++ b/src/mscorlib/src/System/Collections/Generic/List.cs
@@ -30,6 +30,7 @@ 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;
diff --git a/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs b/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs
index 3f92038d4f..87f180929f 100644
--- a/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs
+++ b/src/mscorlib/src/System/Collections/ListDictionaryInternal.cs
@@ -20,6 +20,7 @@ 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;
diff --git a/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs b/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs
index d9801dfaaf..b2668edf83 100644
--- a/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs
+++ b/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs
@@ -15,6 +15,7 @@ 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;
diff --git a/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
index b484879c27..e91ecdc4d3 100644
--- a/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
+++ b/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
@@ -15,6 +15,7 @@ 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;
diff --git a/src/mscorlib/src/System/Decimal.cs b/src/mscorlib/src/System/Decimal.cs
index ce59a99334..68cd503d28 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
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..63bcbeb36d 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()
diff --git a/src/mscorlib/src/System/Globalization/CompareInfo.cs b/src/mscorlib/src/System/Globalization/CompareInfo.cs
index 593e86415d..cf241a66c8 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.
diff --git a/src/mscorlib/src/System/Guid.cs b/src/mscorlib/src/System/Guid.cs
index f64211d5d0..da3473b3d2 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>
{
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..4ecf448d52 100644
--- a/src/mscorlib/src/System/IntPtr.cs
+++ b/src/mscorlib/src/System/IntPtr.cs
@@ -23,6 +23,7 @@ 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
diff --git a/src/mscorlib/src/System/Nullable.cs b/src/mscorlib/src/System/Nullable.cs
index 31a62ecea8..b9b7c59b31 100644
--- a/src/mscorlib/src/System/Nullable.cs
+++ b/src/mscorlib/src/System/Nullable.cs
@@ -23,6 +23,7 @@ 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;
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/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/TimeZoneInfo.cs b/src/mscorlib/src/System/TimeZoneInfo.cs
index 8ed7e229c0..cadc9b2704 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
diff --git a/src/mscorlib/src/System/Tuple.cs b/src/mscorlib/src/System/Tuple.cs
index a118df02bd..87663d186a 100644
--- a/src/mscorlib/src/System/Tuple.cs
+++ b/src/mscorlib/src/System/Tuple.cs
@@ -105,6 +105,7 @@ 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;
@@ -204,6 +205,7 @@ 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;
@@ -318,6 +320,7 @@ 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;
@@ -443,6 +446,7 @@ 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;
@@ -579,6 +583,7 @@ 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;
@@ -726,6 +731,7 @@ 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;
@@ -884,6 +890,7 @@ 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;
@@ -1053,6 +1060,7 @@ 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;
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..0ae3b395bd 100644
--- a/src/mscorlib/src/System/UIntPtr.cs
+++ b/src/mscorlib/src/System/UIntPtr.cs
@@ -21,6 +21,7 @@ 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;
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..d0377e1fc3 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.
diff --git a/src/mscorlib/src/System/WeakReferenceOfT.cs b/src/mscorlib/src/System/WeakReferenceOfT.cs
index fbb6f09098..e5b70805c9 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
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)]