From 4bdea63982dae9c17b7a5fbda38d505655b8d4b3 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Thu, 30 May 2024 21:39:12 +0200 Subject: Changes --- LibMatrix/StateEvent.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'LibMatrix/StateEvent.cs') diff --git a/LibMatrix/StateEvent.cs b/LibMatrix/StateEvent.cs index 81ee3fe..3bd0672 100644 --- a/LibMatrix/StateEvent.cs +++ b/LibMatrix/StateEvent.cs @@ -1,6 +1,7 @@ using System.Collections.Frozen; using System.Diagnostics.CodeAnalysis; using System.Reflection; +using System.Runtime.CompilerServices; using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; @@ -54,6 +55,8 @@ public class StateEvent { [JsonIgnore] [SuppressMessage("ReSharper", "PropertyCanBeMadeInitOnly.Global")] public EventContent? TypedContent { + [RequiresDynamicCode("TypedContent requires reflection to deserialize the content of the event.")] + [RequiresUnreferencedCode("TypedContent requires reflection to deserialize the content of the event.")] get { // if (Type == "m.receipt") { // return null; @@ -72,6 +75,9 @@ public class StateEvent { return null; } + + [RequiresDynamicCode("TypedContent requires reflection to deserialize the content of the event.")] + [RequiresUnreferencedCode("TypedContent requires reflection to deserialize the content of the event.")] set { if (value is null) RawContent?.Clear(); -- cgit 1.4.1