From 150c6b03003ca97192b65a274c5234b04e32b2ac Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 23 Jul 2025 09:03:42 +0200 Subject: Add debugger displays to summarise SummaryDataStructure and EventList, hide ClassNeverInstantiated warning for EventContent implementations --- LibMatrix/Responses/SyncResponse.cs | 2 ++ LibMatrix/StateEvent.cs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'LibMatrix') diff --git a/LibMatrix/Responses/SyncResponse.cs b/LibMatrix/Responses/SyncResponse.cs index d79e820..657d7e0 100644 --- a/LibMatrix/Responses/SyncResponse.cs +++ b/LibMatrix/Responses/SyncResponse.cs @@ -1,3 +1,4 @@ +using System.Diagnostics; using System.Text.Json.Serialization; using LibMatrix.EventTypes.Spec.State.RoomInfo; @@ -138,6 +139,7 @@ public class SyncResponse { public int HighlightCount { get; set; } } + [DebuggerDisplay("{JoinedMemberCount} joined, {InvitedMemberCount} invited, Heroes: {string.Join(\", \", Heroes ?? [])}")] public class SummaryDataStructure { [JsonPropertyName("m.heroes")] public List? Heroes { get; set; } diff --git a/LibMatrix/StateEvent.cs b/LibMatrix/StateEvent.cs index af25805..aa755ef 100644 --- a/LibMatrix/StateEvent.cs +++ b/LibMatrix/StateEvent.cs @@ -1,4 +1,5 @@ using System.Collections.Frozen; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Text.Json; @@ -174,6 +175,7 @@ public class StateEventResponse : StateEvent { [JsonSerializable(typeof(ChunkedStateEventResponse))] internal partial class ChunkedStateEventResponseSerializerContext : JsonSerializerContext; +[DebuggerDisplay("{Events.Count} events")] public class EventList { public EventList() { } -- cgit 1.5.1