public static Run ( IActionDispatcher dispatcher, object>.ConcurrentDictionary |
||
dispatcher | IActionDispatcher | |
data | object>.ConcurrentDictionary | |
backgroundWorker | BackgroundWorkerMethodDelegate | |
onSuccess | UIWorkerMethodDelegate | |
onCancel | UIWorkerMethodDelegate | |
onException | BackgroundWorkerExceptionHandlerDelegate | |
return |
public static HabaneroBackgroundWorker Run(this HabaneroBackgroundWorker self, Control uiControl, ConcurrentDictionary <string, object> data, HabaneroBackgroundWorker.BackgroundWorkerMethodDelegate backgroundWorker, HabaneroBackgroundWorker.UIWorkerMethodDelegate onSuccess, HabaneroBackgroundWorker.UIWorkerMethodDelegate onCancel, HabaneroBackgroundWorker.BackgroundWorkerExceptionHandlerDelegate onException) { return(HabaneroBackgroundWorker.Run(new ActionDispatcher(uiControl), data, backgroundWorker, onSuccess, onCancel, onException)); }
/// <summary> /// Convenience method for creating an HabaneroBackgroundWorker. /// </summary> /// <param name="dispatcher"></param> /// <param name="data"></param> /// <param name="backgroundWorker"></param> /// <param name="onSuccess"></param> /// <param name="onCancel"></param> /// <param name="onException"></param> /// <returns></returns> public static HabaneroBackgroundWorker Run(IActionDispatcher dispatcher, ConcurrentDictionary <string, object> data, BackgroundWorkerMethodDelegate backgroundWorker, UIWorkerMethodDelegate onSuccess, UIWorkerMethodDelegate onCancel, BackgroundWorkerExceptionHandlerDelegate onException) { var runner = new HabaneroBackgroundWorker() { ActionDispatcher = dispatcher, BackgroundWorker = backgroundWorker, OnSuccess = onSuccess, OnCancelled = onCancel, OnException = onException, Data = data }; runner.Run(); return(runner); }
public static HabaneroBackgroundWorker Run(IActionDispatcher dispatcher, ConcurrentDictionary<string, object> data, BackgroundWorkerMethodDelegate backgroundWorker, UIWorkerMethodDelegate onSuccess, UIWorkerMethodDelegate onCancel, BackgroundWorkerExceptionHandlerDelegate onException) { var runner = new HabaneroBackgroundWorker() { ActionDispatcher = dispatcher, BackgroundWorker = backgroundWorker, OnSuccess = onSuccess, OnCancelled = onCancel, OnException = onException, Data = data }; runner.Run(); return runner; }