Adopted further C# 14 and .NET 10 features (#1158)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-04 14:04:10 +01:00
1 parent f649febf88
commit f0fa1411c8
40 files changed
+545 -56

No files matched your search

@@ -50,7 +50,7 @@ public static class DataBackupWriter
var buffer = new byte[BUFFER_SIZE];
progress?.Report(new(DataBackupPhase.WRITING, 0, totalFiles));
using (var archive = new ZipArchive(target, ZipArchiveMode.Create, leaveOpen: true))
await using (var archive = await ZipArchive.CreateAsync(target, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding: null, token))
{
var settingsEntry = DataBackupContents.ENTRIES.First(entry => entry.Kind is DataBackupEntryKind.SETTINGS);
await using (var settingsStream = new MemoryStream(Encoding.UTF8.GetBytes(sources.SettingsJson), writable: false))
@@ -179,7 +179,7 @@ public static class DataBackupWriter
using var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256);
long size = 0;
await using (var entryStream = entry.Open())
await using (var entryStream = await entry.OpenAsync(token))
{
int read;
while ((read = await source.ReadAsync(buffer, token)) > 0)