ComponentSpace FTP Class Library Reference

FailSafeTransfer.BeginDownload Method (String, String, Object)

Initiates an asynchronous download remote file that has a specified state object.

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

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.

Return Value

The IAsyncResult that identifies the posted asynchronous request.

Remarks

In asynchronous processing, you use BeginDownload to raise the DownloadCompleted event when the download has completed. You complete the operation by calling EndDownload.

Use this overload to associate information with the operation that will be preserved throughout the operation's lifetime. The event handler can detect this information by looking at the AsyncState of the IAsyncResult that is associated with the operation.

See Also

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