From 2d606c5de5382abc6a97abb8c64d37023aeb30b9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Feb 2026 20:01:22 +0000 Subject: [PATCH] Fix misleading docs claiming List is serializable by MobileFormatter Remove List from SerializationInfo supported types lists across multiple docs. Standard .NET collection types like List and Dictionary are not directly serializable - users should use MobileList or MobileDictionary from Csla.Core instead. Related to MarimerLLC/csla#4680 https://claude.ai/code/session_011R3Y2CSgCZrDwdVacjARaW --- csla-examples/CustomSerializers.md | 3 ++- csla-examples/v10/CustomSerializers.md | 5 +++-- csla-examples/v9/PocoSerialization.md | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/csla-examples/CustomSerializers.md b/csla-examples/CustomSerializers.md index 8a9919a..a81c10b 100644 --- a/csla-examples/CustomSerializers.md +++ b/csla-examples/CustomSerializers.md @@ -179,7 +179,8 @@ The `SerializationInfo` class can store the following "primitive" types: - `Guid` - `byte[]` - `char[]` -- `List` (and other primitive type lists) + +> ⚠️ Standard .NET collection types such as `List` and `Dictionary` are _not_ directly serializable by `MobileFormatter`. Use `MobileList` or `MobileDictionary` from `Csla.Core` for serializable collections, or register a custom serializer for your collection type. ## Common Scenarios diff --git a/csla-examples/v10/CustomSerializers.md b/csla-examples/v10/CustomSerializers.md index f8b5575..bf260d9 100644 --- a/csla-examples/v10/CustomSerializers.md +++ b/csla-examples/v10/CustomSerializers.md @@ -97,10 +97,11 @@ The `SerializationInfo` class can store these primitive types: | Text | `string`, `char`, `char[]` | | Boolean | `bool` | | Date/Time | `DateTime`, `DateTimeOffset`, `TimeSpan`, `DateOnly`, `TimeOnly` | -| Other | `Guid`, `byte[]` | -| Collections | `List` of primitive types | +| Other | `Guid`, `byte[]`, `char[]` | | Nullable | Nullable versions of all above types | +> ⚠️ Standard .NET collection types such as `List` and `Dictionary` are _not_ directly serializable by `MobileFormatter`. Use `MobileList` or `MobileDictionary` from `Csla.Core` for serializable collections, or register a custom serializer for your collection type. + For complex types, serialize them as JSON strings or implement child object handling. ## Handling Complex Types diff --git a/csla-examples/v9/PocoSerialization.md b/csla-examples/v9/PocoSerialization.md index 1213b97..f832c49 100644 --- a/csla-examples/v9/PocoSerialization.md +++ b/csla-examples/v9/PocoSerialization.md @@ -242,9 +242,10 @@ The `SerializationInfo` class can store these "primitive" types directly: - `Guid` - `byte[]` - `char[]` -- `List` (and other primitive type lists) - Nullable versions of the above types +> ⚠️ Standard .NET collection types such as `List` and `Dictionary` are _not_ directly serializable by `MobileFormatter`. Use `MobileList` or `MobileDictionary` from `Csla.Core` for serializable collections, or register a custom serializer for your collection type. + For complex types (objects, lists of objects), use the child object methods. ## Best Practices