C# Class Habanero.Base.HabaneroBackgroundWorker

Helper class to facilitate asynchronous workers on pre-dotnet-4.5 machines, using the native system threading model and an abstraction for synchronisation with the UI thread for user feedback on completion and exception
Afficher le fichier Open project: Chillisoft/habanero Class Usage Examples

Méthodes publiques

Méthode Description
Run ( IActionDispatcher dispatcher, object>.ConcurrentDictionary data, BackgroundWorkerMethodDelegate backgroundWorker, UIWorkerMethodDelegate onSuccess, UIWorkerMethodDelegate onCancel, BackgroundWorkerExceptionHandlerDelegate onException ) : HabaneroBackgroundWorker

Convenience method for creating an HabaneroBackgroundWorker.

Run ( ) : void

Starts the new thread.

WaitForBackgroundWorkerToComplete ( ) : void

Waits for the thread to end.

Private Methods

Méthode Description
RunBackgroundWorker ( ) : void
RunExceptionDelegate ( Exception ex ) : void
RunUIWorkerDelegate ( bool success ) : void

Method Details

Run() public static méthode

Convenience method for creating an HabaneroBackgroundWorker.
public static Run ( IActionDispatcher dispatcher, object>.ConcurrentDictionary data, BackgroundWorkerMethodDelegate backgroundWorker, UIWorkerMethodDelegate onSuccess, UIWorkerMethodDelegate onCancel, BackgroundWorkerExceptionHandlerDelegate onException ) : HabaneroBackgroundWorker
dispatcher IActionDispatcher
data object>.ConcurrentDictionary
backgroundWorker BackgroundWorkerMethodDelegate
onSuccess UIWorkerMethodDelegate
onCancel UIWorkerMethodDelegate
onException BackgroundWorkerExceptionHandlerDelegate
Résultat HabaneroBackgroundWorker

Run() public méthode

Starts the new thread.
public Run ( ) : void
Résultat void

WaitForBackgroundWorkerToComplete() public méthode

Waits for the thread to end.
public WaitForBackgroundWorkerToComplete ( ) : void
Résultat void