Esempio n. 1
0
        /// <inheritdoc />
        public async Task <long?> GetUploadLengthAsync(string fileId, CancellationToken _)
        {
            var firstLine = _fileRepFactory.UploadLength(await InternalFileId.Parse(_fileIdProvider, fileId)).ReadFirstLine(true);

            return(firstLine == null
                ? (long?)null
                : long.Parse(firstLine));
        }
Esempio n. 2
0
        /// <inheritdoc />
        public Task <long?> GetUploadLengthAsync(string fileId, CancellationToken cancellationToken)
        {
            var firstLine = _fileRepFactory.UploadLength(new InternalFileId(fileId)).ReadFirstLine(true);

            return(Task.FromResult(firstLine == null
                ? (long?)null
                : long.Parse(firstLine)));
        }