Table of Contents

Class AssetIndex

Namespace
VpnHood.AppUi.Common
Assembly
VpnHood.AppUi.Common.dll

Provides the names of the files in a folder of the UI's content store, as the store declares them in an index.

public static class AssetIndex
Inheritance
AssetIndex
Inherited Members

Methods

ReadAsync(IAssetProvider, string, CancellationToken)

Reads a folder's index.

public static Task<IReadOnlyList<string>> ReadAsync(IAssetProvider assets, string indexPath, CancellationToken cancellationToken)

Parameters

assets IAssetProvider

The UI's content store.

indexPath string

The index's path in the store.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<IReadOnlyList<string>>

A task whose result is the names the index lists.

Exceptions

OperationCanceledException

cancellationToken was canceled.

JsonException

The index cannot be read.

AssetNotFoundException

The store has no such index.