diff options
author | EgorBo <egorbo@gmail.com> | 2018-05-31 17:45:04 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-05-31 17:49:55 +0300 |
commit | b8fbb2385d53b343046f1c906bcb313efac01e85 (patch) | |
tree | 3b99768154364e6313535ae3b8df8c9edc678695 | |
parent | 4fb2529de75e6c84d786ef27160698237daa04b7 (diff) |
Hide TypeForwardedFrom from mono
-rw-r--r-- | src/Common/src/CoreLib/System/Byte.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Convert.Base64.cs | 1 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Convert.cs | 1 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Double.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Guid.cs | 9 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Int16.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Int32.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Int64.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Number.Formatting.cs | 1 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Number.Parsing.cs | 1 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/ParseNumbers.cs | 1 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/SByte.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/Single.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/UInt16.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/UInt32.cs | 2 | ||||
-rw-r--r-- | src/Common/src/CoreLib/System/UInt64.cs | 2 |
16 files changed, 34 insertions, 0 deletions
diff --git a/src/Common/src/CoreLib/System/Byte.cs b/src/Common/src/CoreLib/System/Byte.cs index 31185f0ed0..4a2592eb17 100644 --- a/src/Common/src/CoreLib/System/Byte.cs +++ b/src/Common/src/CoreLib/System/Byte.cs @@ -11,7 +11,9 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct Byte : IComparable, IConvertible, IFormattable, IComparable<Byte>, IEquatable<Byte>, ISpanFormattable { private byte m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/Convert.Base64.cs b/src/Common/src/CoreLib/System/Convert.Base64.cs index 7e2aee31b2..ba9f52feaa 100644 --- a/src/Common/src/CoreLib/System/Convert.Base64.cs +++ b/src/Common/src/CoreLib/System/Convert.Base64.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.Private; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Convert.cs b/src/Common/src/CoreLib/System/Convert.cs index 63342ad000..6f1b764a50 100644 --- a/src/Common/src/CoreLib/System/Convert.cs +++ b/src/Common/src/CoreLib/System/Convert.cs @@ -11,6 +11,7 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Diagnostics; +using System.Diagnostics.Private; namespace System { diff --git a/src/Common/src/CoreLib/System/Double.cs b/src/Common/src/CoreLib/System/Double.cs index e466935953..0f11a4a252 100644 --- a/src/Common/src/CoreLib/System/Double.cs +++ b/src/Common/src/CoreLib/System/Double.cs @@ -23,7 +23,9 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct Double : IComparable, IConvertible, IFormattable, IComparable<Double>, IEquatable<Double>, ISpanFormattable { private double m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/Guid.cs b/src/Common/src/CoreLib/System/Guid.cs index 37a8dce94c..ddbb2a0532 100644 --- a/src/Common/src/CoreLib/System/Guid.cs +++ b/src/Common/src/CoreLib/System/Guid.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.Private; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -14,7 +15,9 @@ namespace System [StructLayout(LayoutKind.Sequential)] [Serializable] [Runtime.Versioning.NonVersionable] // This only applies to field layout +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public partial struct Guid : IFormattable, IComparable, IComparable<Guid>, IEquatable<Guid>, ISpanFormattable { public static readonly Guid Empty = new Guid(); @@ -1300,7 +1303,13 @@ namespace System string guidString = string.FastAllocateString(guidSize); int bytesWritten; +#if MONO + // Span.Portable doesn't have Span(ref T[], int) construct + // Remove it once Mono switches to Span.Fast + bool result = TryFormat(new Span<char>(guidString.ToCharArray()), out bytesWritten, format); +#else bool result = TryFormat(new Span<char>(ref guidString.GetRawStringData(), guidString.Length), out bytesWritten, format); +#endif Debug.Assert(result && bytesWritten == guidString.Length, "Formatting guid should have succeeded."); return guidString; diff --git a/src/Common/src/CoreLib/System/Int16.cs b/src/Common/src/CoreLib/System/Int16.cs index fecc87e9fe..42e7ee017c 100644 --- a/src/Common/src/CoreLib/System/Int16.cs +++ b/src/Common/src/CoreLib/System/Int16.cs @@ -11,7 +11,9 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct Int16 : IComparable, IConvertible, IFormattable, IComparable<Int16>, IEquatable<Int16>, ISpanFormattable { private short m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/Int32.cs b/src/Common/src/CoreLib/System/Int32.cs index b573e950e4..be86a22fb3 100644 --- a/src/Common/src/CoreLib/System/Int32.cs +++ b/src/Common/src/CoreLib/System/Int32.cs @@ -11,7 +11,9 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct Int32 : IComparable, IConvertible, IFormattable, IComparable<Int32>, IEquatable<Int32>, ISpanFormattable { private int m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/Int64.cs b/src/Common/src/CoreLib/System/Int64.cs index 0bcca87309..f8331e2b5d 100644 --- a/src/Common/src/CoreLib/System/Int64.cs +++ b/src/Common/src/CoreLib/System/Int64.cs @@ -11,7 +11,9 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct Int64 : IComparable, IConvertible, IFormattable, IComparable<Int64>, IEquatable<Int64>, ISpanFormattable { private long m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/Number.Formatting.cs b/src/Common/src/CoreLib/System/Number.Formatting.cs index 74395ab2f5..2eb47c026f 100644 --- a/src/Common/src/CoreLib/System/Number.Formatting.cs +++ b/src/Common/src/CoreLib/System/Number.Formatting.cs @@ -4,6 +4,7 @@ using System.Buffers.Text; using System.Diagnostics; +using System.Diagnostics.Private; using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Number.Parsing.cs b/src/Common/src/CoreLib/System/Number.Parsing.cs index 936a826c93..9d53f9ccc6 100644 --- a/src/Common/src/CoreLib/System/Number.Parsing.cs +++ b/src/Common/src/CoreLib/System/Number.Parsing.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.Private; using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/ParseNumbers.cs b/src/Common/src/CoreLib/System/ParseNumbers.cs index dab4cb2190..e5dc7d6567 100644 --- a/src/Common/src/CoreLib/System/ParseNumbers.cs +++ b/src/Common/src/CoreLib/System/ParseNumbers.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.Private; using System.Runtime.CompilerServices; namespace System diff --git a/src/Common/src/CoreLib/System/SByte.cs b/src/Common/src/CoreLib/System/SByte.cs index c7cee2adc2..5fedd0f343 100644 --- a/src/Common/src/CoreLib/System/SByte.cs +++ b/src/Common/src/CoreLib/System/SByte.cs @@ -11,7 +11,9 @@ namespace System { [Serializable] [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct SByte : IComparable, IConvertible, IFormattable, IComparable<SByte>, IEquatable<SByte>, ISpanFormattable { private sbyte m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/Single.cs b/src/Common/src/CoreLib/System/Single.cs index a74d3770fa..7cb1bd449e 100644 --- a/src/Common/src/CoreLib/System/Single.cs +++ b/src/Common/src/CoreLib/System/Single.cs @@ -22,7 +22,9 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct Single : IComparable, IConvertible, IFormattable, IComparable<Single>, IEquatable<Single>, ISpanFormattable { private float m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/UInt16.cs b/src/Common/src/CoreLib/System/UInt16.cs index 3047d18198..155a2f87d3 100644 --- a/src/Common/src/CoreLib/System/UInt16.cs +++ b/src/Common/src/CoreLib/System/UInt16.cs @@ -12,7 +12,9 @@ namespace System [Serializable] [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct UInt16 : IComparable, IConvertible, IFormattable, IComparable<UInt16>, IEquatable<UInt16>, ISpanFormattable { private ushort m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/UInt32.cs b/src/Common/src/CoreLib/System/UInt32.cs index 1e33dcf17b..93aba0bdb5 100644 --- a/src/Common/src/CoreLib/System/UInt32.cs +++ b/src/Common/src/CoreLib/System/UInt32.cs @@ -12,7 +12,9 @@ namespace System [Serializable] [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct UInt32 : IComparable, IConvertible, IFormattable, IComparable<UInt32>, IEquatable<UInt32>, ISpanFormattable { private uint m_value; // Do not rename (binary serialization) diff --git a/src/Common/src/CoreLib/System/UInt64.cs b/src/Common/src/CoreLib/System/UInt64.cs index d30fbe1e42..3e2cec0203 100644 --- a/src/Common/src/CoreLib/System/UInt64.cs +++ b/src/Common/src/CoreLib/System/UInt64.cs @@ -12,7 +12,9 @@ namespace System [Serializable] [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] +#if !MONO [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] +#endif public struct UInt64 : IComparable, IConvertible, IFormattable, IComparable<UInt64>, IEquatable<UInt64>, ISpanFormattable { private ulong m_value; // Do not rename (binary serialization) |