stabilizaiton work - projects rework for maintenanceability and ui livening

This commit is contained in:
master
2026-02-03 23:40:04 +02:00
parent 074ce117ba
commit 557feefdc3
3305 changed files with 186813 additions and 107843 deletions

View File

@@ -0,0 +1,53 @@
using StellaOps.AuditPack.Models;
namespace StellaOps.AuditPack.Services;
public sealed partial class AuditBundleWriter
{
private static string? AddRequiredEntry(
List<BundleEntry> entries,
List<BundleFileEntry> files,
List<ArchiveEntry> archiveEntries,
string path,
byte[]? content,
BundleContentType type)
{
return content is null
? null
: AddEntry(entries, files, archiveEntries, path, content, type);
}
private static string? AddOptionalEntry(
List<BundleEntry> entries,
List<BundleFileEntry> files,
List<ArchiveEntry> archiveEntries,
string path,
byte[]? content,
BundleContentType type)
{
return content is null
? null
: AddEntry(entries, files, archiveEntries, path, content, type);
}
private static string AddEntry(
List<BundleEntry> entries,
List<BundleFileEntry> files,
List<ArchiveEntry> archiveEntries,
string path,
byte[] content,
BundleContentType type)
{
var digest = ComputeSha256(content);
entries.Add(new BundleEntry(path, digest, content.Length));
files.Add(new BundleFileEntry
{
RelativePath = path,
Digest = digest,
SizeBytes = content.Length,
ContentType = type
});
archiveEntries.Add(new ArchiveEntry(path, content));
return digest;
}
}