IBridgeWindow interface

Namespace Runic.Application.Views · Runic.Application 0.7.0-preview.5

public interface IBridgeWindow : IAsyncDisposable

Inherits or implements IAsyncDisposable.

The lifetime contract shared by every Window host adapter, such as CsWebUiBridgeWindow<TViewModel> and DesktopBridgeWindow<TViewModel>.

Remarks

Hosts release asynchronously: accepted operations may still be running when the visible window closes, and the Window's DI scope stays alive until they finish. IAsyncDisposable.DisposeAsync closes immediately and returns after every resource has been released.

Methods

CloseAsync

ValueTask<BridgeWindowCloseResult> CloseAsync(TimeSpan timeout)

Stops new operation admission and waits up to timeout for accepted work. At the timeout the visible window and its browser routes close promptly, while the host keeps its scope until the remaining operations finish. The first call selects the timeout; later calls return the same result.

Exceptions

ArgumentOutOfRangeException

timeout is negative and not infinite.