SimulationTree.Types.Core 0.3.4

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package SimulationTree.Types.Core --version 0.3.4
                    
NuGet\Install-Package SimulationTree.Types.Core -Version 0.3.4
                    
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="SimulationTree.Types.Core" Version="0.3.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimulationTree.Types.Core" Version="0.3.4" />
                    
Directory.Packages.props
<PackageReference Include="SimulationTree.Types.Core" />
                    
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 SimulationTree.Types.Core --version 0.3.4
                    
#r "nuget: SimulationTree.Types.Core, 0.3.4"
                    
#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 SimulationTree.Types.Core@0.3.4
                    
#: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=SimulationTree.Types.Core&version=0.3.4
                    
Install as a Cake Addin
#tool nuget:?package=SimulationTree.Types.Core&version=0.3.4
                    
Install as a Cake Tool

Types

Test

Assists programming with value types in C#.

Initializing

Before types are interacted/accessed, the MetadataRegistry must be initialized by registering the types and interfaces in use:

Type layouts

These store metadata about what fields are found on a type:

namespace Example
{
	public struct Apple
	{
		public byte first;
		public ushort second;
		public Item item;
	}

	public struct Item
	{
		public uint id;
	}
}

TypeMetadata type = TypeMetadata.Get<Apple>();
Assert.That(type.FullName.ToString(), Is.EqualTo("Example.Apple"));
Assert.That(type.Size, Is.EqualTo(7));

ReadOnlySpan<Field> fields = type.Fields;
Assert.That(fields.Length, Is.EqualTo(3));
Assert.That(fields[0].Name.ToString(), Is.EqualTo("first"));
Assert.That(fields[1].Name.ToString(), Is.EqualTo("second"));
Assert.That(fields[2].Name.ToString(), Is.EqualTo("item"));
Assert.That(fields[2].type, Is.EqualTo(TypeMetadata.Get<Item>()));

Type banks

Type banks are generated for every project that references this library. They contain code that registers declared types:

MetadataRegistry.Load<CustomTypeBank>();

public readonly struct CustomTypeBank : ITypeBank
{
    void ITypeBank.Load(Register register)
    {
        register.Invoke<DateTime>();
    }
}

Type registry loaders

These are also generated like type banks. But differ in that they're only generated for projects with an entry point (a static void Main() method). They load all type banks found in the project:

TypeRegistryLoader.Load();
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.
  • net9.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on SimulationTree.Types.Core:

Package Downloads
SimulationTree.Worlds.Core

Native ECS library

SimulationTree.Types

Assists programming with value types

SimulationTree.Simulation.Core

Faciliates event based systems.

SimulationTree.Shapes

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.9 826 9/24/2025
0.3.6 335 9/15/2025
0.3.5 265 9/14/2025
0.3.4 257 9/14/2025
0.3.3 278 9/14/2025