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