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
파일 보기 프로젝트 열기: OpenDataSpace/CmisSync 1 사용 예제들

공개 메소드들

메소드 설명
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