about summary refs log tree commit diff
path: root/MatrixContentFilter/Abstractions
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-10-04 19:51:44 +0200
committerRory& <root@rory.gay>2024-10-04 19:51:44 +0200
commitc8f7ef7c1d2bd705a5442c0dc591b8e5a50673a5 (patch)
tree9b951c6e2c120ec370ce8318238aadbdda880a89 /MatrixContentFilter/Abstractions
downloadMatrixContentFilter-github/master.tar.xz
Initial commit github/master
Diffstat (limited to 'MatrixContentFilter/Abstractions')
-rw-r--r--MatrixContentFilter/Abstractions/IContentFilter.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/MatrixContentFilter/Abstractions/IContentFilter.cs b/MatrixContentFilter/Abstractions/IContentFilter.cs
new file mode 100644

index 0000000..108030b --- /dev/null +++ b/MatrixContentFilter/Abstractions/IContentFilter.cs
@@ -0,0 +1,27 @@ +using System.Diagnostics; +using LibMatrix; +using LibMatrix.Responses; +using MatrixContentFilter.EventTypes; + +namespace MatrixContentFilter.Abstractions; + +public abstract class IContentFilter +{ + public virtual Task ProcessSyncAsync(SyncResponse syncEvent) { + var type = this.GetType().FullName; + Console.WriteLine($"WARNING: {type} does not implement ProcessSyncAsync(SyncResponse syncEvent)"); + if(Debugger.IsAttached) + Debugger.Break(); + return Task.CompletedTask; + } + + public virtual Task ProcessEventListAsync(List<StateEventResponse> events) { + var type = this.GetType().FullName; + Console.WriteLine($"WARNING: {type} does not implement ProcessEventListAsync(List<StateEventResponse> events)"); + if(Debugger.IsAttached) + Debugger.Break(); + return Task.CompletedTask; + } + + public int ActionCount { get; set; } = 0; +} \ No newline at end of file