2025-08-02 10:48:31 +08:00
|
|
|
|
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<ClassA>();
|
|
|
|
|
|
sereinWebSocketService.AddHandleModule<ClassB>(() => new ClassB());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-02 12:09:36 +08:00
|
|
|
|
|
2025-08-02 10:48:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|