about summary refs log tree commit diff
path: root/LibMatrix/StateEvent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/StateEvent.cs')
-rw-r--r--LibMatrix/StateEvent.cs6
1 files changed, 6 insertions, 0 deletions
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();