Méthode | Description | |
---|---|---|
AsyncOperation ( ISynchronizeInvoke target ) : System |
Initialises an AsyncOperation with an association to the supplied ISynchronizeInvoke. All events raised from this object will be delivered via this target. (This might be a Control object, so events would be delivered to that Control's UI thread.)
|
|
Cancel ( ) : void |
Attempt to cancel the current operation. This returns immediately to the caller. No guarantee is made as to whether the operation will be successfully cancelled. All that can be known is that at some point, one of the three events Completed, Cancelled, or Failed will be raised at some point.
|
|
CancelAndWait ( ) : bool |
Attempt to cancel the current operation and block until either the cancellation succeeds or the operation completes.
|
|
Start ( ) : void |
Launch the operation on a worker thread. This method will return immediately, and the operation will start asynchronously on a worker thread.
|
|
WaitUntilDone ( ) : bool |
Blocks until the operation has either run to completion, or has been successfully cancelled, or has failed with an internal exception.
|
Méthode | Description | |
---|---|---|
AcknowledgeCancel ( ) : void |
This is called by the operation when it wants to indicate that it saw the cancellation request and honoured it.
|
|
DoWork ( ) : void |
To be overridden by the deriving class - this is where the work will be done. The base class calls this method on a worker thread when the Start method is called.
|
|
FireAsync ( |
Utility function for firing an event through the target. It uses C#'s variable length parameter list support to build the parameter list. This functions presumes that the caller holds the object lock. (This is because the event list is typically modified on the UI thread, but events are usually raised on the worker thread.)
|
Méthode | Description | |
---|---|---|
CompleteOperation ( ) : void | ||
FailOperation ( |
|
|
InternalStart ( ) : void |
public AsyncOperation ( ISynchronizeInvoke target ) : System | ||
target | ISynchronizeInvoke | An object implementing the /// ISynchronizeInvoke interface. All events will be delivered /// through this target, ensuring that they are delivered to the /// correct thread. |
Résultat | System |
protected FireAsync ( |
||
dlg | ||
Résultat | void |