C# Class Microsoft.OneDrive.Sdk.Helpers.ChunkedUploadProvider

Use this class to make resumable uploads or to upload large files. This class allows the client to control the size of chunks uploaded (for example, can be useful to use small chunks if the connection is slow). Also allows the client to pause an upload and resume later.
Afficher le fichier Open project: OneDrive/onedrive-sdk-csharp Class Usage Examples

Private Properties

Свойство Type Description
GetRangesRemaining long>>.List
NextChunkSize int

Méthodes publiques

Méthode Description
ChunkedUploadProvider ( UploadSession session, IBaseClient client, Stream uploadStream, int maxChunkSize = -1 ) : Microsoft.Graph

Helps with resumable uploads. Generates chunk requests based on session information, and can control uploading of requests using client

DeleteSession ( ) : System.Threading.Tasks.Task

Delete the session.

GetChunkRequestResponseAsync ( UploadChunkRequest request, byte readBuffer, ICollection exceptionTrackingList ) : Task
GetUploadChunkRequests ( IEnumerable options = null ) : IEnumerable

Get the series of requests needed to complete the upload session. Call UpdateSessionStatusAsync first to update the internal session information.

UpdateSessionStatusAsync ( ) : Task

Get the status of the session. Stores returned session internally. Updates internal list of ranges remaining to be uploaded (according to the server).

UploadAsync ( int maxTries = 3, IEnumerable options = null ) : Task

Upload the whole session.

Private Methods

Méthode Description
GetRangesRemaining ( UploadSession session ) : long>>.List
NextChunkSize ( long rangeBegin, long rangeEnd ) : int

Method Details

ChunkedUploadProvider() public méthode

Helps with resumable uploads. Generates chunk requests based on session information, and can control uploading of requests using client
public ChunkedUploadProvider ( UploadSession session, IBaseClient client, Stream uploadStream, int maxChunkSize = -1 ) : Microsoft.Graph
session UploadSession Session information.
client IBaseClient Client used to upload chunks.
uploadStream Stream Readable, seekable stream to be uploaded. Length of session is determined via uploadStream.Length
maxChunkSize int Max size of each chunk to be uploaded. Multiple of 320 KiB (320 * 1024) is required. /// If less than 0, default value of 5 MiB is used. .
Résultat Microsoft.Graph

DeleteSession() public méthode

Delete the session.
public DeleteSession ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

GetChunkRequestResponseAsync() public méthode

public GetChunkRequestResponseAsync ( UploadChunkRequest request, byte readBuffer, ICollection exceptionTrackingList ) : Task
request UploadChunkRequest
readBuffer byte
exceptionTrackingList ICollection
Résultat Task

GetUploadChunkRequests() public méthode

Get the series of requests needed to complete the upload session. Call UpdateSessionStatusAsync first to update the internal session information.
public GetUploadChunkRequests ( IEnumerable options = null ) : IEnumerable
options IEnumerable Options to be applied to each request.
Résultat IEnumerable

UpdateSessionStatusAsync() public méthode

Get the status of the session. Stores returned session internally. Updates internal list of ranges remaining to be uploaded (according to the server).
public UpdateSessionStatusAsync ( ) : Task
Résultat Task

UploadAsync() public méthode

Upload the whole session.
public UploadAsync ( int maxTries = 3, IEnumerable options = null ) : Task
maxTries int Number of times to retry entire session before giving up.
options IEnumerable
Résultat Task