ThreadStateException.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. /*=============================================================================
  5. **
  6. **
  7. **
  8. ** Purpose: An exception class to indicate that the Thread class is in an
  9. ** invalid state for the method.
  10. **
  11. **
  12. =============================================================================*/
  13. using System.Runtime.Serialization;
  14. namespace System.Threading
  15. {
  16. [Serializable]
  17. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  18. public class ThreadStateException : SystemException
  19. {
  20. public ThreadStateException()
  21. : base(SR.Arg_ThreadStateException)
  22. {
  23. HResult = HResults.COR_E_THREADSTATE;
  24. }
  25. public ThreadStateException(string message)
  26. : base(message)
  27. {
  28. HResult = HResults.COR_E_THREADSTATE;
  29. }
  30. public ThreadStateException(string message, Exception innerException)
  31. : base(message, innerException)
  32. {
  33. HResult = HResults.COR_E_THREADSTATE;
  34. }
  35. protected ThreadStateException(SerializationInfo info, StreamingContext context)
  36. : base(info, context)
  37. {
  38. }
  39. }
  40. }