C# Class CmisSync.Lib.FileTransmission.SimpleFileUploader

Simple file uploader. Takes a given stream and uploads it to the server. Resuming an Upload is not supported.
Inheritance: IFileUploader
Afficher le fichier Open project: OpenDataSpace/CmisSync Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

AppendFile() public méthode

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. ///
Résultat IDocument

Dispose() public méthode

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
Résultat void

Dispose() protected méthode

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.
Résultat void

UploadFile() public méthode

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
Résultat IDocument