1
0

Exceptions.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. using System;
  2. #if !(_WINDOWS_CE)
  3. using System.Runtime.Serialization;
  4. #endif
  5. namespace Amib.Threading
  6. {
  7. #region Exceptions
  8. /// <summary>
  9. /// Represents an exception in case IWorkItemResult.GetResult has been canceled
  10. /// </summary>
  11. public sealed partial class WorkItemCancelException : Exception
  12. {
  13. public WorkItemCancelException()
  14. {
  15. }
  16. public WorkItemCancelException(string message)
  17. : base(message)
  18. {
  19. }
  20. public WorkItemCancelException(string message, Exception e)
  21. : base(message, e)
  22. {
  23. }
  24. }
  25. /// <summary>
  26. /// Represents an exception in case IWorkItemResult.GetResult has been timed out
  27. /// </summary>
  28. public sealed partial class WorkItemTimeoutException : Exception
  29. {
  30. public WorkItemTimeoutException()
  31. {
  32. }
  33. public WorkItemTimeoutException(string message)
  34. : base(message)
  35. {
  36. }
  37. public WorkItemTimeoutException(string message, Exception e)
  38. : base(message, e)
  39. {
  40. }
  41. }
  42. /// <summary>
  43. /// Represents an exception in case IWorkItemResult.GetResult has been timed out
  44. /// </summary>
  45. public sealed partial class WorkItemResultException : Exception
  46. {
  47. public WorkItemResultException()
  48. {
  49. }
  50. public WorkItemResultException(string message)
  51. : base(message)
  52. {
  53. }
  54. public WorkItemResultException(string message, Exception e)
  55. : base(message, e)
  56. {
  57. }
  58. }
  59. #if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE)
  60. /// <summary>
  61. /// Represents an exception in case IWorkItemResult.GetResult has been canceled
  62. /// </summary>
  63. [Serializable]
  64. public sealed partial class WorkItemCancelException
  65. {
  66. public WorkItemCancelException(SerializationInfo si, StreamingContext sc)
  67. : base(si, sc)
  68. {
  69. }
  70. }
  71. /// <summary>
  72. /// Represents an exception in case IWorkItemResult.GetResult has been timed out
  73. /// </summary>
  74. [Serializable]
  75. public sealed partial class WorkItemTimeoutException
  76. {
  77. public WorkItemTimeoutException(SerializationInfo si, StreamingContext sc)
  78. : base(si, sc)
  79. {
  80. }
  81. }
  82. /// <summary>
  83. /// Represents an exception in case IWorkItemResult.GetResult has been timed out
  84. /// </summary>
  85. [Serializable]
  86. public sealed partial class WorkItemResultException
  87. {
  88. public WorkItemResultException(SerializationInfo si, StreamingContext sc)
  89. : base(si, sc)
  90. {
  91. }
  92. }
  93. #endif
  94. #endregion
  95. }