diff options
Diffstat (limited to '')
-rw-r--r-- | ThirdParty/SmartThreadPool/WorkItemInfo.cs | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/ThirdParty/SmartThreadPool/WorkItemInfo.cs b/ThirdParty/SmartThreadPool/WorkItemInfo.cs new file mode 100644 index 0000000..5be82a2 --- /dev/null +++ b/ThirdParty/SmartThreadPool/WorkItemInfo.cs | |||
@@ -0,0 +1,69 @@ | |||
1 | namespace Amib.Threading | ||
2 | { | ||
3 | #region WorkItemInfo class | ||
4 | |||
5 | /// <summary> | ||
6 | /// Summary description for WorkItemInfo. | ||
7 | /// </summary> | ||
8 | public class WorkItemInfo | ||
9 | { | ||
10 | public WorkItemInfo() | ||
11 | { | ||
12 | UseCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; | ||
13 | UseCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext; | ||
14 | DisposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects; | ||
15 | CallToPostExecute = SmartThreadPool.DefaultCallToPostExecute; | ||
16 | PostExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; | ||
17 | WorkItemPriority = SmartThreadPool.DefaultWorkItemPriority; | ||
18 | } | ||
19 | |||
20 | public WorkItemInfo(WorkItemInfo workItemInfo) | ||
21 | { | ||
22 | UseCallerCallContext = workItemInfo.UseCallerCallContext; | ||
23 | UseCallerHttpContext = workItemInfo.UseCallerHttpContext; | ||
24 | DisposeOfStateObjects = workItemInfo.DisposeOfStateObjects; | ||
25 | CallToPostExecute = workItemInfo.CallToPostExecute; | ||
26 | PostExecuteWorkItemCallback = workItemInfo.PostExecuteWorkItemCallback; | ||
27 | WorkItemPriority = workItemInfo.WorkItemPriority; | ||
28 | Timeout = workItemInfo.Timeout; | ||
29 | } | ||
30 | |||
31 | /// <summary> | ||
32 | /// Get/Set if to use the caller's security context | ||
33 | /// </summary> | ||
34 | public bool UseCallerCallContext { get; set; } | ||
35 | |||
36 | /// <summary> | ||
37 | /// Get/Set if to use the caller's HTTP context | ||
38 | /// </summary> | ||
39 | public bool UseCallerHttpContext { get; set; } | ||
40 | |||
41 | /// <summary> | ||
42 | /// Get/Set if to dispose of the state object of a work item | ||
43 | /// </summary> | ||
44 | public bool DisposeOfStateObjects { get; set; } | ||
45 | |||
46 | /// <summary> | ||
47 | /// Get/Set the run the post execute options | ||
48 | /// </summary> | ||
49 | public CallToPostExecute CallToPostExecute { get; set; } | ||
50 | |||
51 | /// <summary> | ||
52 | /// Get/Set the post execute callback | ||
53 | /// </summary> | ||
54 | public PostExecuteWorkItemCallback PostExecuteWorkItemCallback { get; set; } | ||
55 | |||
56 | /// <summary> | ||
57 | /// Get/Set the work item's priority | ||
58 | /// </summary> | ||
59 | public WorkItemPriority WorkItemPriority { get; set; } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Get/Set the work item's timout in milliseconds. | ||
63 | /// This is a passive timout. When the timout expires the work item won't be actively aborted! | ||
64 | /// </summary> | ||
65 | public long Timeout { get; set; } | ||
66 | } | ||
67 | |||
68 | #endregion | ||
69 | } | ||