Orbitra.Abstractions 1.0.1

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

Orbitra.Abstractions

License: Apache-2.0 NuGet - Orbitra.Abstractions

Orbitra.Abstractions contains the core building blocks for working with the Orbitra dispatcher.
It provides lightweight interfaces to define your requests, handlers, and pipeline behaviours, without bringing in any dependencies like Microsoft.Extensions.DependencyInjection.

This package is perfect for:

  • Shared contracts across projects (e.g., in a domain or application layer)
  • Unit testing without requiring the full Orbitra runtime
  • Keeping dependencies minimal in class libraries

Orbitra.Abstractions by itself does not contain the dispatcher implementation or source generation, just the abstraction.
Use the main Orbitra package together with this one when you need dispatching and pipeline execution.


Install

dotnet add package Orbitra.Abstractions

Core Concepts

Requests

A request represents an operation that your system can perform.
Orbitra supports three styles of requests:

Interface Purpose
IRequest<TResult> Base request type. Neutral, no category.
ICommand<TResult> Marker interface for commands (mutations, side effects).
IQuery<TResult> Marker interface for queries (read-only operations).

Example:

using Orbitra.Abstractions.Requests;

// Neutral request
public sealed record PingRequest(string Message) : IRequest<string>;

// Command
public sealed record CreateUserCommand(string UserName) : ICommand<string>;

// Query
public sealed record GetUserQuery(int Id) : IQuery<UserDto>;
public sealed record UserDto(int Id, string Name);

Handlers

A handler processes a request and returns a result.
Each handler implements either the generic IRequestHandler<TRequest, TResult>,
or the more specific ICommandHandler<,> or IQueryHandler<,>.

using Orbitra.Abstractions;

// Neutral handler
public sealed class PingRequestHandler : IRequestHandler<PingRequest, string>
{
    public Task<string> HandleAsync(PingRequest request, CancellationToken token = default)
        => Task.FromResult($"PONG: {request.Message}");
}

// Command handler
public sealed class CreateUserCommandHandler : ICommandHandler<CreateUserCommand, string>
{
    public Task<string> HandleAsync(CreateUserCommand command, CancellationToken token = default)
        => Task.FromResult($"User {command.UserName} created!");
}

// Query handler
public sealed class GetUserQueryHandler : IQueryHandler<GetUserQuery, UserDto>
{
    public Task<UserDto> HandleAsync(GetUserQuery query, CancellationToken token = default)
        => Task.FromResult(new UserDto(query.Id, "Alice"));
}

Pipeline Behaviours

Pipeline behaviours let you define cross-cutting concerns such as logging, validation, or metrics.
They implement IPipelineBehaviour<TRequest, TResult> and wrap around the handler invocation.

using Orbitra.Abstractions.Pipelines;
using Orbitra.Abstractions.Requests;

public sealed class LoggingBehaviour<TRequest, TResult> : IPipelineBehaviour<TRequest, TResult>
    where TRequest : IRequest<TResult>
{
    public async Task<TResult> HandleAsync(
        TRequest request,
        DispatchHandlerDelegate<TResult> next,
        CancellationToken token = default)
    {
        Console.WriteLine($"Handling {typeof(TRequest).Name}");
        var result = await next();
        Console.WriteLine($"Handled {typeof(TRequest).Name}");
        return result;
    }
}

When to Use Orbitra.Abstractions Alone

You might only need Orbitra.Abstractions when:

  1. Defining shared contracts in a clean architecture setup.
    • Example: MyApp.Contracts project references only abstractions, no runtime dependencies.
  2. Writing unit tests for handlers without setting up the full dispatcher or DI.
  3. Keeping libraries lightweight and dependency-free, while still being compatible with Orbitra.

Package Description
Orbitra The runtime dispatcher and pipeline engine. Required for actual dispatching and pipeline execution.
Orbitra.DependencyInjection.Microsoft Extensions for Microsoft.Extensions.DependencyInjection for seamless registration.

TL;DR

  • Orbitra.Abstractions = contracts and interfaces only.
  • Use it to define requests, handlers, and pipelines without runtime dependencies.
  • Combine with Orbitra and optionally Orbitra.DependencyInjection.Microsoft when you need full functionality.
Product 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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Orbitra.Abstractions:

Package Downloads
Orbitra

Source-generated dispatcher with flexible pipelines.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 161 10/31/2025
1.0.0 218 10/30/2025