←Select platform

SharePointClientUploadCompletedEventArgs Class

Summary

Data for the SharePointClient.UploadCompleted event.

Syntax

C#
VB
C++
public class SharePointClientUploadCompletedEventArgs : AsyncCompletedEventArgs 
  
Public Class SharePointClientUploadCompletedEventArgs  
   Inherits System.ComponentModel.AsyncCompletedEventArgs 
public ref class SharePointClientUploadCompletedEventArgs : public System.ComponentModel.AsyncCompletedEventArgs  

Remarks

The SharePointClient class supports uploading an item asynchronously through UploadFileAsync and UploadStreamAsync. When you call these methods, control returns instantly to your program and the SharePointClient.UploadCompleted event will occur when the upload operation is completed (successfully or when an error occur).

Note that the SharePointClientUploadCompletedEventArgs derives from the standard .NET System.ComponentModel.AsyncCompletedEventArgs class and adds properties specified to SharePoint upload support.

When the upload operation is completed, the SharePointClient.UploadCompleted event will receive an object of type SharePointClientUploadCompletedEventArgs containing the operation result as following:

Property Value
SourceFileName

The source file name. This is the same value as the sourceFileName parameter passed to UploadFileAsync if this method is used to initiate the upload operation. If UploadStreamAsync was used instead, then the value of this property will be null ( Nothing in Visual Basic)

SourceStream

The source stream. This is the same value as the sourceStream parameter passed to UploadStreamAsync if this method is used to initiate the upload operation. If UploadFileAsync was used instead, then the value of this property will be null ( Nothing in Visual Basic)

SiteUri

The Share Point server site URI. This is the same value as the siteUri parameter passed to UploadFileAsync or UploadStreamAsync.

DestinationPath

The destination path. This is the same value as the destinationPath parameter passed to UploadFileAsync or UploadStreamAsync.

System.ComponentModel.AsyncCompletedEventArgs.Error

Gets a value that indicates which error occurred during the asynchronous upload operation. If an exception is raised during the asynchronous upload operation, the class will assign the exception to the System.ComponentModel.AsyncCompletedEventArgs.Error property. The client application's event-handler delegate should check the System.ComponentModel.AsyncCompletedEventArgs.Error property before accessing any properties in SharePointClientUploadCompletedEventArgs.

The value of the System.ComponentModel.AsyncCompletedEventArgs.Error property is null (Nothing in Visual Basic) if the operation was canceled

System.ComponentModel.AsyncCompletedEventArgs.UserState

Gets the unique identifier for the asynchronous upload operation. The value of this property is the same as the userState parameter passed to UploadFileAsync or UploadStreamAsync.

System.ComponentModel.AsyncCompletedEventArgs.Cancelled

true if the asynchronous upload operation has been canceled; otherwise, false. This class does not change the value of this property from the default value of false

Example

For an example, refer to UploadFileAsync or UploadStreamAsync.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.