namespace Cthangover.Mods.Dialog.Tests
{
using Cthangover.Mods.Dialog.Action;
///
/// Debugger stand-in that holds the runtime once, right before
/// — what the scenario studio does on a breakpoint.
///
public class HoldDebugger : IDialogDebugger
{
private bool held;
/// The action to hold before.
public IActionCommand Target { get; set; }
/// Holds before the first time it is reached.
public bool ShouldHold(DialogRuntime runtime, IActionCommand action)
{
if (held || action != Target)
return false;
held = true;
return true;
}
}
}