Tessellate.Foundations 1.0.45-preview

This is a prerelease version of Tessellate.Foundations.
dotnet add package Tessellate.Foundations --version 1.0.45-preview
                    
NuGet\Install-Package Tessellate.Foundations -Version 1.0.45-preview
                    
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="Tessellate.Foundations" Version="1.0.45-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tessellate.Foundations" Version="1.0.45-preview" />
                    
Directory.Packages.props
<PackageReference Include="Tessellate.Foundations" />
                    
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 Tessellate.Foundations --version 1.0.45-preview
                    
#r "nuget: Tessellate.Foundations, 1.0.45-preview"
                    
#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 Tessellate.Foundations@1.0.45-preview
                    
#: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=Tessellate.Foundations&version=1.0.45-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Tessellate.Foundations&version=1.0.45-preview&prerelease
                    
Install as a Cake Tool

Tessellate.Foundations

Core abstractions for the Tessellate microservice framework. This package is pulled in automatically as a dependency of Tessellate — you only need to reference it directly when building a Tessellate module or provider.

What's included

Namespace Purpose
Tessellate.Foundations ITessellateModule — the plugin interface all modules implement
Tessellate.Foundations.Configuration ISettings — cached, TTL-backed config access
Tessellate.Foundations.Runtime IEnvironment, IStartupHook, IWebContextAccessor
Tessellate.Foundations.Data TessellateDatabaseContext, IQuery<T>, IDatabaseContext
Tessellate.Foundations.Middleware IMiddleware — before/after/error pipeline hooks
Tessellate.Foundations.BackgroundServices IRecurringBackgroundService
Tessellate.Foundations.Messaging IMetadataService, HandleContextMetadata
Tessellate.Foundations.Outbox IOutbox<T> — transactional outbox support

ITessellateModule

Every Tessellate module implements this interface to register its own services:

public class MyModule : ITessellateModule
{
    public void RegisterServices(IServiceCollection services)
    {
        services.AddScoped<IMyService, MyService>();
    }
}

ISettings

Scoped, cached access to configuration with a 300-second TTL:

public class MyConsumer(ISettings settings)
{
    public Task Consume(MyMessage message)
    {
        var apiKey = settings["MyService:ApiKey"];
    }
}

IQuery<T>

Encapsulates a database query as a typed object. Keeps query logic out of controllers and consumers:

public class ActiveUsersByOrgQuery(Guid orgId) : IQuery<User>
{
    public IQueryable<User> Filter(IQueryable<User> query)
        => query.Where(u => u.OrganisationId == orgId && u.IsActive);
}

// Usage via IDatabaseContext:
var users = await _db.Query(new ActiveUsersByOrgQuery(orgId)).ToListAsync();

TessellateDatabaseContext

Base class for your EF Core DbContext that implements IDatabaseContext:

public class MyDbContext : TessellateDatabaseContext
{
    public MyDbContext(DbContextOptions<MyDbContext> options) : base(options) { }

    public DbSet<User> Users => Set<User>();
}

IRecurringBackgroundService

Runs a task on a fixed interval. Register it with .AddBackgroundService<T>() on your TessellateService:

public class HeartbeatService : IRecurringBackgroundService
{
    public int IntervalMs => 60_000; // every 60 seconds

    public async Task ExecuteAsync()
    {
        // runs every minute
    }
}

IStartupHook

Executes once on service startup, before the host begins processing messages:

public class MigrateOnStartup(MyDbContext db) : IStartupHook
{
    public async Task OnStartup()
    {
        await db.Database.MigrateAsync();
    }
}

Register it in your module:

services.AddScoped<IStartupHook, MigrateOnStartup>();

IMiddleware

Cross-cutting Before/After/Error hooks that wrap every message handler:

public class MyMiddleware : IMiddleware
{
    public Task Before(IHandleContextMetadata metadata, object message) { ... }
    public Task After(IHandleContextMetadata metadata, object message)  { ... }
    public Task Error(Exception ex, IHandleContextMetadata metadata, object message) { ... }
}
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 (12)

Showing the top 5 NuGet packages that depend on Tessellate.Foundations:

Package Downloads
Tessellate.Messaging

Messaging abstractions for the Tessellate framework: IPublisher, IConsumer, HandleContext, and publish options.

Tessellate.Messaging.RabbitMq

RabbitMQ messaging provider for the Tessellate microservice framework.

Tessellate.Messaging.LavinMq

LavinMQ messaging provider for the Tessellate microservice framework.

Tessellate.Logging.Seq

Seq structured logging module for the Tessellate microservice framework.

Tessellate.Web

ASP.NET Core integration module for the Tessellate microservice framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.45-preview 106 10/14/2026
1.0.44-preview 112 10/14/2026
1.0.43-preview 110 10/14/2026
1.0.42-preview 106 10/14/2026