Merge pull request #1072 from esdrubal/bug19862
[mono.git] / mcs / class / corlib / System.Threading / ThreadAbortException.cs
old mode 100755 (executable)
new mode 100644 (file)
index 7c4318c..19e5cba
 //
 
 using System.Runtime.CompilerServices;
+using System.Runtime.Serialization;
+using System.Runtime.InteropServices;
 
 namespace System.Threading
 {
        [Serializable]
+       [ComVisible (true)]
        public sealed class ThreadAbortException : SystemException
        {
                private ThreadAbortException () : base ("Thread was being aborted")
@@ -42,10 +45,16 @@ namespace System.Threading
                        HResult = unchecked ((int) 0x80131530);
                }
 
+               private ThreadAbortException (SerializationInfo info, StreamingContext sc) : base (info, sc)
+               {
+               }
+
+#if !NET_2_1
                public object ExceptionState {
                        get {
-                               return Thread.CurrentThread.abort_state;
+                               return Thread.CurrentThread.GetAbortExceptionState ();
                        }
                }
+#endif
        }
 }