AssetDescriptor record

Namespace Runic.Assets · Runic.Assets 0.7.0-preview.5

public sealed record AssetDescriptor : IEquatable<AssetDescriptor>

Inherits or implements IEquatable.

Contains deterministic metadata for one application asset.

Constructors

AssetDescriptor

public AssetDescriptor(string relativePath, string mediaType, long length, string sha256, bool isEntryPoint = false, AssetCacheMode cacheMode = AssetCacheMode.Revalidate)

Initializes asset metadata.

Properties

CacheControl

public string CacheControl { get; }

Gets a transport-neutral HTTP-compatible cache-control value.

CacheMode

public AssetCacheMode CacheMode { get; }

Gets the cache behavior.

EntityTag

public string EntityTag { get; }

Gets a stable strong entity tag derived from the content digest.

IsEntryPoint

public bool IsEntryPoint { get; }

Gets whether the asset is the application's entry document.

Length

public long Length { get; }

Gets the byte length.

MediaType

public string MediaType { get; }

Gets the response media type.

RelativePath

public string RelativePath { get; }

Gets the normalized application-relative path.

Sha256

public string Sha256 { get; }

Gets the lowercase SHA-256 digest.

SubresourceIntegrity

public string SubresourceIntegrity { get; }

Gets the standard SHA-256 Subresource Integrity token for this exact content.