Primodel.Sdk.TestKit 2.4.0

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

Primodel.Sdk

Write plugins for Primodel — the governed data platform that maps vendor systems to a canonical model.

A plugin is a normal .NET class library. It adds a source, a target, a format, a SQL dialect or a storage engine to a running Primodel instance, and it ships and upgrades on its own schedule: installing one does not mean redeploying the product.

dotnet add package Primodel.Sdk

A minimal plugin

Two pieces: an adapter, and a package that registers it under a key.

using System.Runtime.InteropServices;
using Primodel.Sdk.Adapters;
using Primodel.Sdk.Jobs;
using Primodel.Sdk.Plugins;
using Primodel.Sdk.Records;

// Settings are yours. They arrive as the flow author wrote them, secrets already resolved.
public sealed class GreetingSettings
{
    public string Name { get; set; } = "world";
    public int Count { get; set; } = 1;
}

public sealed class GreetingSource : IRecordSourceAdapter<GreetingSettings>
{
    public async IAsyncEnumerable<RecordBatch> ReadAsync(
        GreetingSettings settings, IRecordContextPool pool, IJobContext context)
    {
        var records = new RecordContext[settings.Count];
        for (var i = 0; i < settings.Count; i++)
        {
            var record = pool.Rent();
            record.SetString("greeting", $"hello {settings.Name}".AsMemory());
            records[i] = record;
        }

        yield return new RecordBatch(records, records.Length);
        await Task.CompletedTask;
    }
}

public sealed class GreetingPlugin : IPluginPackage
{
    public string Id => "primodel-greeting";      // must match your assembly name
    public string Version => "1.0.0";
    public IReadOnlyCollection<Architecture> SupportedArchitectures => [];   // empty = fully managed
    public PluginActivationMode ActivationMode => PluginActivationMode.Hot;

    public void Register(IPluginRegistrationContext context) =>
        context.Catalog.RegisterRecordSource<GreetingSource, GreetingSettings>("greeting");
}

A flow step naming "greeting" now runs your adapter.

The package id and the assembly name must match. The loader resolves a package's entry assembly as {id}.dll, so a mismatch produces a plugin that installs, verifies, activates — and never loads.

What you can contribute

Register as You implement For
RegisterRecordSource IRecordSourceAdapter<T> reading records from a system
RegisterRecordTarget IRecordTargetAdapter<T> writing records to one
RegisterSource / RegisterTarget ISourceAdapter<T> / ITargetAdapter<T> moving raw bytes
RegisterSourceFormat / RegisterTargetFormat ISourceFormatAdapter<T> / ITargetFormatAdapter<T> parsing and serializing a format
RegisterRecordTransform / RegisterRawTransform the matching transform interface reshaping records or bytes mid-flow

Beyond adapters, IPluginRegistrationContext also takes a SQL dialect, a materialize writer, a stream source provider, a lake provider and a delivery target connection — enough to add a database engine, an object store, or an outbound event broker the product has never heard of.

What the host gives you

A plugin never calls back into Primodel. It asks, through interfaces the SDK declares and the host implements, and takes them by constructor injection:

  • IEgressServices — vet and dial any host a flow's settings name. Use it. An endpoint written into a flow is attacker-reachable in a way a registered connection is not, and this is what applies the operator's allowlist and the cloud-metadata exclusion.
  • ISourceFormatCatalog — parse bytes as whatever format is registered under a key, including formats installed after your plugin shipped.
  • ITradingPartnerEnvelopes — resolve a registered trading partner and allocate its next EDI control numbers.
  • IJobContext — cancellation, paging, quarantine for records you cannot parse.

Testing

dotnet add package Primodel.Sdk.TestKit

Test doubles for the host side — a job context, a recording catalog to assert what your package registers, a source harness that drains an adapter, and stubs for the services above. It tracks the SDK version exactly.

Support and versioning

Pre-release. The SDK is at 0.1.0-alpha, and until 1.0 a contract can change between versions. Pin an exact version and expect to recompile when you move. Semantic versioning applies from 1.0.

Issues and questions: github.com/Wadman-IT/Primodel-SDK. Design notes on what belongs in this contract and why are in docs/design.md.

Licence

Apache-2.0. This SDK is the contract you build against and is deliberately open; Primodel itself and its first-party plugin packages are separately licensed commercial software.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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

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
5.0.0 0 11/21/2026
4.6.0 176 11/19/2026
4.5.0 47 11/19/2026
4.4.0 107 11/18/2026
4.3.0 80 11/18/2026
4.2.0 141 11/17/2026
4.1.2 84 11/17/2026
4.1.1 86 11/17/2026
4.1.0 124 11/17/2026
4.0.0 125 11/16/2026
3.1.2 89 11/12/2026
3.1.1 90 11/9/2026
3.1.0 89 11/9/2026
3.0.0 1,035 10/31/2026
2.4.0 162 10/30/2026
2.3.0 125 10/26/2026
2.2.0 187 10/26/2026
2.1.0 720 10/3/2026
2.0.0 201 10/1/2026
1.1.1 164 9/25/2026
Loading failed