Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / mscorlib / system / threading / threadinterruptedexception.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 //
7 // <OWNER>Microsoft</OWNER>
8 /*=============================================================================
9 **
10 ** Class: ThreadInterruptedException
11 **
12 **
13 ** Purpose: An exception class to indicate that the thread was interrupted
14 **          from a waiting state.
15 **
16 **
17 =============================================================================*/
18 namespace System.Threading {
19     using System.Threading;
20     using System;
21     using System.Runtime.Serialization;
22
23     [System.Runtime.InteropServices.ComVisible(true)]
24     [Serializable]
25     public class ThreadInterruptedException : SystemException {
26         public ThreadInterruptedException() 
27             : base(GetMessageFromNativeResources(ExceptionMessageKind.ThreadInterrupted)) {
28             SetErrorCode(__HResults.COR_E_THREADINTERRUPTED);
29         }
30         
31         public ThreadInterruptedException(String message) 
32             : base(message) {
33             SetErrorCode(__HResults.COR_E_THREADINTERRUPTED);
34         }
35     
36         public ThreadInterruptedException(String message, Exception innerException) 
37             : base(message, innerException) {
38             SetErrorCode(__HResults.COR_E_THREADINTERRUPTED);
39         }
40
41         protected ThreadInterruptedException(SerializationInfo info, StreamingContext context) : base (info, context) {
42         }
43     }
44 }