TheChest.Core
0.17.2
dotnet add package TheChest.Core --version 0.17.2
NuGet\Install-Package TheChest.Core -Version 0.17.2
<PackageReference Include="TheChest.Core" Version="0.17.2" />
<PackageVersion Include="TheChest.Core" Version="0.17.2" />
<PackageReference Include="TheChest.Core" />
paket add TheChest.Core --version 0.17.2
#r "nuget: TheChest.Core, 0.17.2"
#:package TheChest.Core@0.17.2
#addin nuget:?package=TheChest.Core&version=0.17.2
#tool nuget:?package=TheChest.Core&version=0.17.2
The Chest Core
The Chest Core is a lightweight and extensible library for creating containers, slots, and inventory-like data structures. It provides abstractions and ready-to-use base implementations, allowing to build storage systems.
How does it work
The library revolves around the concepts of Container and Slot. A Container holds multiple Slot objects, and each Slot can store an item. The library provides base implementations and interfaces to simplify the creation of custom containers and slots.
How to use it
Quick Start
using TheChest.Core.Containers;
using TheChest.Core.Slots;
var slots = new ISlot<int>[]
{
new Slot<int>(0),
new Slot<int>(0),
new Slot<int>(5)
};
var container = new Container<int>(slots);
Installation
NuGet
To install the library via Nuget, you can use the following command:
dotnet add package TheChest.Core
DLL
Alternatively, you can download the DLL file and reference it directly in your project.
Usage
Extending the classes
The library provides ready-to-use implementations such as Container<T> and Slot<T>. These can be used directly or extended to add custom behavior. For example:
using TheChest.Core.Containers;
public class MyContainer : Container<int>
{
public MyContainer(ISlot<int>[] items) : base(items)
{
if (items.Length != 10)
throw new System.ArgumentException("Invalid container size");
}
public override int Size
{
get
{
return 10;
}
}
}
using TheChest.Core.Slots;
public class CustomSlot : Slot<string>
{
public CustomSlot(string item) : base(item)
{
}
public override bool IsEmpty => this.content == null;
public override bool IsFull => this.content != null;
}
Implementing interfaces
If you need more control, you can implement the interfaces directly. For example:
using TheChest.Core.Containers.Interfaces;
using TheChest.Core.Slots.Interfaces;
public class MyContainer : IContainer<int>
{
private readonly ISlot<int>[] slots;
public int Size { get; }
public bool IsFull { get; }
public bool IsEmpty { get; }
public MyContainer(ISlot<int>[] slots)
{
if (slots.Length != 10)
throw new System.ArgumentException("Invalid container size");
this.slots = slots ?? throw new ArgumentNullException(nameof(slots));
}
}
using TheChest.Core.Slots.Interfaces;
public class CustomSlot : ISlot<int>
{
protected int? content;
public bool IsEmpty => content == 0;
public bool IsFull => content != 0;
public CustomSlot(int? item)
{
content = item;
}
}
Future Plans
The plans for future versions of The Chest Core are in this GitHub Project Board, with insights into upcoming features, improvements, and release timelines.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TheChest.Core:
| Package | Downloads |
|---|---|
|
TheChest.Inventories
Provides generic collections to inventory management systems. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.17.2 | 0 | 4/11/2026 | |
| 0.17.1 | 0 | 4/11/2026 | |
| 0.17.0 | 172 | 3/13/2026 | |
| 0.16.1 | 130 | 2/24/2026 | |
| 0.16.0 | 130 | 2/17/2026 | |
| 0.15.3 | 129 | 2/15/2026 | |
| 0.15.2 | 375 | 1/16/2026 | |
| 0.15.1 | 379 | 1/5/2026 | |
| 0.15.0 | 368 | 1/5/2026 | |
| 0.14.0 | 1,065 | 11/20/2025 | |
| 0.13.0 | 465 | 11/9/2025 | |
| 0.12.1 | 701 | 9/20/2025 | |
| 0.12.0 | 444 | 9/20/2025 | |
| 0.11.0 | 885 | 9/20/2025 | |
| 0.10.0 | 1,088 | 8/26/2025 | |
| 0.9.1 | 929 | 8/14/2025 | |
| 0.9.0 | 983 | 8/12/2025 | |
| 0.8.0 | 668 | 8/6/2025 | |
| 0.7.1 | 430 | 6/28/2025 | |
| 0.7.0 | 701 | 6/5/2025 |
See CHANGELOG.md for details.