Table of Contents

Class CWPWorkflowHelper

Namespace
Terminal.Gui.App
Assembly
Terminal.Gui.dll

Provides helper methods for executing single-phase and result-producing workflows in the Cancellable Work Pattern (CWP).

public static class CWPWorkflowHelper
Inheritance
CWPWorkflowHelper
Inherited Members

Remarks

Used for workflows that allow customization or cancellation, such as command execution (e.g., RaiseAccepting(ICommandContext?)) or scheme resolution (e.g., GetScheme()). The Execute<T>(Func<ResultEventArgs<T>, bool>, EventHandler<ResultEventArgs<T>>?, ResultEventArgs<T>, Action?) method handles workflows without results, while ExecuteWithResult<TResult>(Func<ResultEventArgs<TResult>, bool>, EventHandler<ResultEventArgs<TResult>>?, ResultEventArgs<TResult>, Func<TResult>) handles workflows producing results.

Methods

ExecuteWithResult<TResult>(Func<ResultEventArgs<TResult>, bool>, EventHandler<ResultEventArgs<TResult>>?, ResultEventArgs<TResult>, Func<TResult>)

Executes a CWP workflow that produces a result, suitable for methods like GetScheme().

Execute<T>(Func<ResultEventArgs<T>, bool>, EventHandler<ResultEventArgs<T>>?, ResultEventArgs<T>, Action?)

Executes a single-phase CWP workflow with a virtual method, event, and optional default action.

See Also