RunicOperationClose enum

Namespace Runic.Application.Views in Runic.Application.Views 0.23.0

public enum RunicOperationClose

What a Window's close does to a running operation of the Window. Declare it with RunicOperationCloseAttribute.

Remarks

It applies to operations, the asynchronous commands that a generated client starts with start…, when their Window closes: a close the application makes with IBridgeWindow.CloseAsync, a decided user close, the Window's disposal and the host's shutdown. An operation without a declaration behaves as before 0.19, under every RunicWindowOptions.CloseDrain.

It is independent of RunicOperationRetirement, which applies when a navigation entry retires: RunicOperationRetirement.Cancel still cancels a RunicOperationClose.Durable operation when its entry retires, because that is the content's departure, not the Window's. The client's cancel() still cancels any operation.

This set is closed: it gains values only in a major release.

Values

Default

Default = 0

The close waits for the operation up to its timeout, then asks it to cancel, and the host keeps the Window's scope until it ended. The default, and the behaviour of every operation before 0.19.

Cancel

Cancel = 1

A read-only operation, such as a query, refresh or preview: it is asked to cancel as soon as the close is decided. The close still waits for it to end, within its timeout.

Durable

Durable = 2

Durable work, such as a change to an external system that must not stop halfway: neither a Window's close nor the host's shutdown asks it to cancel. The close waits for it within its timeout or drain; after that the visible window may close, and the Window's scope stays until the operation ended (RunicWindowCloseResult.RemainingDurableWork).