namespace Amib.Threading { #region WorkItemInfo class /// /// Summary description for WorkItemInfo. /// public class WorkItemInfo { public WorkItemInfo() { UseCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; DisposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects; CallToPostExecute = SmartThreadPool.DefaultCallToPostExecute; PostExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; } public WorkItemInfo(WorkItemInfo workItemInfo) { UseCallerCallContext = workItemInfo.UseCallerCallContext; DisposeOfStateObjects = workItemInfo.DisposeOfStateObjects; CallToPostExecute = workItemInfo.CallToPostExecute; PostExecuteWorkItemCallback = workItemInfo.PostExecuteWorkItemCallback; Timeout = workItemInfo.Timeout; } /// /// Get/Set if to use the caller's security context /// public bool UseCallerCallContext { get; set; } /// /// Get/Set if to dispose of the state object of a work item /// public bool DisposeOfStateObjects { get; set; } /// /// Get/Set the run the post execute options /// public CallToPostExecute CallToPostExecute { get; set; } /// /// Get/Set the post execute callback /// public PostExecuteWorkItemCallback PostExecuteWorkItemCallback { get; set; } /// /// Get/Set the work item's timout in milliseconds. /// This is a passive timout. When the timout expires the work item won't be actively aborted! /// public long Timeout { get; set; } } #endregion }