本文整理汇总了C#中WIGStartInfo类的典型用法代码示例。如果您正苦于以下问题:C# WIGStartInfo类的具体用法?C# WIGStartInfo怎么用?C# WIGStartInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WIGStartInfo类属于命名空间,在下文中一共展示了WIGStartInfo类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CreateWorkItem
/// <summary>
/// Create a new work item
/// </summary>
/// <param name = "wigStartInfo">Work item group start information</param>
/// <param name = "callback">A callback to execute</param>
/// <returns>Returns a work item</returns>
public static WorkItem CreateWorkItem(
IWorkItemsGroup workItemsGroup,
WIGStartInfo wigStartInfo,
WorkItemCallback callback)
{
return CreateWorkItem(workItemsGroup, wigStartInfo, callback, null);
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:13,代码来源:WorkItemFactory.cs
示例2: WorkItemsGroup
public WorkItemsGroup(
SmartThreadPool stp,
int concurrency,
WIGStartInfo wigStartInfo)
{
if (concurrency <= 0)
{
throw new ArgumentOutOfRangeException(
"concurrency",
#if !(WindowsCE)
concurrency,
#endif
"concurrency must be greater than zero");
}
_stp = stp;
_concurrency = concurrency;
_workItemsGroupStartInfo = new WIGStartInfo(wigStartInfo).AsReadOnly();
_workItemsQueue = new PriorityQueue();
Name = "WorkItemsGroup";
// The _workItemsInStpQueue gets the number of currently executing work items,
// because once a work item is executing, it cannot be cancelled.
_workItemsInStpQueue = _workItemsExecutingInStp;
_isSuspended = _workItemsGroupStartInfo.StartSuspended;
}
开发者ID:3di,项目名称:3di-viewer-rei-libs,代码行数:26,代码来源:WorkItemsGroup.cs
示例3: WIGStartInfo
public WIGStartInfo(WIGStartInfo wigStartInfo)
{
_useCallerCallContext = wigStartInfo._useCallerCallContext;
_useCallerHttpContext = wigStartInfo._useCallerHttpContext;
_disposeOfStateObjects = wigStartInfo._disposeOfStateObjects;
_callToPostExecute = wigStartInfo._callToPostExecute;
_postExecuteWorkItemCallback = wigStartInfo._postExecuteWorkItemCallback;
_startSuspended = wigStartInfo._startSuspended;
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:9,代码来源:WIGStartInfo.cs
示例4: CreateWorkItem
// Token: 0x0600185F RID: 6239
// RVA: 0x00075274 File Offset: 0x00073474
public static WorkItem CreateWorkItem(IWorkItemsGroup iworkItemsGroup_0, WIGStartInfo wigstartInfo_0, WorkItemCallback workItemCallback_0, object object_0, WorkItemPriority workItemPriority_0)
{
WorkItemFactory.ValidateCallback(workItemCallback_0);
return new WorkItem(iworkItemsGroup_0, new WorkItemInfo
{
UseCallerCallContext = wigstartInfo_0.UseCallerCallContext,
UseCallerHttpContext = wigstartInfo_0.UseCallerHttpContext,
PostExecuteWorkItemCallback = wigstartInfo_0.PostExecuteWorkItemCallback,
CallToPostExecute = wigstartInfo_0.CallToPostExecute,
DisposeOfStateObjects = wigstartInfo_0.DisposeOfStateObjects,
WorkItemPriority = workItemPriority_0
}, workItemCallback_0, object_0);
}
开发者ID:newchild,项目名称:Project-DayZero,代码行数:15,代码来源:WorkItemFactory.cs
示例5: WorkItemsGroup
public WorkItemsGroup(
SmartThreadPool stp,
int concurrency,
WIGStartInfo wigStartInfo)
{
if (concurrency <= 0)
{
throw new ArgumentOutOfRangeException("concurrency", concurrency, "concurrency must be greater than zero");
}
_stp = stp;
_concurrency = concurrency;
_workItemsGroupStartInfo = new WIGStartInfo(wigStartInfo);
_workItemsQueue = new PriorityQueue();
// The _workItemsInStpQueue gets the number of currently executing work items,
// because once a work item is executing, it cannot be cancelled.
_workItemsInStpQueue = _workItemsExecutingInStp;
}
开发者ID:BackupTheBerlios,项目名称:seleon,代码行数:18,代码来源:WorkItemsGroup.cs
示例6: CreateWorkItem
/// <summary>
/// Create a new work item
/// </summary>
/// <param name="workItemsGroup"></param>
/// <param name="wigStartInfo">Work item group start information</param>
/// <param name="callback">A callback to execute</param>
/// <param name="state">
/// The context object of the work item. Used for passing arguments to the work item.
/// </param>
/// <returns>Returns a work item</returns>
public static WorkItem CreateWorkItem(
IWorkItemsGroup workItemsGroup,
WIGStartInfo wigStartInfo,
WorkItemCallback callback,
object state)
{
ValidateCallback(callback);
WorkItemInfo workItemInfo = new WorkItemInfo();
workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
workItemInfo.PostExecuteWorkItemCallback = wigStartInfo.PostExecuteWorkItemCallback;
workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute;
workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
WorkItem workItem = new WorkItem(
workItemsGroup,
workItemInfo,
callback,
state);
return workItem;
}
开发者ID:arpitgold,项目名称:Exceptionless,代码行数:32,代码来源:WorkItemFactory.cs
注:本文中的WIGStartInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论