SimpleDataCollections 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package SimpleDataCollections --version 1.0.1                
NuGet\Install-Package SimpleDataCollections -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimpleDataCollections" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimpleDataCollections --version 1.0.1                
#r "nuget: SimpleDataCollections, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SimpleDataCollections as a Cake Addin
#addin nuget:?package=SimpleDataCollections&version=1.0.1

// Install SimpleDataCollections as a Cake Tool
#tool nuget:?package=SimpleDataCollections&version=1.0.1                

🌳 SimpleDataCollections Library

The 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! 🚀


🚀 Features

Data Structures 🌲

  • Tree<T>:
    • A flexible, generic tree structure.
    • Supports operations like depth-first and breadth-first traversal, searching, and dynamic manipulation of nodes.
  • LazyTree<T>:
    • Extends Tree<T> with lazy-loading functionality.
    • Load and unload children dynamically from files with optional encryption support.

Security 🛡️

  • Encryption Support:
    • Save and load LazyTree<T> nodes securely using AES or ChaCha20 encryption.
  • Memory Safety:
    • Clears sensitive data from memory after use.

📚 Installation

Install the library via NuGet:

dotnet add package SimpleDataCollections

📝 Usage

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);

📌 Why Choose SimpleDataCollections?

  • Focus on Flexibility: Tailored solutions for hierarchical data needs.
  • Security: Built-in support for encrypted lazy loading and saving.
  • Performance: Efficient traversal and manipulation of nodes.
  • *Ease of Use: Intuitive API for developers.

💡 Examples

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

Contributions are welcome! Feel free to submit issues or pull requests.


🏷️ License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-browser1.0 is compatible.  net8.0-ios was computed.  net8.0-ios18.0 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst18.0 is compatible.  net8.0-macos was computed.  net8.0-macos15.0 is compatible.  net8.0-tvos was computed.  net8.0-tvos18.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 42 1/29/2025
1.0.1 72 1/26/2025
1.0.0 77 1/26/2025

- 🌳 **Data Structures**:
- Tree: A fully-featured generic tree for hierarchical data.
- LazyTree: An extended tree with lazy-loading and unloading capabilities.
- 🔒 **Security**:
- Save and load LazyTree nodes with AES or ChaCha20 encryption.
- 🚀 **Performance**:
- Efficient tree traversal (depth-first and breadth-first).
- Dynamic addition and removal of nodes.
- 📄 **Serialization**:
 - Serialize and deserialize tree structures to and from JSON.