Commit Graph

50 Commits

Author SHA1 Message Date
Loretta 8e7869b3da Improve JSON deserialization and observable collection handling
- Add batch update support for IAcObservableCollection during deserialization to suppress per-item notifications and fire a single reset event.
- Throw AcJsonDeserializationException with a clear message if a type lacks a parameterless constructor during deserialization.
- Enhance IsGenericCollectionType to recognize more collection types, including ObservableCollection<T> and custom IList<T> implementations.
- Improve array and collection deserialization logic to better handle target types and fall back to List<T> if needed.
- In AcObservableCollection, catch and ignore ObjectDisposedException in event handlers to prevent errors from disposed subscribers.
- Remove redundant batch update logic from AcSignalRDataSource; rely on deserializer's handling.
- Set SkipNegotiation = true in SignalR client options for WebSockets-only optimization and comment out automatic HubConnection.StartAsync() for more controlled connection management.
2025-12-11 23:46:30 +01:00
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 166d97106d Enhance JSON handling and add hybrid reference support
- Updated all projects to use `Newtonsoft.Json` v13.0.3 for consistency.
- Introduced `HybridReferenceResolver` for semantic and numeric ID handling.
- Refactored `SerializeObjectExtensions` to support deep JSON merging.
- Simplified `IId<T>` interface by removing `IEquatable<T>` constraint.
- Improved `AcSignalRDataSource` with robust `AddRange` and `CopyTo` methods.
- Added `JsonExtensionTests` for deep hierarchy, reference, and edge cases.
- Implemented `UnifiedMergeContractResolver` for custom JSON behavior.
- Optimized type/property caching with `TypeCache` and `CachedPropertyInfo`.
- Enhanced SignalR integration to fix primitive array deserialization issues.
- Introduced `JsonNoMergeCollection` attribute for replace-only collections.
- Added test DTOs and `TestDataFactory` for real-world scenario simulations.
- Improved performance with `ConcurrentDictionary` and `ObjectPool`.
- Fixed `$id`/`$ref` handling for non-semantic references and arrays.
2025-12-08 15:50:48 +01:00
Loretta f3ec941774 microsoft packages update 2025-12-01 16:18:36 +01:00
Loretta 2ecc7b1a7a improvements, fixes 2025-11-26 09:42:00 +01:00
Loretta a67bd4f698 improvements 2025-11-21 16:29:05 +01:00
Loretta a724fce2f6 improvements 2025-11-21 07:20:35 +01:00
Loretta e0666027b3 improvements, fixes 2025-11-20 08:30:37 +01:00
Loretta 545b543abe fixes 2025-11-12 17:19:45 +01:00
Loretta bb3cc3c37c CollectionExtensions UpdateCollectionById<TId> 2025-11-07 14:10:30 +01:00
Loretta a24f0c1681 SignalR improvements; 2025-10-30 14:55:47 +01:00
Loretta ecdd922be2 AcLoggerBase get AppConfiguration fix 2025-10-22 06:46:30 +02:00
Loretta 0ee715ed97 improvements 2025-10-21 15:15:15 +02:00
Loretta a56f96903e nuget packages update 2025-10-20 16:45:31 +02:00
Loretta 1a73253867 nuget packages update 2025-09-19 14:42:54 +02:00
Loretta 9673b629c6 Implement SignalRLoggerClient 2025-09-02 11:48:05 +02:00
Loretta 77a6f26a5c AcSignalRClient; AcBrowserLogWriter... 2025-09-01 16:19:01 +02:00
Loretta 2edc099017 Add .targets file 2025-08-31 13:07:34 +02:00
Loretta d1ff3af365 Add SignalR common services and dependencies 2025-08-31 12:39:47 +02:00
Loretta af2eb897f1 build outputpath set to "bin\FruitBank\" 2025-08-28 14:53:12 +02:00
Loretta 6bea2c458d packages update 2025-08-28 14:03:40 +02:00
Loretta ff59d2c2df upgrade to net9.0 2025-08-28 13:58:55 +02:00
Loretta 1ed0ed347f ... 2024-10-29 10:52:35 +01:00
Loretta 4b9fff9521 updates 2024-10-28 14:02:06 +01:00
Loretta f0928b3b96 improvements, fixes 2024-08-31 19:37:50 +02:00
Loretta e9af9b1f1f .net packages update to 8.0.8; fixes, etc... 2024-08-14 16:05:32 +02:00
Loretta 4cd37c39df ForgotPassword 2024-08-02 17:58:19 +02:00
Loretta 30c0e69144 ChangePassword 2024-08-01 15:37:20 +02:00
Adam b250b78e9c nullcheck on refId 2024-07-29 09:18:59 +02:00
Adam b704d05f4e Fix saving referralId on user create 2024-07-29 09:17:16 +02:00
Loretta 956aaa2db6 json fix 2024-07-18 19:20:51 +02:00
Loretta fc8c8941b8 improvements, fixes, etc... 2024-07-07 08:32:19 +02:00
jozsef.b@aycode.com 4f736312cc Microsoft packages update 2024-05-29 16:16:00 +02:00
jozsef.b@aycode.com 6fefa1e9d9 Add Profile to ServiceProvider; ServiceProvider to Company in progress... 2024-05-26 09:12:37 +02:00
jozsef.b@aycode.com 4ce3ffea84 improvements, fixes, etc 2024-05-25 22:16:22 +02:00
jozsef.b@aycode.com 20b1ab4cf2 SignalR logger 2024-05-22 11:22:32 +02:00
jozsef.b@aycode.com 986e70bfe5 refactroing, improvements, fixes, etc... 2024-05-18 05:12:23 +02:00
jozsef.b@aycode.com 602975ab29 Add Logger 2024-05-14 13:04:01 +02:00
jozsef.b@aycode.com c1b0fcd0d7 refactoring, improvements, fixes... 2024-05-03 15:37:41 +02:00
jozsef.b@aycode.com 93482b5ba6 refactoring, improvements, fixes, etc... 2024-05-01 08:08:14 +02:00
jozsef.b@aycode.com a05153b267 Refactoring EmailMessage, EmailRecipient, MessageSenderService, etc... 2024-04-27 19:06:15 +02:00
jozsef.b@aycode.com 7360291242 refactoring, improvements... 2024-04-24 06:50:45 +02:00
jozsef.b@aycode.com 2cbc51b143 refactoring, improvements, fixes, etc... 2024-04-23 14:46:37 +02:00
jozsef.b@aycode.com daf35ebf04 Login, Register, ProjectSalt, PasswordHash, meg a faszom sem tudja már... 2024-04-22 17:29:35 +02:00
jozsef.b@aycode.com 091c0c10fc Update EfCore, MstTest, SendGrid, etc packages 2024-03-29 06:55:31 +01:00
jozsef.b@aycode.com bb03b762bc Update efcore to 8.0.1 2024-01-24 15:44:29 +01:00
Adam 905347552a message, entities, ImessageService 2023-11-28 14:52:24 +01:00
jozsef.b@aycode.com 64c571ef9a dependecies fix 2023-11-27 17:17:32 +01:00
jozsef.b@aycode.com 3a14f8efb4 add models, services project; update to .net8, efcore8; etc... 2023-11-27 17:00:54 +01:00