Refactor AcBinaryHubProtocol for thread safety - Removed shared _currentHeaderContext; header context is now passed as a parameter through Parse* and ReadArguments/ReadSingleArgument methods, and stored per-binder for chunked messages. - Updated AyCodeBinaryHubProtocol to use the new header context flow for type resolution and argument deserialization. - Added concurrency tests to verify protocol instance safety under multi-threaded use and prevent state corruption or type resolution races. - Improved documentation and comments to clarify the stateless, concurrency-safe design. |
||
|---|---|---|
| .. | ||
| LoginServices | ||
| SignalRs | ||
| AyCode.Services.Server.Tests.csproj | ||
| InvokeMethodExtensionTests.cs | ||
| README.md | ||
| TestLogger.cs | ||
README.md
AyCode.Services.Server.Tests
@project { type = "test" }
Comprehensive server-side tests for SignalR communication, DataSource operations, login services, and reflection-based method invocation.
Folder Structure
| Folder | Purpose |
|---|---|
SignalRs/ |
Full SignalR client→hub→service test infrastructure |
LoginServices/ |
Login service test base classes |
Key Files (Root)
TestLogger.cs— Re-exports TestLogger from AyCode.Core.Tests.InvokeMethodExtensionTests.cs— Tests MethodInfo.InvokeMethod: sync, async Task unwrapping, Task.FromResult (production bug fix), non-generic Task, complex objects.