Esempio n. 1
0
 /// <summary>
 /// 执行委托操作
 /// </summary>
 /// <param name="target">目标委托对象</param>
 public static WorkItem InvokeDelegate(Delegate target)
 {
     return(AbortableThreadPool.QueueUserWorkItem(dynamicInvoker, new TargetInfo(target, null)));
 }
Esempio n. 2
0
 /// <summary>
 /// 中止指定的队列中委托
 /// </summary>
 /// <param name="target">目标委托对象</param>
 /// <returns>项目队列中止操作的状态</returns>
 public static WorkItemStatus AbortDelegate(WorkItem target)
 {
     return(AbortableThreadPool.Cancel(target, true));
 }
Esempio n. 3
0
 /// <summary>
 /// 执行委托操作
 /// </summary>
 /// <param name="target">目标委托对象</param>
 /// <param name="args">参数</param>
 public static WorkItem InvokeDelegate(Delegate target, params object[] args)
 {
     return(AbortableThreadPool.QueueUserWorkItem(dynamicInvoker, new TargetInfo(target, args)));
 }