ComponentSpace FTP Class Library Reference

FailSafeTransfer.BeginDownload Method (String, String, Object, AsyncCallback)

Initiates an asynchronous download remote file that has a specified state object. This overload receives notification, through a callback, of the identity of the event handler for this operation.

[Visual Basic]
Overloads Public Function BeginDownload( _
   ByVal sourcePathName As String, _
   ByVal destinationPathName As String, _
   ByVal stateObject As Object, _
   ByVal asyncCallback As AsyncCallback _
) As IAsyncResult
[C#]
public IAsyncResult BeginDownload(
   string sourcePathName,
   string destinationPathName,
   object stateObject,
   AsyncCallback asyncCallback
);

Parameters

sourcePathName
The remote file path name.
destinationPathName
The local file path name.
stateObject
A state object, specified by the application, that contains information associated with the asynchronous operation.
asyncCallback
The AsyncCallback that will receive the notification of the asynchronous operation completion.

Return Value

The IAsyncResult that identifies the posted asynchronous request.

Remarks

When you use this overload, the callback specified in the callback parameter is invoked directly when the download has completed; the DownloadCompleted event is not raised. The other overloads of BeginDownload rely on this component to raise the DownloadCompleted event.

See Also

FailSafeTransfer Class | ComponentSpace.Ftp Namespace | FailSafeTransfer.BeginDownload Overload List