public async Task <string> DownloadToTemp(R2PackagePart part, CancellationToken cancelTkn) { var byts = await _client.GetBytes <PartContentsByHash1>(cancelTkn, part.PartHash); if (byts == null) { throw Fault.NullRef <byte[]>("_client.GetBytes<PartContentsByHash1>"); } if (byts.Length == 0) { throw Fault.NoItems("byte[] from _client.GetBytes<PartContentsByHash1>()"); } return(_fileIO.WriteTempFile(byts)); }