public GetUploadChunkRequests ( IEnumerable options = null ) : IEnumerable |
||
options | IEnumerable | Options to be applied to each request. |
리턴 | IEnumerable |
/// <inheritdoc/> public async Task <long> GetUploadStatusAsync() { if (_uploadProvider != null && IsUploadCompleted == false) { if (Provider.AuthenticationProvider is MsaAuthenticationProvider) { var remainingRequests = _uploadProvider.GetUploadChunkRequests(); var firstChunck = remainingRequests.First <OneDriveSdk.UploadChunkRequest>(); var status = await _uploadProvider.UpdateSessionStatusAsync(); return(firstChunck.RangeBegin); } } // no more data return(0); }
private IEnumerable<UploadChunkRequest> SetupGetUploadChunksTest(int chunkSize, long totalSize, IEnumerable<string> ranges) { this.uploadSession.Object.NextExpectedRanges = ranges; this.uploadStream = new Mock<Stream>(); this.uploadStream.Setup(s => s.Length).Returns(totalSize); this.StreamSetup(true); var provider = new ChunkedUploadProvider( this.uploadSession.Object, this.client.Object, this.uploadStream.Object, chunkSize); return provider.GetUploadChunkRequests(); }