namespace Terminal.Gui.App;
using System;
#pragma warning disable CS1711
///
/// Provides data for events that produce a result in a cancellable workflow in the Cancellable Work Pattern (CWP).
///
///
/// Used for workflows where a result (e.g., outcome, resolution) is
/// being produced or cancelled, such as for methods like .
///
/// The type of the result.
///
///
public class ResultEventArgs
{
///
/// Gets or sets the result of the operation, which may be null if no result is provided.
///
public T? Result { get; set; }
///
/// Gets or sets a value indicating whether the operation has been handled.
/// If true, the operation is considered handled and may use the provided result.
///
public bool Handled { get; set; }
///
/// Initializes a new instance of the class with no initial result.
///
public ResultEventArgs () { }
///
/// Initializes a new instance of the class with an initial result.
///
/// The initial result, which may be null for optional outcomes.
public ResultEventArgs (T? result)
{
Result = result;
}
}
#pragma warning restore CS1711