NOF.Application
10.5.0
See the version list below for details.
dotnet add package NOF.Application --version 10.5.0
NuGet\Install-Package NOF.Application -Version 10.5.0
<PackageReference Include="NOF.Application" Version="10.5.0" />
<PackageVersion Include="NOF.Application" Version="10.5.0" />
<PackageReference Include="NOF.Application" />
paket add NOF.Application --version 10.5.0
#r "nuget: NOF.Application, 10.5.0"
#:package NOF.Application@10.5.0
#addin nuget:?package=NOF.Application&version=10.5.0
#tool nuget:?package=NOF.Application&version=10.5.0
NOF.Application
Application layer package for the NOF Framework.
Overview
Contains the application service abstractions used to implement NOF applications: RPC servers, request handlers, command handlers, notification handlers, state machines, mapping, and caching.
Commands and notifications are plain payload types. Handler discovery comes from the CommandHandler<T> and NotificationHandler<T> base classes rather than marker interfaces on the message types.
Key Abstractions
RPC Servers
RPC contracts are declared on IRpcService interfaces in the contract layer. Application implementations use RpcServer<TService>:
public partial class OrderService : RpcServer<IOrderService>;
public sealed class GetOrder : OrderService.GetOrder
{
private readonly DbContext _dbContext;
public GetOrder(DbContext dbContext)
{
_dbContext = dbContext;
}
public override async Task<Result<OrderDto>> HandleAsync(GetOrderRequest request, CancellationToken cancellationToken)
{
var order = await _dbContext.Set<Order>()
.FirstOrDefaultAsync(entity => entity.Id == request.Id, cancellationToken);
if (order is null)
{
return Result.Fail("404", "Order not found");
}
return Result.Success(new OrderDto(order.Id, order.Status));
}
}
Command Handlers
public record SendEmailCommand(string To, string Subject, string Body);
public sealed class SendEmailHandler : CommandHandler<SendEmailCommand>
{
public override Task HandleAsync(SendEmailCommand command, CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
Notification Handlers
public record OrderCreatedNotification(Guid OrderId);
public sealed class OrderCreatedHandler : NotificationHandler<OrderCreatedNotification>
{
public override Task HandleAsync(OrderCreatedNotification notification, CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
State Machines
Declarative, event-driven state machines:
public sealed class OrderStateMachine : IStateMachineDefinition<OrderState>
{
public void Build(IStateMachineBuilder<OrderState> builder)
{
builder.Correlate<OrderCreatedNotification>(n => n.OrderId.ToString());
builder.Correlate<PaymentReceivedNotification>(n => n.OrderId.ToString());
builder.StartWhen<OrderCreatedNotification>(OrderState.Pending)
.SendCommandAsync(n => new StartProcessingCommand(n.OrderId));
builder.On(OrderState.Pending)
.When<PaymentReceivedNotification>()
.TransitionTo(OrderState.Completed);
}
}
Transactional Message Sending
Use ICommandSender and INotificationPublisher for both immediate and deferred dispatch:
_notificationPublisher.DeferPublish(new OrderCreatedNotification(order.Id));
_commandSender.DeferSend(new SendEmailCommand(order.Email, "Created", "Order created."));
await _dbContext.SaveChangesAsync(cancellationToken);
Object Mapping (IMapper)
NOF uses an explicit mapper with optional source-generated registrations via [Mappable]:
[Mappable<Order, OrderDto>]
[Mappable<Order, OrderSummary>(TwoWay = true)]
public static partial class Mappings;
The generator writes MapperRegistration entries into Registry.MapperRegistry.
Those mappings become available once the assembly is added via AddApplicationPart(...).
Convenience APIs can use the ambient mapper via source.Map, while explicit code can use source.MapWith(mapper).
Installation
dotnet add package NOF.Application
ICacheService also implements IDistributedCache, so standard distributed cache consumers can resolve either abstraction from NOF cache registrations.
License
Apache-2.0
| Product | Versions 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. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Options (>= 10.0.0 && < 10.1.0)
- NOF.Abstraction (>= 10.5.0)
- NOF.Contract (>= 10.5.0)
- NOF.Domain (>= 10.5.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on NOF.Application:
| Package | Downloads |
|---|---|
|
NOF.Infrastructure
Unified infrastructure package for the NOF Framework — abstractions, core pipeline, OpenTelemetry integration, and service wiring. |
|
|
NOF.Test
Testing support for applications built with NOF, including lightweight test hosts, scoped execution helpers, and application-oriented integration testing utilities. |
|
|
NOF.Infrastructure.Extension.Authorization.Jwt
JWT authorization extension for the NOF Framework — OIDC resource server, JWKS fetching, token validation, and identity resolution. |
|
|
NOF.Infrastructure.RabbitMQ
RabbitMQ integration for the NOF Framework — message bus adapter for commands, events, and notifications using official RabbitMQ client. |
|
|
NOF.Infrastructure.Memory
In-memory infrastructure implementation for the NOF Framework — cache and riders. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.6.0-nightly.1272066.87361d5 | 50 | 6/2/2026 |
| 10.6.0-nightly.1263860.0e25bc5 | 91 | 5/27/2026 |
| 10.6.0-nightly.1261960.84db1f2 | 90 | 5/26/2026 |
| 10.6.0-nightly.1260976.278016a | 85 | 5/25/2026 |
| 10.6.0-nightly.1260949.d6e2270 | 80 | 5/25/2026 |
| 10.6.0-nightly.1260883.04157c7 | 87 | 5/25/2026 |
| 10.6.0-nightly.1255923.6170d7f | 86 | 5/22/2026 |
| 10.6.0-nightly.1254934.8f245f4 | 79 | 5/21/2026 |
| 10.6.0-nightly.1253375.5b42a45 | 78 | 5/20/2026 |
| 10.5.0 | 181 | 5/19/2026 |
| 10.5.0-nightly.1246067.1e768c3 | 80 | 5/15/2026 |
| 10.5.0-nightly.1245792.8d707f7 | 87 | 5/15/2026 |
| 10.5.0-nightly.1245695.d08d98d | 78 | 5/15/2026 |
| 10.5.0-nightly.1244595.ecb70dd | 86 | 5/14/2026 |
| 10.5.0-nightly.1243189.8184fb7 | 98 | 5/13/2026 |
| 10.5.0-nightly.1243093.937c7b3 | 90 | 5/13/2026 |
| 10.5.0-nightly.1238918.15b610d | 86 | 5/10/2026 |
| 10.5.0-nightly.1238791.9323996 | 92 | 5/10/2026 |
| 10.5.0-nightly.1236021.5ad328d | 102 | 5/8/2026 |
| 10.4.1-nightly.1235841.a7b2054 | 97 | 5/8/2026 |