public sealed class NetworkViewWhere a session's bandwidth is going, and what is inside one snapshot.
Remarks
The panel is NetworkView.vxml; this file exists only to make it public. The markup compiler emits a partial class with no accessibility modifier, which is internal — deliberately, so that a component is not public API by accident — and a panel the editor's diagnostics module constructs from another assembly has to be. One hand-written part is the whole of the mechanism.
⚠ A view and not an instrument. Everything it draws is a property Vixen.Net.Diagnostics already exposes — BandwidthLedger's five tables and its totals, and whatever SnapshotInspector.Inspect makes of a packet — and nothing in Vixen.Net was widened to build it. That is the claim doc 16's diagnostics section rests on, and the panel is what tests it.
⚠ It is a Component rather than a Control, which is a choice and not a constraint. Nothing outside the class reads a part of it: the host wires three delegates and the panel draws itself. A panel with no public parts is exactly what a component is for — see StatisticsView, which made the same call — and a test reaches one through UiDocument.ComponentAt rather than through a tree walk.
Fields and properties (7)
protected override string TagNamepublic static readonly TimeSpan IntervalHow often a reading is taken, however often the document ticks.
public const int RowsHow many rows each column keeps.
public Func<BandwidthLedger?>? SourceWhere the ledger comes from, or when nothing is attached.
public Func<ReplicationRegistry?>? RegistryWhat names the component types in a packet, or .
public Func<ReadOnlyMemory<byte>>? CaptureThe newest snapshot's bytes, exactly as they went on the wire.
public Func<NetworkSession?>? SessionWhere round trip, jitter and the loss counters come from, or .
Methods (4)
protected override void Build(BuildContext ctx)public void Take()Takes a reading now, whether or not the interval has passed.
public void Clear()Forgets everything the ledger has counted, so the next reading is of what follows.
protected override void OnUnmounted()Called when the component leaves the tree, before its effects are disposed.
Used by (3)
- DiagnosticsModuleVixen.Editor.Diagnostics
- DiagnosticsPanelTestsVixen.Editor.App.Tests
- NetworkViewTestsVixen.Editor.Debugger.Tests