Path: redb/redb.Tests.Integration/Models/NestedCollectionModels.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Models/NestedCollectionModels.cs ---- using System.Collections.Generic; using redb.Core.Attributes; namespace redb.Tests.Integration.Models; // A collection directly inside a collection, and a multi-dimensional array: the scheme sync refuses them. The refused // classes carry no [RedbScheme], so that the start of a test service, which syncs every [RedbScheme] class it finds, // does not meet them; their scheme name is the full class name. public class NestedListOfListsProps { public List>? Value { get; set; } } public class NestedJaggedArrayProps { public int[][]? Value { get; set; } } public class NestedListOfArraysProps { public List? Value { get; set; } } public class NestedListOfDictionariesProps { public List>? Value { get; set; } } public class NestedArrayOfDictionariesProps { public Dictionary[]? Value { get; set; } } public class NestedDictionaryOfListsProps { public Dictionary>? Value { get; set; } } public class NestedDictionaryOfDictionariesProps { public Dictionary>? Value { get; set; } } public class NestedMultidimensionalArrayProps { public int[,]? Value { get; set; } } /// A refused property below a class element of a collection: the sync walks into the element class. public class NestedInsideElementProps { public List? Items { get; set; } } public class NestedGridHolder { public string Name { get; set; } = ""; public List>? Grid { get; set; } } // Allowed and pinned: byte[] as an element or value is one value; a collection inside a class element is stored. [RedbScheme("TestNestedBytesCollections")] public class NestedBytesCollectionsProps { public List? Chunks { get; set; } public Dictionary? Blobs { get; set; } } [RedbScheme("TestNestedCollectionInElement")] public class NestedCollectionInElementProps { public List? Items { get; set; } public Dictionary? ByKey { get; set; } } public class NestedTaggedItem { public string Name { get; set; } = ""; public List? Tags { get; set; } public Dictionary? Scores { get; set; } } // The shapes 4.8.0 synced such properties to: a collection of String (of Long for int[,]) with no children. A scheme // synced from these stands for one synced by 4.8.0; a save of the refused class against it must refuse too. [RedbScheme("TestNestedSaveGuardList")] public class NestedSaveGuardListShape { public List? Value { get; set; } } [RedbScheme("TestNestedSaveGuardDictionary")] public class NestedSaveGuardDictionaryShape { public Dictionary? Value { get; set; } } [RedbScheme("TestNestedSaveGuardGrid")] public class NestedSaveGuardGridShape { public List? Value { get; set; } }