Clarify MobileFormatter collection type limitations in docs#4822
Merged
rockfordlhotka merged 2 commits intomainfrom Feb 14, 2026
Merged
Clarify MobileFormatter collection type limitations in docs#4822rockfordlhotka merged 2 commits intomainfrom
rockfordlhotka merged 2 commits intomainfrom
Conversation
Remove List<int> from the list of supported SerializationInfo types in the CSLA 9 upgrade guide, and correct the serialization.md claim that List<T> and Dictionary<K,V> are supported. These standard .NET collection types are not directly serializable - users should use MobileList<T> or MobileDictionary<K,V> from Csla.Core instead. Fixes #4680 https://claude.ai/code/session_011R3Y2CSgCZrDwdVacjARaW
CslaBinaryWriter/Reader explicitly handle List<int> (CslaKnownTypes.ListOfInt), so it IS a valid type for use in custom serializers via SerializationInfo.AddValue. Updated the warning to clarify that other generic collection types (List<string>, Dictionary<K,V>, etc.) are not supported. https://claude.ai/code/session_011R3Y2CSgCZrDwdVacjARaW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated documentation to clarify that standard .NET collection types (
List<T>,Dictionary<K,V>, etc.) are not directly serializable byMobileFormatterandSerializationInfo, and to guide users toward appropriate alternatives.Key Changes
serialization.md: Removed misleading statement that
MobileFormattersupportsList<T>andDictionary<K,V>. Added warning box clarifying that standard collection types are not directly serializable and recommendingMobileList<T>,MobileDictionary<K,V>, or custom serializers as alternatives.Upgrading to CSLA 9.md: Added warning box documenting that generic collection types beyond the explicitly supported list (such as
List<string>,Dictionary<K,V>) are not directly serializable bySerializationInfo, with guidance on using CSLA collection types or custom serializers.Details
These documentation updates correct a gap in guidance that could lead developers to attempt using unsupported collection types in serializable business objects. The changes direct users to the proper solutions: CSLA's built-in mobile collection types or custom serializer registration.
https://claude.ai/code/session_011R3Y2CSgCZrDwdVacjARaW