ComponentSpace FTP Class Library Reference

FailSafeTransfer.BeginUpload Method (String, String, Object)

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

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

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.

Return Value

The IAsyncResult that identifies the posted asynchronous request.

Remarks

In asynchronous processing, you use BeginUpload to raise the UploadCompleted event when the upload has completed. You complete the operation by calling EndUpload.

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.BeginUpload Overload List