private static async Task <Guid> ReadGuidAsync(IBackupReader reader, string file) { var read = Guid.Empty; await using (var stream = await reader.OpenBlobAsync(file)) { var buffer = new byte[16]; _ = await stream.ReadAsync(buffer); read = new Guid(buffer); } return(read); }
private async Task ReadAssetAsync(DomainId appId, IBackupReader reader, CancellationToken ct) { try { await using (var stream = await reader.OpenBlobAsync(AvatarFile, ct)) { await appImageStore.UploadAsync(appId, stream, ct); } } catch (AssetAlreadyExistsException) { } catch (FileNotFoundException) { } }