OpenSimMirror/ThirdParty/SmartThreadPool/WorkItemInfo.cs

70 lines
2.5 KiB
C#
Raw Permalink Normal View History

namespace Amib.Threading
{
2017-01-05 19:07:37 +00:00
#region WorkItemInfo class
2017-01-05 19:07:37 +00:00
/// <summary>
/// Summary description for WorkItemInfo.
/// </summary>
public class WorkItemInfo
{
public WorkItemInfo()
{
UseCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext;
UseCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext;
DisposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects;
CallToPostExecute = SmartThreadPool.DefaultCallToPostExecute;
PostExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback;
WorkItemPriority = SmartThreadPool.DefaultWorkItemPriority;
}
2017-01-05 19:07:37 +00:00
public WorkItemInfo(WorkItemInfo workItemInfo)
{
UseCallerCallContext = workItemInfo.UseCallerCallContext;
UseCallerHttpContext = workItemInfo.UseCallerHttpContext;
DisposeOfStateObjects = workItemInfo.DisposeOfStateObjects;
CallToPostExecute = workItemInfo.CallToPostExecute;
PostExecuteWorkItemCallback = workItemInfo.PostExecuteWorkItemCallback;
WorkItemPriority = workItemInfo.WorkItemPriority;
Timeout = workItemInfo.Timeout;
2017-01-05 19:07:37 +00:00
}
2017-01-05 19:07:37 +00:00
/// <summary>
/// Get/Set if to use the caller's security context
/// </summary>
public bool UseCallerCallContext { get; set; }
2017-01-05 19:07:37 +00:00
/// <summary>
/// Get/Set if to use the caller's HTTP context
/// </summary>
public bool UseCallerHttpContext { get; set; }
2017-01-05 19:07:37 +00:00
/// <summary>
/// Get/Set if to dispose of the state object of a work item
/// </summary>
public bool DisposeOfStateObjects { get; set; }
2017-01-05 19:07:37 +00:00
/// <summary>
/// Get/Set the run the post execute options
/// </summary>
public CallToPostExecute CallToPostExecute { get; set; }
2017-01-05 19:07:37 +00:00
/// <summary>
/// Get/Set the post execute callback
/// </summary>
public PostExecuteWorkItemCallback PostExecuteWorkItemCallback { get; set; }
2017-01-05 19:07:37 +00:00
/// <summary>
/// Get/Set the work item's priority
/// </summary>
public WorkItemPriority WorkItemPriority { get; set; }
2017-01-05 19:07:37 +00:00
/// <summary>
/// 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!
2017-01-05 19:07:37 +00:00
/// </summary>
public long Timeout { get; set; }
}
2017-01-05 19:07:37 +00:00
#endregion
}