C# Класс CmisSync.Lib.FileTransmission.SimpleFileUploader

Simple file uploader. Takes a given stream and uploads it to the server. Resuming an Upload is not supported.
Наследование: IFileUploader
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AppendFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg ) : IDocument

Appends the localFileStream to the remoteDocument.

Dispose ( ) : void

Releases all resource used by the CmisSync.Lib.FileTransmission.SimpleFileUploader object.

Call Dispose when you are finished using the CmisSync.Lib.FileTransmission.SimpleFileUploader. The Dispose method leaves the CmisSync.Lib.FileTransmission.SimpleFileUploader in an unusable state. After calling Dispose, you must release all references to the CmisSync.Lib.FileTransmission.SimpleFileUploader so the garbage collector can reclaim the memory that the CmisSync.Lib.FileTransmission.SimpleFileUploader was occupying.

UploadFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg, bool overwrite = true, UpdateChecksum update = null ) : IDocument

Uploads the localFileStream to remoteDocument.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

Описание методов

AppendFile() публичный Метод

Appends the localFileStream to the remoteDocument.
If Upload fails
public AppendFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg ) : IDocument
remoteDocument IDocument /// Remote document where the local content should be appended to. ///
localFileStream Stream /// Local file stream. ///
transmission Transmission
hashAlg System.Security.Cryptography.HashAlgorithm /// Hash alg which should be used to calculate a checksum over the appended content. ///
Результат IDocument

Dispose() публичный Метод

Releases all resource used by the CmisSync.Lib.FileTransmission.SimpleFileUploader object.
Call Dispose when you are finished using the CmisSync.Lib.FileTransmission.SimpleFileUploader. The Dispose method leaves the CmisSync.Lib.FileTransmission.SimpleFileUploader in an unusable state. After calling Dispose, you must release all references to the CmisSync.Lib.FileTransmission.SimpleFileUploader so the garbage collector can reclaim the memory that the CmisSync.Lib.FileTransmission.SimpleFileUploader was occupying.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.
protected Dispose ( bool disposing ) : void
disposing bool If set to true disposing.
Результат void

UploadFile() публичный Метод

Uploads the localFileStream to remoteDocument.
If upload fails
public UploadFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg, bool overwrite = true, UpdateChecksum update = null ) : IDocument
remoteDocument IDocument /// Remote document where the local content should be uploaded to. ///
localFileStream Stream /// Local file stream. ///
transmission Transmission /// Transmission status where the uploader should report its uploading status. ///
hashAlg System.Security.Cryptography.HashAlgorithm /// Hash alg which should be used to calculate a checksum over the uploaded content. ///
overwrite bool /// If true, the local content will overwrite the existing content. ///
update UpdateChecksum
Результат IDocument