using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Serein.Proto.WebSocket { public class ClassA : ISocketHandleModule { } public class ClassB : ISocketHandleModule { } public class ClassC : ISocketHandleModule { } internal class TestClass { public void Run() { SereinWebSocketService sereinWebSocketService = new SereinWebSocketService(); sereinWebSocketService.AddHandleModule(); sereinWebSocketService.AddHandleModule(() => new ClassB()); sereinWebSocketService.TrackUnhandledExceptions(OnExceptionTrackingAsync); } private static async Task OnExceptionTrackingAsync(Exception ex, Func SendAsync) { await SendAsync(""); } } }