Table of Contents

Class CommonAssetStore

Namespace
Shard.Assets
Assembly
Shard.Assets.dll

Loads and indexes the common assets under a pack's Common/ folder, by name and by hash. If a pre-packed CommonAssetsIndex.hashes sidecar is present it's used directly (no hashing); otherwise every file is SHA-256'd in parallel.

public sealed class CommonAssetStore : ICommonAssetStore
Inheritance
CommonAssetStore
Implements
Inherited Members

Properties

All

public IReadOnlyCollection<CommonAsset> All { get; }

Property Value

IReadOnlyCollection<CommonAsset>

Methods

Load(string)

public void Load(string commonRoot)

Parameters

commonRoot string

Load(string, IAssetSource)

public void Load(string commonRoot, IAssetSource assetSource)

Parameters

commonRoot string
assetSource IAssetSource

TryGetByHash(string, out CommonAsset?)

public bool TryGetByHash(string hash, out CommonAsset? asset)

Parameters

hash string
asset CommonAsset

Returns

bool

TryGetByName(string, out CommonAsset?)

public bool TryGetByName(string name, out CommonAsset? asset)

Parameters

name string
asset CommonAsset

Returns

bool