CSharpTest.BPlusTree 0.0.13

dotnet add package CSharpTest.BPlusTree --version 0.0.13
                    
NuGet\Install-Package CSharpTest.BPlusTree -Version 0.0.13
                    
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="CSharpTest.BPlusTree" Version="0.0.13" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSharpTest.BPlusTree" Version="0.0.13" />
                    
Directory.Packages.props
<PackageReference Include="CSharpTest.BPlusTree" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CSharpTest.BPlusTree --version 0.0.13
                    
#r "nuget: CSharpTest.BPlusTree, 0.0.13"
                    
#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.
#:package CSharpTest.BPlusTree@0.0.13
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CSharpTest.BPlusTree&version=0.0.13
                    
Install as a Cake Addin
#tool nuget:?package=CSharpTest.BPlusTree&version=0.0.13
                    
Install as a Cake Tool

CSharpTest.BPlusTree

A B+Tree implementation in C# with an IDictionary<TKey,TValue> interface. Originally forked from CSharpTest.Net.Collections but cleared of most code not relevant to BPlusTree.

This fork has a modified serialization interface based on System.Buffers and a new storage implementation bases on RandomAccess. The storage format is not compatible with the original implementation.

Example

var dataFile = Path.GetTempFileName();
var tempDir = new DirectoryInfo(Path.GetTempPath());

//Create a BPlusTree with with all temp files and when they where updated and use dataFile as storage. 
using (var tree = BPlusTree.Create(PrimitiveSerializer.String, PrimitiveSerializer.DateTime, dataFile))
{
	foreach (var file in tempDir.GetFiles("*", SearchOption.AllDirectories))
		tree.Add(file.FullName, file.LastWriteTimeUtc);
}

//Create a new BPlusTree with the previously created dataFile and check what files have changed.
using (var tree = BPlusTree.Create(PrimitiveSerializer.String, PrimitiveSerializer.DateTime, dataFile))
{
	foreach (var file in tempDir.GetFiles("*", SearchOption.AllDirectories))
	{
		if (!tree.TryGetValue(file.FullName, out DateTime cmpDate))
			Console.WriteLine("New file: {0}", file.FullName);
		else if (cmpDate != file.LastWriteTimeUtc)
			Console.WriteLine("Modified: {0}", file.FullName);
		tree.Remove(file.FullName);
	}
	foreach (var item in tree)
		Console.WriteLine("Removed: {0}", item.Key);
}
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CSharpTest.BPlusTree:

Package Downloads
CSharpTest.BPlusTree.MemoryPack

A MemoryPack serializer implementation for CSharpTest.BPlusTree

CSharpTest.BPlusTree.MessagePack

A MessagePack serializer implementation for CSharpTest.BPlusTree

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.13 179 11/5/2025
0.0.12 186 11/3/2025
0.0.11 253 10/30/2025
0.0.10 183 10/28/2025
0.0.9 179 10/28/2025
0.0.8 175 10/28/2025
0.0.7 174 10/28/2025
0.0.6 179 10/28/2025