public void Dispose() { if (_partUpload != null) { _partUpload.Dispose(); _partUpload = null; } }
private unsafe uint DoUnsafeUpload(SWIG.UplinkPartUpload partUpload, string objectKey, byte[] partBytes) { fixed(byte *arrayPtr = partBytes) { using (SWIG.UplinkWriteResult sentResult = SWIG.storj_uplink.uplink_part_upload_write(partUpload, new SWIG.SWIGTYPE_p_void(new IntPtr(arrayPtr), true), (uint)partBytes.Length)) { if (sentResult.error != null && !string.IsNullOrEmpty(sentResult.error.message)) { throw new MultipartUploadFailedException(objectKey, sentResult.error.message); } using (var commitResult = SWIG.storj_uplink.uplink_part_upload_commit(partUpload)) { if (commitResult != null && !string.IsNullOrEmpty(commitResult.message)) { throw new MultipartUploadFailedException(objectKey, commitResult.message); } return(sentResult.bytes_written); } } } }
internal PartUploadResult(SWIG.UplinkPartUpload partUpload) { PartUpload = new PartUpload(partUpload); }
internal PartUpload(SWIG.UplinkPartUpload partUpload) { _partUpload = partUpload; }