From c8f7ef7c1d2bd705a5442c0dc591b8e5a50673a5 Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 4 Oct 2024 19:51:44 +0200 Subject: Initial commit --- MatrixContentFilter/Abstractions/IContentFilter.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 MatrixContentFilter/Abstractions/IContentFilter.cs (limited to 'MatrixContentFilter/Abstractions') 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 events) { + var type = this.GetType().FullName; + Console.WriteLine($"WARNING: {type} does not implement ProcessEventListAsync(List events)"); + if(Debugger.IsAttached) + Debugger.Break(); + return Task.CompletedTask; + } + + public int ActionCount { get; set; } = 0; +} \ No newline at end of file -- cgit 1.5.1