Table of Contents

Class CommonAsset

Namespace
Shard.Assets
Assembly
Shard.Assets.dll

A content-addressed common asset (System B: raw client media under a pack's Common/). Identity is its forward-slash relative Name plus the lowercase-hex SHA-256 Hash of its bytes. Bytes are read lazily via ReadBytes().

public sealed class CommonAsset
Inheritance
CommonAsset
Inherited Members

Constructors

CommonAsset(string, string, long, string, IAssetSource)

A content-addressed common asset (System B: raw client media under a pack's Common/). Identity is its forward-slash relative Name plus the lowercase-hex SHA-256 Hash of its bytes. Bytes are read lazily via ReadBytes().

public CommonAsset(string name, string hash, long size, string path, IAssetSource source)

Parameters

name string
hash string
size long
path string
source IAssetSource

Properties

Hash

Lowercase 64-char hex SHA-256 of the file bytes.

public string Hash { get; }

Property Value

string

Name

Forward-slash path relative to the common root — the asset's stable name.

public string Name { get; }

Property Value

string

Size

Byte length on disk.

public long Size { get; }

Property Value

long

Methods

ReadBytes()

public byte[] ReadBytes()

Returns

byte[]