Table of Contents

Interface IWebViewPageHost

Namespace
VpnHood.AppUi.Hosting.WebView
Assembly
VpnHood.AppUi.Hosting.WebView.dll

Defines the server the web view's page comes from: the address to load, and word when the server is bound again.

public interface IWebViewPageHost

Remarks

It is the app's own web host where the app runs in this process (AppWebViewPageHost), and on a desktop the address the service hands the window.

Methods

EnsureStarted(CancellationToken)

Gets the address to load: a server the platform owns is started, or checked, by the time it returns; a desktop's is the address the service last handed over.

Task<Uri> EnsureStarted(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<Uri>

A task whose result is the address.

Remarks

A later call is the caller's own sign that the server is unreachable, which may cost the server a real connect check.

Exceptions

InvalidOperationException

The platform's own server could not bind.

ObjectDisposedException

The platform's own server was disposed.

OperationCanceledException

cancellationToken was canceled.

Events

Restarted

Occurs when the server is bound again under a loaded page, maybe at another address, so what the page loaded may be half fetched; it may be raised on any thread.

event EventHandler? Restarted

Event Type

EventHandler