about summary refs log tree commit diff
path: root/LibMatrix.EventTypes/MatrixEvent.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-30 19:07:09 +0000
committerRory& <root@rory.gay>2024-05-30 19:07:09 +0000
commitcf90f02e1f9c9f7d037976cace2b9c49119c741c (patch)
tree3925bd8d689c3f330c217b0f867ba8a241d893e7 /LibMatrix.EventTypes/MatrixEvent.cs
parentRename legacy event types (diff)
downloadLibMatrix-cf90f02e1f9c9f7d037976cace2b9c49119c741c.tar.xz
Start implementing new event system
Diffstat (limited to 'LibMatrix.EventTypes/MatrixEvent.cs')
-rw-r--r--LibMatrix.EventTypes/MatrixEvent.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/LibMatrix.EventTypes/MatrixEvent.cs b/LibMatrix.EventTypes/MatrixEvent.cs
new file mode 100644
index 0000000..63f1e75
--- /dev/null
+++ b/LibMatrix.EventTypes/MatrixEvent.cs
@@ -0,0 +1,9 @@
+using System.Text.Json.Serialization;
+
+namespace LibMatrix.EventTypes;
+
+public interface IMatrixEvent<out T> where T : MatrixEventContent;
+public class MatrixEvent<T> : IMatrixEvent<T> where T : MatrixEventContent {
+    [JsonPropertyName("content")]
+    public T? Content { get; set; }
+}
\ No newline at end of file