Пример #1
0
 /// <summary>
 /// 异步工作方法
 /// </summary>
 /// <typeparam name="T">异步工作结果数据泛型</typeparam>
 /// <param name="workerMethod">异步工作方法</param>
 /// <param name="workerProgressChangedCallback">异步工作方法进度回调函数</param>
 /// <param name="workerMethodCompletedCallback">异步工作方法已完成回调函数</param>
 /// <returns>异步工作器句柄</returns>
 public static AsyncWorkerHandle <T> DoWork <T>(
     DoWorkEventHandler workerMethod,
     ProgressChangedEventHandler workerProgressChangedCallback,
     EventHandler <AsyncWorkerCallbackEventArgs <T> > workerMethodCompletedCallback)
 {
     return(AsyncWorkerHelper.DoWork <T>(workerMethod, 0, workerProgressChangedCallback, workerMethodCompletedCallback));
 }
Пример #2
0
 /// <summary>
 /// 异步工作方法
 /// </summary>
 /// <typeparam name="T">异步工作结果数据泛型</typeparam>
 /// <param name="workerMethod">异步工作方法</param>
 /// <param name="workerMethodCompletedCallback">异步工作方法已完成回调函数</param>
 /// <returns>异步工作器句柄</returns>
 public static AsyncWorkerHandle <T> DoWork <T>(
     DoWorkEventHandler workerMethod,
     EventHandler <AsyncWorkerCallbackEventArgs <T> > workerMethodCompletedCallback)
 {
     return(AsyncWorkerHelper.DoWork <T>(workerMethod, 0, null, workerMethodCompletedCallback));
 }
Пример #3
0
 /// <summary>
 /// 异步工作方法
 /// </summary>
 /// <typeparam name="T">异步工作结果数据泛型</typeparam>
 /// <param name="workerMethod">异步工作方法</param>
 /// <returns>异步工作器句柄</returns>
 public static AsyncWorkerHandle <T> DoWork <T>(
     DoWorkEventHandler workerMethod)
 {
     return(AsyncWorkerHelper.DoWork <T>(workerMethod, 0, null, null));
 }