Skip to content

Commit

Permalink
WIP shell execution and capture, recording, playback
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbilas committed Apr 10, 2024
1 parent 2b5deda commit 2588a70
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 100 deletions.
12 changes: 8 additions & 4 deletions src/Stale.Cli/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@

class Context : IDisposable
{
readonly CancellationTokenSource _cancelSource = new();

public Context()
{
_ansiConsole = new TerminalAnsiConsole(this);
}

public void Dispose()
{
Cancel.Dispose();
_cancelSource.Dispose();
}

public StaleCliArguments Options = null!;
public bool IsVerbose = true;
public CancellationToken CancelToken => _cancelSource.Token;
public bool IsCancellationRequested => _cancelSource.IsCancellationRequested;
public void Cancel() => _cancelSource.Cancel();

public readonly CancellationTokenSource Cancel = new();
public StaleCliArguments Options = null!;
public bool IsVerbose;

public void VerboseLine(string text)
{
Expand Down
Loading

0 comments on commit 2588a70

Please sign in to comment.