aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/SmartThreadPool/Exceptions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ThirdParty/SmartThreadPool/Exceptions.cs')
-rw-r--r--ThirdParty/SmartThreadPool/Exceptions.cs192
1 files changed, 111 insertions, 81 deletions
diff --git a/ThirdParty/SmartThreadPool/Exceptions.cs b/ThirdParty/SmartThreadPool/Exceptions.cs
index c454709..8e66ce9 100644
--- a/ThirdParty/SmartThreadPool/Exceptions.cs
+++ b/ThirdParty/SmartThreadPool/Exceptions.cs
@@ -1,81 +1,111 @@
1// Ami Bar 1using System;
2// amibar@gmail.com 2#if !(_WINDOWS_CE)
3 3using System.Runtime.Serialization;
4using System; 4#endif
5using System.Runtime.Serialization; 5
6 6namespace Amib.Threading
7namespace Amib.Threading 7{
8{ 8 #region Exceptions
9 #region Exceptions 9
10 10 /// <summary>
11 /// <summary> 11 /// Represents an exception in case IWorkItemResult.GetResult has been canceled
12 /// Represents an exception in case IWorkItemResult.GetResult has been canceled 12 /// </summary>
13 /// </summary> 13 public sealed partial class WorkItemCancelException : Exception
14 [Serializable] 14 {
15 public sealed class WorkItemCancelException : ApplicationException 15 public WorkItemCancelException()
16 { 16 {
17 public WorkItemCancelException() : base() 17 }
18 { 18
19 } 19 public WorkItemCancelException(string message)
20 20 : base(message)
21 public WorkItemCancelException(string message) : base(message) 21 {
22 { 22 }
23 } 23
24 24 public WorkItemCancelException(string message, Exception e)
25 public WorkItemCancelException(string message, Exception e) : base(message, e) 25 : base(message, e)
26 { 26 {
27 } 27 }
28 28 }
29 public WorkItemCancelException(SerializationInfo si, StreamingContext sc) : base(si, sc) 29
30 { 30 /// <summary>
31 } 31 /// Represents an exception in case IWorkItemResult.GetResult has been timed out
32 } 32 /// </summary>
33 33 public sealed partial class WorkItemTimeoutException : Exception
34 /// <summary> 34 {
35 /// Represents an exception in case IWorkItemResult.GetResult has been timed out 35 public WorkItemTimeoutException()
36 /// </summary> 36 {
37 [Serializable] 37 }
38 public sealed class WorkItemTimeoutException : ApplicationException 38
39 { 39 public WorkItemTimeoutException(string message)
40 public WorkItemTimeoutException() : base() 40 : base(message)
41 { 41 {
42 } 42 }
43 43
44 public WorkItemTimeoutException(string message) : base(message) 44 public WorkItemTimeoutException(string message, Exception e)
45 { 45 : base(message, e)
46 } 46 {
47 47 }
48 public WorkItemTimeoutException(string message, Exception e) : base(message, e) 48 }
49 { 49
50 } 50 /// <summary>
51 51 /// Represents an exception in case IWorkItemResult.GetResult has been timed out
52 public WorkItemTimeoutException(SerializationInfo si, StreamingContext sc) : base(si, sc) 52 /// </summary>
53 { 53 public sealed partial class WorkItemResultException : Exception
54 } 54 {
55 } 55 public WorkItemResultException()
56 56 {
57 /// <summary> 57 }
58 /// Represents an exception in case IWorkItemResult.GetResult has been timed out 58
59 /// </summary> 59 public WorkItemResultException(string message)
60 [Serializable] 60 : base(message)
61 public sealed class WorkItemResultException : ApplicationException 61 {
62 { 62 }
63 public WorkItemResultException() : base() 63
64 { 64 public WorkItemResultException(string message, Exception e)
65 } 65 : base(message, e)
66 66 {
67 public WorkItemResultException(string message) : base(message) 67 }
68 { 68 }
69 } 69
70 70
71 public WorkItemResultException(string message, Exception e) : base(message, e) 71#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE)
72 { 72 /// <summary>
73 } 73 /// Represents an exception in case IWorkItemResult.GetResult has been canceled
74 74 /// </summary>
75 public WorkItemResultException(SerializationInfo si, StreamingContext sc) : base(si, sc) 75 [Serializable]
76 { 76 public sealed partial class WorkItemCancelException
77 } 77 {
78 } 78 public WorkItemCancelException(SerializationInfo si, StreamingContext sc)
79 79 : base(si, sc)
80 #endregion 80 {
81} 81 }
82 }
83
84 /// <summary>
85 /// Represents an exception in case IWorkItemResult.GetResult has been timed out
86 /// </summary>
87 [Serializable]
88 public sealed partial class WorkItemTimeoutException
89 {
90 public WorkItemTimeoutException(SerializationInfo si, StreamingContext sc)
91 : base(si, sc)
92 {
93 }
94 }
95
96 /// <summary>
97 /// Represents an exception in case IWorkItemResult.GetResult has been timed out
98 /// </summary>
99 [Serializable]
100 public sealed partial class WorkItemResultException
101 {
102 public WorkItemResultException(SerializationInfo si, StreamingContext sc)
103 : base(si, sc)
104 {
105 }
106 }
107
108#endif
109
110 #endregion
111}