SimpleDataCollections is your go-to solution for advanced data structures in .NET. It provides a variety of tree implementations that are optimized for flexibility, performance, and extensibility. Whether you need hierarchical data or lazy-loaded trees, we've got you covered! ๐
$ dotnet add package SimpleDataCollectionsThe SimpleDataCollections Library is your go-to solution for advanced data structures in .NET. It provides a variety of tree implementations that are optimized for flexibility, performance, and extensibility. Whether you need hierarchical data or lazy-loaded trees, we've got you covered! ๐
Tree<T>:
LazyTree<T>:
Tree<T> with lazy-loading functionality.LazyTree<T> nodes securely using AES or ChaCha20 encryption.Install the library via NuGet:
dotnet add package SimpleDataCollections
Creating a Tree
var tree = new Tree<string>("Root");
tree.AddChild("Child 1");
tree.AddChild("Child 2");
Traversing the Tree
tree.DepthFirstTraverse(node => Console.WriteLine(node.Value));
Using LazyTree
var lazyTree = new LazyTree<string>("Root", "path/to/data.json");
lazyTree.LoadChildrenFromFile(encrypted: true, key: encryptionKey, ivOrNonce: iv);
Finding a Node
var foundNode = tree.FindFirst(value => value == "Child 1");
Console.WriteLine(foundNode?.Value);
Lazy Loading Children
lazyTree.LoadChildrenFromFile(encrypted: true, key: myKey, ivOrNonce: myIv);
lazyTree.UnloadChildren(saveBeforeUnload: true);
Contributions are welcome! Feel free to submit issues or pull requests.
This project is licensed under the MIT License.