Table of Contents

Class ContentDocuments

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

Provides the long-form documents of the UI's content store, with the product's names filled in.

public static class ContentDocuments
Inheritance
ContentDocuments
Inherited Members

Methods

LoadAsync(IAssetProvider, string, CancellationToken)

Loads a document in the app's language, else in its language alone, else in English, with the product's names filled in.

public static Task<string> LoadAsync(IAssetProvider assets, string name, CancellationToken cancellationToken)

Parameters

assets IAssetProvider

The UI's content store.

name string

The document's name.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<string>

A task whose result is the document's text.

Exceptions

OperationCanceledException

cancellationToken was canceled.

InvalidOperationException

The store has no such document, not even in English, or the app's state has not been read (Init(VpnHoodApi, CancellationToken)).