forked from bit/DotRecastNetSim
remove ConsoleTextWriterHook
This commit is contained in:
parent
16c685ae85
commit
36eb495ea7
|
@ -1,22 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace DotRecast.Recast.Demo.Tools;
|
|
||||||
|
|
||||||
public class ConsoleTextWriterHook : TextWriter
|
|
||||||
{
|
|
||||||
public override Encoding Encoding => Encoding.UTF8;
|
|
||||||
private readonly Action<string> _event;
|
|
||||||
|
|
||||||
public ConsoleTextWriterHook(Action<string> relay)
|
|
||||||
{
|
|
||||||
_event = relay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Write(char[] buffer, int index, int count)
|
|
||||||
{
|
|
||||||
var s = new string(new Span<char>(buffer, index, count));
|
|
||||||
_event?.Invoke(s);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue