using System.Threading.Channels; using ZB.MOM.WW.MxGateway.Contracts.Proto; namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs; /// /// A live in-process feed of one session's dashboard-mirrored MxEvents, handed /// out by . Server-side /// Blazor components read it directly instead of looping back through /// over a loopback SignalR connection. /// /// /// Events are delivered exactly as a hub client would see them — the same /// redacted clone the group send carries, so MxGateway:Dashboard:ShowTagValues /// governs both paths identically. The feed is a bounded, lossy queue: a /// consumer that falls behind loses the oldest queued events, matching the /// best-effort contract the SignalR mirror already has. Disposing the /// subscription deregisters it, which is what lets the broadcaster go back to /// skipping all mirror work for a session nobody is watching — so callers must /// dispose. Dispose is idempotent. /// public interface IDashboardEventSubscription : IDisposable { /// Gets the reader delivering this session's mirrored events. ChannelReader Reader { get; } }