private static async Task WriteGuidAsync(IBackupWriter writer, string file, Guid value)
 {
     await using (var stream = await writer.OpenBlobAsync(file))
     {
         await stream.WriteAsync(value.ToByteArray());
     }
 }
Exemple #2
0
        private async Task WriteAssetAsync(DomainId appId, DomainId assetId, long fileVersion, IBackupWriter writer,
                                           CancellationToken ct)
        {
            try
            {
                var fileName = GetName(assetId, fileVersion);

                await using (var stream = await writer.OpenBlobAsync(fileName, ct))
                {
                    await assetFileStore.DownloadAsync(appId, assetId, fileVersion, null, stream, default, ct);
Exemple #3
0
 private async Task WriteAssetAsync(DomainId appId, IBackupWriter writer,
                                    CancellationToken ct)
 {
     try
     {
         await using (var stream = await writer.OpenBlobAsync(AvatarFile, ct))
         {
             await appImageStore.DownloadAsync(appId, stream, ct);
         }
     }
     catch (AssetNotFoundException)
     {
     }
 }