using AyCode.Services.SignalRs; using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR.Protocol; namespace AyCode.Services.Server.Tests.SignalRs; /// /// Test IInvocationBinder that returns OnReceiveMessage parameter types /// for protocol deserialization: (int messageTag, int? requestId, SignalParams signalParams, object data). /// internal class TestInvocationBinder : IInvocationBinder { private static readonly Type[] OnReceiveMessageTypes = [typeof(int), typeof(int?), typeof(SignalParams), typeof(object)]; public IReadOnlyList GetParameterTypes(string methodName) => OnReceiveMessageTypes; public Type GetReturnType(string invocationId) => typeof(object); public Type GetStreamItemType(string streamId) => typeof(object); }