C# 클래스 GpsBroadcaster.Task

A class that represents a unit of work to be done. At the choice of the user, this can either be executed synchronously on the current thread or the GUI thread, or be executed asynchronously on a background worker. In either case, it will be able to report back on the GUI thread when the work is done. And if you choose to use an asynchronous operation, then it can also report back progress.
파일 보기 프로젝트 열기: bakacaptain/istalkapp

Private Properties

프로퍼티 타입 설명
Completed void

공개 메소드들

메소드 설명
BeginExecute ( ) : void

Method to start running this task asynchronously. This can only be used if the enum TaskHandler.Background was specified to the constructor of the class.

Cancel ( ) : void

This method cancels the task. This only works for TaskHandlers of type background.

Execute ( ) : void

Method to start running this task synchronously, either on the current thread or on the GUI thread. This can only be used if the enum TaskHandler.Dispatcher or TaskHandler.ThisThread was specified to the constructor.

Task ( Dispatcher dispatcher, TaskHandler handler ) : System

Constructor for the task.

보호된 메소드들

메소드 설명
Execute ( Object sender, DoWorkEventArgs args ) : void

Abstract method to be overridden that represents the work being done by the task.

ReportProgress ( Int32 percent, Object userState ) : void

Method used to report the progress being done by the task.

비공개 메소드들

메소드 설명
Completed ( Object sender, RunWorkerCompletedEventArgs args ) : void

메소드 상세

BeginExecute() 공개 메소드

Method to start running this task asynchronously. This can only be used if the enum TaskHandler.Background was specified to the constructor of the class.
public BeginExecute ( ) : void
리턴 void

Cancel() 공개 메소드

This method cancels the task. This only works for TaskHandlers of type background.
public Cancel ( ) : void
리턴 void

Execute() 공개 메소드

Method to start running this task synchronously, either on the current thread or on the GUI thread. This can only be used if the enum TaskHandler.Dispatcher or TaskHandler.ThisThread was specified to the constructor.
public Execute ( ) : void
리턴 void

Execute() 보호된 추상적인 메소드

Abstract method to be overridden that represents the work being done by the task.
protected abstract Execute ( Object sender, DoWorkEventArgs args ) : void
sender Object
args System.ComponentModel.DoWorkEventArgs
리턴 void

ReportProgress() 보호된 메소드

Method used to report the progress being done by the task.
protected ReportProgress ( Int32 percent, Object userState ) : void
percent System.Int32 An Int32 representing the progress.
userState Object An arbitary userState object to describe the state of the operation.
리턴 void

Task() 공개 메소드

Constructor for the task.
public Task ( Dispatcher dispatcher, TaskHandler handler ) : System
dispatcher System.Windows.Threading.Dispatcher
handler TaskHandler Is an enum representing how this task should be executed.
리턴 System