Пример #1
0
 /// <summary>
 /// Executes the delegate.
 /// </summary>
 /// <param name="target">The target.</param>
 public static WorkItem InvokeDelegate(Delegate target)
 {
     return(AbortableThreadPool.QueueUserWorkItem(dynamicInvoker, new TargetInfo(target, null)));
 }
Пример #2
0
 /// <summary>
 /// Aborts the specified Queue delegate..
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns>Status of abort operation on item queue</returns>
 public static WorkItemStatus AbortDelegate(WorkItem target)
 {
     return(AbortableThreadPool.Cancel(target, true));
 }
Пример #3
0
 /// <summary>
 /// Executes the delegate.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="args">The args.</param>
 public static WorkItem InvokeDelegate(Delegate target, params object[] args)
 {
     return(AbortableThreadPool.QueueUserWorkItem(dynamicInvoker, new TargetInfo(target, args)));
 }