ComponentSpace FTP Class Library Reference

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

Initiates an asynchronous upload 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 BeginUpload( _
   ByVal sourcePathName As String, _
   ByVal destinationPathName As String, _
   ByVal stateObject As Object, _
   ByVal asyncCallback As AsyncCallback _
) As IAsyncResult
[C#]
public IAsyncResult BeginUpload(
   string sourcePathName,
   string destinationPathName,
   object stateObject,
   AsyncCallback asyncCallback
);

Parameters

sourcePathName
The local file name.
destinationPathName
The remote file 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 upload has completed; the UploadCompleted event is not raised. The other overloads of BeginUpload rely on this component to raise the UploadCompleted event.

See Also

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