Move files to shared partition (#13244)
authorJan Kotas <jkotas@microsoft.com>
Mon, 7 Aug 2017 12:56:05 +0000 (05:56 -0700)
committerGitHub <noreply@github.com>
Mon, 7 Aug 2017 12:56:05 +0000 (05:56 -0700)
13 files changed:
src/mscorlib/System.Private.CoreLib.csproj
src/mscorlib/shared/System.Private.CoreLib.Shared.projitems
src/mscorlib/shared/System/Boolean.cs [moved from src/mscorlib/src/System/Boolean.cs with 95% similarity]
src/mscorlib/shared/System/Byte.cs [moved from src/mscorlib/src/System/Byte.cs with 93% similarity]
src/mscorlib/shared/System/Double.cs
src/mscorlib/shared/System/Int16.cs [moved from src/mscorlib/src/System/Int16.cs with 95% similarity]
src/mscorlib/shared/System/Int32.cs [moved from src/mscorlib/src/System/Int32.cs with 88% similarity]
src/mscorlib/shared/System/Int64.cs [moved from src/mscorlib/src/System/Int64.cs with 95% similarity]
src/mscorlib/shared/System/SByte.cs [moved from src/mscorlib/src/System/SByte.cs with 93% similarity]
src/mscorlib/shared/System/Single.cs
src/mscorlib/shared/System/UInt16.cs [moved from src/mscorlib/src/System/UInt16.cs with 94% similarity]
src/mscorlib/shared/System/UInt32.cs [moved from src/mscorlib/src/System/UInt32.cs with 94% similarity]
src/mscorlib/shared/System/UInt64.cs [moved from src/mscorlib/src/System/UInt64.cs with 94% similarity]

index 5e1e3c0..f0fc90f 100644 (file)
     <Compile Include="$(BclSourcesRoot)\System\ArgIterator.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Attribute.cs" />
     <Compile Include="$(BclSourcesRoot)\System\BadImageFormatException.CoreCLR.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Boolean.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Buffer.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Byte.cs" />
     <Compile Include="$(BclSourcesRoot)\System\CompatibilitySwitches.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Currency.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Decimal.cs" />
     <Compile Include="$(BclSourcesRoot)\System\GC.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Guid.cs" />
     <Compile Include="$(BclSourcesRoot)\System\InsufficientMemoryException.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Int16.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Int32.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Int64.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IntPtr.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Internal.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Math.cs" />
     <Compile Include="$(BclSourcesRoot)\System\RtType.cs" />
     <Compile Include="$(BclSourcesRoot)\System\RuntimeArgumentHandle.cs" />
     <Compile Include="$(BclSourcesRoot)\System\RuntimeHandles.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\SByte.cs" />
     <Compile Include="$(BclSourcesRoot)\System\SerializableAttribute.cs" />
     <Compile Include="$(BclSourcesRoot)\System\SharedStatics.cs" />
     <Compile Include="$(BclSourcesRoot)\System\StubHelpers.cs" />
     <Compile Include="$(BclSourcesRoot)\System\TypeNameParser.cs" />
     <Compile Include="$(BclSourcesRoot)\System\TypedReference.cs" />
     <Compile Include="$(BclSourcesRoot)\System\TypeLoadException.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\UInt16.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\UInt32.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\UInt64.cs" />
     <Compile Include="$(BclSourcesRoot)\System\UIntPtr.cs" />
     <Compile Include="$(BclSourcesRoot)\System\ValueType.cs" />
     <Compile Include="$(BclSourcesRoot)\System\WeakReference.cs" />
index 09e8bec..9c108ee 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)System\AttributeUsageAttribute.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\BadImageFormatException.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\BitConverter.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\Boolean.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Buffers\ArrayPool.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Buffers\ArrayPoolEventSource.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Buffers\ConfigurableArrayPool.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Buffers\TlsOverPerCoreLockedStacksArrayPool.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Buffers\Utilities.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\Byte.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Char.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\CharEnumerator.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\CLSCompliantAttribute.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\IObservable.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\IObserver.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\IProgress.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\Int16.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\Int32.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\Int64.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Lazy.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\MarshalByRefObject.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\MemberAccessException.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Serialization\StreamingContext.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Versioning\NonVersionableAttribute.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Versioning\TargetFrameworkAttribute.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\SByte.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\AllowPartiallyTrustedCallersAttribute.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\CryptographicException.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Security\PartialTrustVisibilityLevel.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\TypeCode.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\TypeInitializationException.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\TypeUnloadedException.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\UInt16.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\UInt32.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\UInt64.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\UnauthorizedAccessException.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\UnhandledExceptionEventArgs.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\UnhandledExceptionEventHandler.cs" />
similarity index 95%
rename from src/mscorlib/src/System/Boolean.cs
rename to src/mscorlib/shared/System/Boolean.cs
index a1f5064..b41c6ba 100644 (file)
 ** 
 ===========================================================*/
 
-using System;
-using System.Globalization;
 using System.Diagnostics.Contracts;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
 
 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")]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
     public struct Boolean : IComparable, IConvertible, IComparable<Boolean>, IEquatable<Boolean>
     {
         //
@@ -34,7 +33,7 @@ namespace System
         internal const int True = 1;
 
         // The false value.
-        // 
+        //
         internal const int False = 0;
 
 
@@ -95,11 +94,7 @@ namespace System
 
         public String ToString(IFormatProvider provider)
         {
-            if (false == m_value)
-            {
-                return FalseLiteral;
-            }
-            return TrueLiteral;
+            return ToString();
         }
 
         // Determines whether two Boolean objects are equal.
@@ -114,7 +109,7 @@ namespace System
             return (m_value == ((Boolean)obj).m_value);
         }
 
-        [System.Runtime.Versioning.NonVersionable]
+        [NonVersionable]
         public bool Equals(Boolean obj)
         {
             return m_value == obj;
similarity index 93%
rename from src/mscorlib/src/System/Byte.cs
rename to src/mscorlib/shared/System/Byte.cs
index fafdcbb..14bbf7b 100644 (file)
 ** 
 ===========================================================*/
 
-
-using System;
+using System.Diagnostics.Contracts;
 using System.Globalization;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 namespace System
 {
-    // The Byte class extends the Value class and 
-    // provides object representation of the byte primitive type. 
-    // 
     [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>
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct Byte : IComparable, IConvertible, IFormattable, IComparable<Byte>, IEquatable<Byte>
     {
         private byte m_value; // Do not rename (binary serialization)
 
@@ -73,7 +69,7 @@ namespace System
             return m_value == ((Byte)obj).m_value;
         }
 
-        [System.Runtime.Versioning.NonVersionable]
+        [NonVersionable]
         public bool Equals(Byte obj)
         {
             return m_value == obj;
index f12886f..3babf22 100644 (file)
 **
 ===========================================================*/
 
-using System;
 using System.Diagnostics.Contracts;
 using System.Globalization;
 using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
 using System.Runtime.InteropServices;
 using System.Runtime.Versioning;
 
@@ -25,7 +23,7 @@ namespace System
     [Serializable]
     [StructLayout(LayoutKind.Sequential)]
     [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
-    public struct Double :IComparable, IConvertible, IFormattable, IComparable<Double>, IEquatable<Double>
+    public struct Double : IComparable, IConvertible, IFormattable, IComparable<Double>, IEquatable<Double>
     {
         private double m_value; // Do not rename (binary serialization)
 
similarity index 95%
rename from src/mscorlib/src/System/Int16.cs
rename to src/mscorlib/shared/System/Int16.cs
index 82e5dd5..b5899f7 100644 (file)
 ** 
 ===========================================================*/
 
-
-using System;
+using System.Diagnostics.Contracts;
 using System.Globalization;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct Int16 : IComparable, IConvertible, IFormattable, IComparable<Int16>, IEquatable<Int16>
     {
         private short m_value; // Do not rename (binary serialization)
 
@@ -66,7 +65,7 @@ namespace System
             return m_value == ((Int16)obj).m_value;
         }
 
-        [System.Runtime.Versioning.NonVersionable]
+        [NonVersionable]
         public bool Equals(Int16 obj)
         {
             return m_value == obj;
similarity index 88%
rename from src/mscorlib/src/System/Int32.cs
rename to src/mscorlib/shared/System/Int32.cs
index 5035521..543e891 100644 (file)
 ** 
 ===========================================================*/
 
-using System;
+using System.Diagnostics.Contracts;
 using System.Globalization;
-using System.Runtime;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct Int32 : IComparable, IConvertible, IFormattable, IComparable<Int32>, IEquatable<Int32>
     {
         private int m_value; // Do not rename (binary serialization)
 
@@ -33,8 +32,11 @@ namespace System
 
         // Compares this object to another object, returning an integer that
         // indicates the relationship. 
-        // Returns a value less than zero if this  object
-        // null is considered to be less than any instance.
+        // Returns :
+        // 0 if the values are equal
+        // Negative number if _value is less than value
+        // Positive number if _value is more than value
+        // null is considered to be less than any instance, hence returns positive number
         // If object is not of type Int32, this method throws an ArgumentException.
         // 
         public int CompareTo(Object value)
@@ -45,8 +47,8 @@ namespace System
             }
             if (value is Int32)
             {
-                // Need to use compare because subtraction will wrap
-                // to positive for very large neg numbers, etc.
+                // NOTE: Cannot use return (_value - value) as this causes a wrap
+                // around in cases where _value - value > MaxValue.
                 int i = (int)value;
                 if (m_value < i) return -1;
                 if (m_value > i) return 1;
@@ -57,8 +59,8 @@ namespace System
 
         public int CompareTo(int value)
         {
-            // Need to use compare because subtraction will wrap
-            // to positive for very large neg numbers, etc.
+            // NOTE: Cannot use return (_value - value) as this causes a wrap
+            // around in cases where _value - value > MaxValue.
             if (m_value < value) return -1;
             if (m_value > value) return 1;
             return 0;
@@ -73,7 +75,7 @@ namespace System
             return m_value == ((Int32)obj).m_value;
         }
 
-        [System.Runtime.Versioning.NonVersionable]
+        [NonVersionable]
         public bool Equals(Int32 obj)
         {
             return m_value == obj;
similarity index 95%
rename from src/mscorlib/src/System/Int64.cs
rename to src/mscorlib/shared/System/Int64.cs
index 0153872..caa4655 100644 (file)
 ** 
 ===========================================================*/
 
-using System;
+using System.Diagnostics.Contracts;
 using System.Globalization;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct Int64 : IComparable, IConvertible, IFormattable, IComparable<Int64>, IEquatable<Int64>
     {
         private long m_value; // Do not rename (binary serialization)
 
similarity index 93%
rename from src/mscorlib/src/System/SByte.cs
rename to src/mscorlib/shared/System/SByte.cs
index 8a0ab3e..89c91e1 100644 (file)
@@ -2,28 +2,18 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-/*============================================================
-**
-**
-**
-** Purpose: 
-**
-**
-===========================================================*/
-
+using System.Diagnostics.Contracts;
 using System.Globalization;
-using System;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [CLSCompliant(false)]    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct SByte : IComparable, IConvertible, IFormattable, IComparable<SByte>, IEquatable<SByte>
     {
         private sbyte m_value; // Do not rename (binary serialization)
 
@@ -68,7 +58,7 @@ namespace System
             return m_value == ((SByte)obj).m_value;
         }
 
-        [System.Runtime.Versioning.NonVersionable]
+        [NonVersionable]
         public bool Equals(SByte obj)
         {
             return m_value == obj;
index 676c654..e9a69aa 100644 (file)
 **
 ===========================================================*/
 
-using System;
 using System.Diagnostics.Contracts;
 using System.Globalization;
 using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
 using System.Runtime.InteropServices;
 using System.Runtime.Versioning;
 
similarity index 94%
rename from src/mscorlib/src/System/UInt16.cs
rename to src/mscorlib/shared/System/UInt16.cs
index 746ed7b..6b02386 100644 (file)
 ** 
 ===========================================================*/
 
+using System.Diagnostics.Contracts;
 using System.Globalization;
-using System;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [CLSCompliant(false)]
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct UInt16 : IComparable, IConvertible, IFormattable, IComparable<UInt16>, IEquatable<UInt16>
     {
         private ushort m_value; // Do not rename (binary serialization)
 
similarity index 94%
rename from src/mscorlib/src/System/UInt32.cs
rename to src/mscorlib/shared/System/UInt32.cs
index f696816..8fc361b 100644 (file)
 ** 
 ===========================================================*/
 
+using System.Diagnostics.Contracts;
 using System.Globalization;
-using System;
-using System.Runtime;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [CLSCompliant(false)]
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct UInt32 : IComparable, IConvertible, IFormattable, IComparable<UInt32>, IEquatable<UInt32>
     {
         private uint m_value; // Do not rename (binary serialization)
 
similarity index 94%
rename from src/mscorlib/src/System/UInt64.cs
rename to src/mscorlib/shared/System/UInt64.cs
index 03cdcc5..d83f94d 100644 (file)
 ** 
 ===========================================================*/
 
+using System.Diagnostics.Contracts;
 using System.Globalization;
-using System;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
 
 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>
+    [CLSCompliant(false)]
+    [StructLayout(LayoutKind.Sequential)]
+    [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+    public struct UInt64 : IComparable, IConvertible, IFormattable, IComparable<UInt64>, IEquatable<UInt64>
     {
         private ulong m_value; // Do not rename (binary serialization)