Commit Graph

14 Commits

Author SHA1 Message Date
Loretta c29b3daa0e Refactor JSON/SignalR infra; add full test & benchmark suite
Major overhaul of JSON serialization/deserialization:
- Added AcJsonDeserializationException for clearer error reporting.
- Robust JSON validation, type checking, and double-serialization detection.
- Fast-path primitive (de)serialization for all common .NET types.
- Direct support for Dictionary<TKey, TValue> and improved collection handling.
- Enhanced $id/$ref reference resolution and in-place merging.
- Optimized property metadata caching and filtering.
- Comprehensive error handling with detailed messages.
- Extensive new tests for primitives, collections, references, and error cases.
- Benchmarks for serialization, deserialization, and merge scenarios.

SignalR infrastructure improvements:
- Refactored AcSignalRClientBase/AcWebSignalRHubBase for testability (virtual methods, test constructors).
- Added SignalRRequestModelPool for efficient request/response tracking.
- Improved parameter deserialization and IdMessage handling.
- New tags (PingTag, EchoTag) for SignalR messaging.

New test and benchmark infrastructure for SignalR:
- Shared test models and data factories for DTOs, primitives, and complex graphs.
- In-memory, dependency-free SignalR client/hub for round-trip testing.
- Exhaustive test suites for message processing, method invocation, and edge cases (including prior production bugs with Task<T>).
- Benchmarks for SignalR serialization, deserialization, and round-trip performance.

Other changes:
- Improved TaskHelper.WaitTo/WaitToAsync with more accurate polling and cancellation support.
- ExtensionMethods.InvokeMethod now properly unwraps Task/ValueTask results.
- General code cleanup, improved comments, and removal of obsolete code.
- Project references updated for shared test/benchmark infrastructure.

These changes deliver a robust, high-performance, and fully tested JSON/SignalR (de)serialization system, ready for production and advanced testing scenarios.
2025-12-11 21:25:50 +01:00
Loretta f9dc9a65fb High-performance, thread-safe JSON and data source overhaul
- Introduced AcJsonSerializer/Deserializer: fast, reflection-free, streaming JSON with optimized $id/$ref handling and Base62 IDs.
- Default serialization now uses new serializers; falls back to Newtonsoft for complex cases.
- Extensive type/property caching for performance and thread safety.
- Refactored MergeContractResolver and collection merge logic; all merge/populate operations use centralized caches.
- AcObservableCollection and AcSignalRDataSource are now fully thread-safe and support batch operations.
- SignalResponseMessage<T> supports lazy deserialization and direct JSON access.
- Added comprehensive unit tests and benchmarks for serialization, deserialization, and collection operations.
- Updated .gitignore and solution files; refactored core classes for clarity and performance.
2025-12-09 03:24:51 +01:00
Loretta e91ac08f05 improvements, fixes, etc... 2024-08-12 13:21:34 +02:00
Loretta fc8c8941b8 improvements, fixes, etc... 2024-07-07 08:32:19 +02:00
Loretta e20608ade9 improvements 2024-06-30 07:13:33 +02:00
Loretta 8b11faf10d Implement object params to GetSignalRMessage 2024-06-29 22:29:01 +02:00
Loretta 374b622331 multiple signalr param; improvements, fixes, etc.. 2024-06-21 14:32:10 +02:00
jozsef.b@aycode.com 685c8b1713 improvements, fixes 2024-06-03 07:48:33 +02:00
jozsef.b@aycode.com 0fd78ba482 SignalRServer InvokeMethodByMessageTag is in progress... 2024-05-31 20:52:42 +02:00
jozsef.b@aycode.com 80412a8469 SignalResponseJsonMessage improvements 2024-05-28 08:39:54 +02:00
jozsef.b@aycode.com 60b53a217a improvements, fixes, etc... 2024-05-27 20:38:31 +02:00
jozsef.b@aycode.com 8d9ec4df7a SignalPostJsonDataMessage unescaped PostData 2024-05-27 15:00:50 +02:00
jozsef.b@aycode.com 9c659cc2a8 SignalRMessages improvements 2024-05-27 08:33:12 +02:00
jozsef.b@aycode.com fba3f70947 SignalR improvements, fixes, etc... 2024-05-26 20:42:55 +02:00