forked from spectreconsole/spectre.console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/Spectre.Console.Cli/Completion/HighjackedAnsiConsole.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace Spectre.Console.Cli.Completion; | ||
|
||
internal class HighjackedAnsiConsole : IAnsiConsole | ||
{ | ||
public IAnsiConsole OriginalConsole { get; } | ||
|
||
public HighjackedAnsiConsole(IAnsiConsole console) | ||
{ | ||
OriginalConsole = console; | ||
} | ||
|
||
public Profile Profile => OriginalConsole.Profile; | ||
|
||
public IAnsiConsoleCursor Cursor => OriginalConsole.Cursor; | ||
public IAnsiConsoleInput Input => OriginalConsole.Input; | ||
public IExclusivityMode ExclusivityMode => OriginalConsole.ExclusivityMode; | ||
public RenderPipeline Pipeline => OriginalConsole.Pipeline; | ||
|
||
public void Clear(bool home) | ||
{ | ||
} | ||
|
||
public void Write(IRenderable renderable) | ||
{ | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Spectre.Console.Cli/Completion/HighjackedTextWriter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace Spectre.Console.Cli.Completion; | ||
|
||
internal class HighjackedTextWriter : TextWriter | ||
{ | ||
public override Encoding Encoding => Encoding.UTF8; | ||
|
||
public TextWriter OriginalWriter { get; } | ||
|
||
public HighjackedTextWriter(TextWriter originalWriter) | ||
{ | ||
OriginalWriter = originalWriter; | ||
} | ||
|
||
public override void Write(char value) | ||
{ | ||
} | ||
|
||
public override void Write(string? value) | ||
{ | ||
} | ||
|
||
public override void WriteLine(string? value) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters