mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
33 lines
811 B
C#
33 lines
811 B
C#
using System;
|
|
using System.Threading;
|
|
|
|
namespace Wabbajack.DTOs.Interventions;
|
|
|
|
|
|
public interface IUserIntervention
|
|
{
|
|
|
|
}
|
|
/// <summary>
|
|
/// Defines a message that requires user interaction. The user must perform some action
|
|
/// or make a choice.
|
|
/// </summary>
|
|
public interface IUserIntervention<TRet> : IUserIntervention
|
|
{
|
|
/// <summary>
|
|
/// The user didn't make a choice, so this action should be aborted
|
|
/// </summary>
|
|
void Cancel();
|
|
|
|
/// <summary>
|
|
/// Whether the interaction has been handled and no longer needs attention
|
|
/// </summary>
|
|
bool Handled { get; }
|
|
|
|
/// <summary>
|
|
/// Token that can be used to trigger cancellation when Cancel() is called.
|
|
/// </summary>
|
|
public CancellationToken Token { get; }
|
|
|
|
void SetException(Exception exception);
|
|
} |