NOF.Contract
10.5.0
See the version list below for details.
dotnet add package NOF.Contract --version 10.5.0
NuGet\Install-Package NOF.Contract -Version 10.5.0
<PackageReference Include="NOF.Contract" Version="10.5.0" />
<PackageVersion Include="NOF.Contract" Version="10.5.0" />
<PackageReference Include="NOF.Contract" />
paket add NOF.Contract --version 10.5.0
#r "nuget: NOF.Contract, 10.5.0"
#:package NOF.Contract@10.5.0
#addin nuget:?package=NOF.Contract&version=10.5.0
#tool nuget:?package=NOF.Contract&version=10.5.0
NOF.Contract
Contract layer package for the NOF Framework.
Overview
Defines the messaging contracts and shared models that form the public API surface of your application. This package contains Result<T>, Empty, HTTP endpoint annotations, and other shared attributes used by source generators and hosts.
Key Abstractions
Messages
// Request with response
public record GetOrderRequest(Guid Id);
// Request without payload response
public record ArchiveOrderRequest(Guid Id);
// Fire-and-forget command
public record SendEmailCommand(string To, string Subject, string Body);
// Publish/subscribe notification
public record OrderCreatedNotification(Guid OrderId);
Result Type
// Success
return Result.Success(orderDto);
// Failure
return Result.Fail("404", "Order not found");
RPC Contracts
RPC service methods use a strict single-request signature, do not accept CancellationToken on the contract surface,
do not end with Async, and must return a non-Task, non-void value. The return type does not need to be Result-based.
public record GetOrderRequest(Guid Id);
public record CreateOrderRequest(string ProductName, int Quantity);
public interface IOrderService : IRpcService
{
[Summary("Get order")]
[HttpEndpoint(HttpVerb.Get, "/api/orders/get")]
Result<OrderDto> Get(GetOrderRequest request);
[Summary("Create order")]
[HttpEndpoint(HttpVerb.Post, "/api/orders")]
Result<OrderDto> Create(CreateOrderRequest request);
[Summary("Archive order")]
[HttpEndpoint(HttpVerb.Post, "/api/orders/archive")]
Empty Archive(ArchiveOrderRequest request);
}
Other Annotations
[HttpEndpoint]- declares HTTP verb and route metadata for RPC methods- Route parameters such as
"{id}"are not supported for RPC HTTP endpoints; put input data on the request object instead [RequirePermission]- declares required permissions for an endpoint[Summary]- adds summary documentation to generated endpoints- These NOF-specific attributes are all metadata-backed and converge on
MetadataAttribute
Installation
dotnet add package NOF.Contract
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
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on NOF.Contract:
| Package | Downloads |
|---|---|
|
NOF.Application
Application layer for the NOF Framework — request/command/notification handlers, state machines, caching, and unit of work. |
|
|
NOF.Test
Testing support for applications built with NOF, including lightweight test hosts, scoped execution helpers, and application-oriented integration testing utilities. |
|
|
NOF.Hosting.Abstraction
Hosting abstractions for the NOF Framework — host builder interfaces and step contracts shared by different hosting environments. |
|
|
NOF.UI
Reusable UI primitives for the NOF Framework - authorization components, browser storage abstractions, and client-side cache services. |
|
|
NOF.Contract.Extension.Authorization.Jwt
JWT authorization contract extension for the NOF Framework — request/response models and service interfaces for JWT operations. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.6.0-nightly.1278216.b2a8a6a | 0 | 6/6/2026 |
| 10.6.0-nightly.1278169.115732b | 0 | 6/6/2026 |
| 10.6.0-nightly.1275207.7a22e46 | 56 | 6/4/2026 |
| 10.6.0-nightly.1275187.b146f14 | 58 | 6/4/2026 |
| 10.6.0-nightly.1275143.bbcffd1 | 54 | 6/4/2026 |
| 10.6.0-nightly.1272066.87361d5 | 93 | 6/2/2026 |
| 10.6.0-nightly.1263860.0e25bc5 | 116 | 5/27/2026 |
| 10.6.0-nightly.1261960.84db1f2 | 121 | 5/26/2026 |
| 10.6.0-nightly.1260976.278016a | 102 | 5/25/2026 |
| 10.6.0-nightly.1260949.d6e2270 | 98 | 5/25/2026 |
| 10.6.0-nightly.1260883.04157c7 | 117 | 5/25/2026 |
| 10.6.0-nightly.1255923.6170d7f | 108 | 5/22/2026 |
| 10.6.0-nightly.1254934.8f245f4 | 105 | 5/21/2026 |
| 10.6.0-nightly.1253375.5b42a45 | 104 | 5/20/2026 |
| 10.5.0 | 244 | 5/19/2026 |
| 10.5.0-nightly.1246067.1e768c3 | 106 | 5/15/2026 |
| 10.5.0-nightly.1245792.8d707f7 | 113 | 5/15/2026 |
| 10.5.0-nightly.1245695.d08d98d | 107 | 5/15/2026 |
| 10.5.0-nightly.1244595.ecb70dd | 112 | 5/14/2026 |
| 10.5.0-nightly.1243189.8184fb7 | 125 | 5/13/2026 |