public void AddFileWithRanges(string remoteName, string localName, Collection<FileRange> fileRanges) { try { if (job3 != null && fileRanges != null) // only supported from IBackgroundCopyJob3 and above { BG_FILE_RANGE[] ranges = new BG_FILE_RANGE[fileRanges.Count]; for (int i = 0; i < fileRanges.Count; i++) { ranges[i] = fileRanges[i]._BG_FILE_RANGE; } this.job3.AddFileWithRanges(remoteName, localName, (uint)fileRanges.Count, ranges); } else { throw new NotSupportedException("IBackgroundCopyJob3"); } } catch (COMException exception) { manager.PublishException(this, exception); } }
internal FileRange(BG_FILE_RANGE fileRange) { this.fileRange = fileRange; }
public FileRange(ulong initialOffset, ulong length) { this.fileRange = new BG_FILE_RANGE(); this.fileRange.InitialOffset = initialOffset; this.fileRange.Length = length; }