SimpleBlackboard.Net 1.0.0.3

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

SimpleBlackboard.Net

Logo

A simple package containing a basic Blackboard data structure.

Installation

Nuget

NuGet version (SimpleBlackboard.Net)

The recommended installation approach is to use the available nuget package: SimpleBlackboard.Net

Clone

Alternatively, you can clone this repo and reference the SimpleBlackboard.Net project in your project.

Features

  • An abstract Blackboard class that can be extended to create custom blackboards.

Usage


using SimpleBlackboard.Net;

public class MyBlackboard : Blackboard
{
    private readonly Dictionary<string, object> _data = new();

    public override bool SetValue<T>(string key, T value)
    {
        _data[key] = value!;
        return true;
    }

    public override T GetValue<T>(string key)
    {
        if (_data.TryGetValue(key, out var value) && value is T typedValue)
        {
            return typedValue;
        }

        return default;
    }
    
    public override bool HasValue<T>(string key)
    {
        return this._data.ContainsKey(key);
    }
    
    public override void ClearBlackboard()
    {
        _data.Clear();
    }
}

public class Program
{
    public static void Main()
    {
        var blackboard = new MyBlackboard();
        
        // Set a value
        blackboard.SetValue("Score", 100);
        
        // Get a value
        int score = blackboard.GetValue<int>("Score");
        Console.WriteLine($"Score: {score}");
        
        // Check if a value exists
        bool hasScore = blackboard.HasValue<int>("Score");
        Console.WriteLine($"Has Score: {hasScore}");
        
        // Clear the blackboard
        blackboard.ClearBlackboard();
    }
}

Development

  1. Clone or fork the repo
  2. Create a new branch
  3. Code!
  4. Push your changes and open a PR
  5. Once approved, they'll be merged in
  6. Profit!

Future Plans

See list of issues under the Milestones: https://github.com/vonderborch/SimpleBlackboard.Net/milestones

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

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
2.1.0.1 140 6/25/2025
2.0.0.4 140 6/24/2025
1.0.0.3 120 6/8/2025