feat(diagnostics): ITraceSink seam + TraceEvent + Null/Text sinks

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-07-07 15:19:40 -04:00
parent 6981bd0e41
commit 10cf79a41b
5 changed files with 144 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
namespace Age.Engine.Diagnostics;
/// <summary>The inert default: no step tracing, empty Emit. Supplying this (or null) to the VM
/// guarantees byte-identical behavior.</summary>
public sealed class NullTraceSink : ITraceSink
{
public static readonly NullTraceSink Instance = new();
private NullTraceSink() { }
public bool TracingSteps => false;
public void Emit(in TraceEvent e) { }
}