EmbeddedAssetSource class

Namespace Runic.Assets in Runic.Assets 0.23.0

public sealed class EmbeddedAssetSource : IAssetSource

Inherits or implements IAssetSource.

Reads explicitly registered manifest resources without extraction, filesystem access, dynamic code generation, or dependency injection.

Constructors

EmbeddedAssetSource

public EmbeddedAssetSource(Assembly assembly, IEnumerable<EmbeddedAssetRegistration> registrations)

Builds an immutable source from embedded assembly resources.

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

FileNotFoundException

The 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)

Validates metadata and backing content.

Documentation from IAssetSource.ValidateAsync.