Click or drag to resize

VEngineUploadAsync Method

Efficiently uploads all or selected contents of the local directory to a cloud job stored in an Azure Storage Account Blob Container.

Namespace: RCS.Carbon.Variables
Assembly: RCS.Carbon.Variables (in RCS.Carbon.Variables.dll) Version: 9.0.12
Syntax
C#
public Task<JobUploadResults> UploadAsync(
	JobUploadParameters parameters
)

Parameters

parameters  JobUploadParameters
Specifies all of the values to control upload processing.

Return Value

TaskJobUploadResults
Detailed information about the amount of data uploaded and the timing.
Remarks

This method uses Task parallelism to efficiently upload local files to a job stored in an Azure container. The method would normally use the modern Parallel.ForEachAsync for highest performance and code simplicity, but this library must support Standard 2.0 and so it falls back to using a ConcurrentQueueT with multiple threads randomly pulling items out of the collection. The number of threads can be one to the processor count, with a default of 4, which was chosen via guesswork.

The job must be opened before this call is possible, so job quotas are protected by standard guards. Luckily it is possible to open a cloud job in an empty container and if this changes then some plumbing will need to change as well.

Certain folders (only 2 at the moment) will have their uploaded blob names converted to lower-case, which is described in the JobUploadParameters comments.

See Also