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
assetsIAssetProviderThe UI's content store.
indexPathstringThe index's path in the store.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- Task<IReadOnlyList<string>>
A task whose result is the names the index lists.
Exceptions
- OperationCanceledException
cancellationTokenwas canceled.- JsonException
The index cannot be read.
- AssetNotFoundException
The store has no such index.