public sealed class AssetArchiveSource : IAssetSource An immutable source loaded from a Runic Assets archive. AssetArchive.Read and AssetArchive.ReadAsync inflate and verify every asset into memory; AssetArchive.ReadEmbedded inflates each asset of an embedded archive when it is first opened.
Properties
Manifest
public AssetManifest Manifest { get; } Gets the current immutable manifest with identity, digest, and cache metadata.
Documentation from IAssetSource.Manifest.
Methods
OpenAsync
public ValueTask<AssetReadSnapshot> OpenAsync(string relativePath, CancellationToken cancellationToken = default) Opens one exact manifest asset with its matching immutable descriptor.
Exceptions
FileNotFoundExceptionThe manifest does not declare
relativePath.
Remarks
The caller owns the snapshot and disposes it, which disposes its content stream.
Documentation from IAssetSource.OpenAsync.
ValidateAsync
public ValueTask ValidateAsync(CancellationToken cancellationToken = default) Checks every asset against its manifest length and SHA-256 digest, inflating the ones not read yet.
Parameters
cancellationTokenCancels the check between assets.
Exceptions
InvalidDataExceptionAn asset does not match its descriptor.