Move public ThreadAbortException back to CoreLib (dotnet/coreclr#10801)
authorJan Kotas <jkotas@microsoft.com>
Fri, 7 Apr 2017 18:31:03 +0000 (11:31 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2017 18:31:03 +0000 (11:31 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/329d900d6bc443a8317559050935ba37698cf132

src/coreclr/src/mscorlib/System.Private.CoreLib.csproj
src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems
src/coreclr/src/mscorlib/shared/System/Threading/ThreadAbortException.cs [moved from src/coreclr/src/mscorlib/src/System/Threading/ThreadAbortException.cs with 76% similarity]

index d06643f..019bfd7 100644 (file)
     <Compile Include="$(BclSourcesRoot)\System\Threading\SemaphoreFullException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\SynchronizationLockException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\Thread.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Threading\ThreadAbortException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\ThreadInterruptedException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\ThreadPool.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Threading\ThreadPriority.cs" />
index 914bc9c..db38ffd 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskCanceledException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskExtensions.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskSchedulerException.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadAbortException.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Timeout.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\ThreadStaticAttribute.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)System\TimeoutException.cs"/>
@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-//
 /*=============================================================================
 **
 **
 **
 =============================================================================*/
 
-using System;
 using System.Runtime.Serialization;
-using System.Runtime.CompilerServices;
 
 namespace System.Threading
 {
     [Serializable]
-    internal sealed class ThreadAbortException : SystemException
+    public sealed class ThreadAbortException : SystemException
     {
         private ThreadAbortException()
-            : base(GetMessageFromNativeResources(ExceptionMessageKind.ThreadAbort))
         {
-            SetErrorCode(__HResults.COR_E_THREADABORTED);
+            HResult = __HResults.COR_E_THREADABORTED;
         }
 
-        //required for serialization
         internal ThreadAbortException(SerializationInfo info, StreamingContext context)
             : base(info, context)
         {
         }
+
+        public object ExceptionState => null;
     }
 }