diff options
Diffstat (limited to 'src/mscorlib/shared/System/Threading')
11 files changed, 12 insertions, 31 deletions
diff --git a/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs b/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs index 8056a3b330..15bc5a7341 100644 --- a/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs +++ b/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs @@ -14,7 +14,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public class AbandonedMutexException : SystemException { private int _mutexIndex = -1; @@ -62,6 +61,7 @@ namespace System.Threading protected AbandonedMutexException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } private void SetupException(int location, WaitHandle handle) diff --git a/src/mscorlib/shared/System/Threading/ExecutionContext.cs b/src/mscorlib/shared/System/Threading/ExecutionContext.cs index 67857e9b11..a573af3383 100644 --- a/src/mscorlib/shared/System/Threading/ExecutionContext.cs +++ b/src/mscorlib/shared/System/Threading/ExecutionContext.cs @@ -44,7 +44,6 @@ namespace System.Threading } } - [Serializable] public sealed class ExecutionContext : IDisposable, ISerializable { internal static readonly ExecutionContext Default = new ExecutionContext(); @@ -71,15 +70,7 @@ namespace System.Threading public void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info == null) - { - throw new ArgumentNullException(nameof(info)); - } - Contract.EndContractBlock(); - } - - private ExecutionContext(SerializationInfo info, StreamingContext context) - { + throw new PlatformNotSupportedException(); } public static ExecutionContext Capture() diff --git a/src/mscorlib/shared/System/Threading/LockRecursionException.cs b/src/mscorlib/shared/System/Threading/LockRecursionException.cs index 2f296cb14e..86e19032b3 100644 --- a/src/mscorlib/shared/System/Threading/LockRecursionException.cs +++ b/src/mscorlib/shared/System/Threading/LockRecursionException.cs @@ -7,7 +7,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public class LockRecursionException : System.Exception { public LockRecursionException() @@ -24,6 +23,9 @@ namespace System.Threading { } - protected LockRecursionException(SerializationInfo info, StreamingContext context) : base(info, context) { } + protected LockRecursionException(SerializationInfo info, StreamingContext context) : base(info, context) + { + throw new PlatformNotSupportedException(); + } } } diff --git a/src/mscorlib/shared/System/Threading/SemaphoreFullException.cs b/src/mscorlib/shared/System/Threading/SemaphoreFullException.cs index 19ac19d6e0..777463b60d 100644 --- a/src/mscorlib/shared/System/Threading/SemaphoreFullException.cs +++ b/src/mscorlib/shared/System/Threading/SemaphoreFullException.cs @@ -7,7 +7,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public class SemaphoreFullException : SystemException { public SemaphoreFullException() : base(SR.Threading_SemaphoreFullException) @@ -24,6 +23,7 @@ namespace System.Threading protected SemaphoreFullException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } } } diff --git a/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs b/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs index 120577fdcf..c64fc9ced8 100644 --- a/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs +++ b/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs @@ -16,7 +16,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public class SynchronizationLockException : SystemException { public SynchronizationLockException() @@ -39,6 +38,7 @@ namespace System.Threading protected SynchronizationLockException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } } } diff --git a/src/mscorlib/shared/System/Threading/Tasks/TaskCanceledException.cs b/src/mscorlib/shared/System/Threading/Tasks/TaskCanceledException.cs index d7690d4c7c..6657bcd36c 100644 --- a/src/mscorlib/shared/System/Threading/Tasks/TaskCanceledException.cs +++ b/src/mscorlib/shared/System/Threading/Tasks/TaskCanceledException.cs @@ -19,7 +19,6 @@ namespace System.Threading.Tasks /// <summary> /// Represents an exception used to communicate task cancellation. /// </summary> - [Serializable] public class TaskCanceledException : OperationCanceledException { [NonSerialized] @@ -71,6 +70,7 @@ namespace System.Threading.Tasks /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination. </param> protected TaskCanceledException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } /// <summary> diff --git a/src/mscorlib/shared/System/Threading/Tasks/TaskSchedulerException.cs b/src/mscorlib/shared/System/Threading/Tasks/TaskSchedulerException.cs index 148b6300ef..2888415d0d 100644 --- a/src/mscorlib/shared/System/Threading/Tasks/TaskSchedulerException.cs +++ b/src/mscorlib/shared/System/Threading/Tasks/TaskSchedulerException.cs @@ -20,7 +20,6 @@ namespace System.Threading.Tasks /// Represents an exception used to communicate an invalid operation by a /// <see cref="T:System.Threading.Tasks.TaskScheduler"/>. /// </summary> - [Serializable] public class TaskSchedulerException : Exception { /// <summary> @@ -72,6 +71,7 @@ namespace System.Threading.Tasks protected TaskSchedulerException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } } } diff --git a/src/mscorlib/shared/System/Threading/ThreadAbortException.cs b/src/mscorlib/shared/System/Threading/ThreadAbortException.cs index e693e7192f..5773f2726a 100644 --- a/src/mscorlib/shared/System/Threading/ThreadAbortException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadAbortException.cs @@ -18,7 +18,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public sealed class ThreadAbortException : SystemException { private ThreadAbortException() @@ -26,11 +25,6 @@ namespace System.Threading HResult = __HResults.COR_E_THREADABORTED; } - internal ThreadAbortException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - public object ExceptionState => null; } } diff --git a/src/mscorlib/shared/System/Threading/ThreadStartException.cs b/src/mscorlib/shared/System/Threading/ThreadStartException.cs index 2ff77bc5fd..7a87943ed1 100644 --- a/src/mscorlib/shared/System/Threading/ThreadStartException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadStartException.cs @@ -6,7 +6,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public sealed class ThreadStartException : SystemException { internal ThreadStartException() @@ -20,10 +19,5 @@ namespace System.Threading { HResult = __HResults.COR_E_THREADSTART; } - - internal ThreadStartException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/mscorlib/shared/System/Threading/ThreadStateException.cs b/src/mscorlib/shared/System/Threading/ThreadStateException.cs index 33bc8baee6..9477cb1ae4 100644 --- a/src/mscorlib/shared/System/Threading/ThreadStateException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadStateException.cs @@ -16,7 +16,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public class ThreadStateException : SystemException { public ThreadStateException() @@ -40,6 +39,7 @@ namespace System.Threading protected ThreadStateException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } } } diff --git a/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs b/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs index e44946a669..770e70d7ab 100644 --- a/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs +++ b/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs @@ -6,7 +6,6 @@ using System.Runtime.Serialization; namespace System.Threading { - [Serializable] public class WaitHandleCannotBeOpenedException : ApplicationException { public WaitHandleCannotBeOpenedException() : base(SR.Threading_WaitHandleCannotBeOpenedException) @@ -26,6 +25,7 @@ namespace System.Threading protected WaitHandleCannotBeOpenedException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } } } |