Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
mkdir -p nupkgs
dotnet pack src/Interlink/Interlink.csproj -c Release -o ./nupkgs --no-build
dotnet pack src/Interlink.Extensions.Logging/Interlink.Extensions.Logging.csproj -c Release -o ./nupkgs --no-build
dotnet pack src/Interlink.Extensions.Validation/Interlink.Extensions.Telemetry.csproj -c Release -o ./nupkgs --no-build
dotnet pack src/Interlink.Extensions.Validation/Interlink.Extensions.Validation.csproj -c Release -o ./nupkgs --no-build
dotnet pack src/Interlink.AspNetCore/Interlink.AspNetCore.csproj -c Release -o ./nupkgs --no-build
dotnet pack src/Interlink.Analyzers/Interlink.Analyzers.csproj -c Release -o ./nupkgs --no-build
Expand Down
144 changes: 54 additions & 90 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,131 +1,95 @@
# Changelog

## [1.5.2] - 2026-08-13
All notable changes to **Interlink** are documented in this file.

## [1.7.0] - 2026-11-08

### Added
- **Unified `IMediator`** – new interface that inherits from both `ISender` and `IPublisher`.
- **`Mediator` implementation** – lightweight composition of the existing `Sender` and `Publisher`.
- `IMediator` is now registered by default in `AddInterlink()`.

### Changed
- Users can now inject `IMediator`, `ISender`, or `IPublisher` independently (full backward compatibility).
- **NotificationExceptionStrategy** on `InterlinkOptions`:
- `StopOnFirst` (default) — rethrow the first handler failure
- `Aggregate` — run all handlers, then throw `AggregateException` if any failed
- `Continue` — run all handlers; failures handled by exception handlers and not rethrown by default
- **`INotificationExceptionHandler<TNotification, TException>`** — handle per-handler failures (logging, outbox, compensation)
- **`NotificationHandlerException`** — wraps a single handler failure with `NotificationType` and `HandlerType`
- **`Interlink.Extensions.Telemetry`** — Activity instrumentation for:
- `Send` → `Interlink.Send {Request}`
- `Publish` → `Interlink.Publish {Notification}`
- `CreateStream` → `Interlink.CreateStream {Request}`
- Registration: `services.AddInterlinkTelemetry()`
- Activity source name: **`Interlink`**
- Unit tests for Aggregate, Continue, StopOnFirst, and exception handler invocation

---
### Changed

## [1.5.1] - 2026-08-XX
- `Publisher` applies `NotificationExceptionStrategy` and dispatches notification exception handlers before rethrowing or continuing
- Assembly scanning registers `INotificationExceptionHandler<,>` implementations

### Added
- **`Unit` support** – non-generic `IRequest` (equivalent to `IRequest<Unit>`) for fire-and-forget / void commands.
- `Unit` struct with `Unit.Value`.
- Convenience overload `ISender.Send(IRequest request)` that maps to `Send<Unit>()`.
### Packages

### Changed
- Documentation and examples updated to show `Unit` usage.
| Package | Version |
|---------|---------|
| Interlink | 1.7.0 |
| Interlink.Extensions.Telemetry | 1.7.0 |
| Interlink.Extensions.Logging | 1.7.0 |
| Interlink.Extensions.Validation | 1.7.0 |
| Interlink.AspNetCore | 1.7.0 |
| Interlink.Analyzers | 1.7.0 |

---

## [1.5.0] - 2026-07-31
## [1.6.0]

### Added
- **HandlerNotFoundException** – dedicated exception type thrown when a request has no registered handler.
- **Pipeline ordering** – `PipelineOrderAttribute` is now respected; behaviors are sorted ascending (lowest order runs outermost).
- **Custom service factory** – fully wired via `InterlinkOptions.ServiceFactory`.
- **Interlink.Extensions.Logging** – `LoggingBehavior<TRequest,TResponse>` + `AddInterlinkLogging()`.
- **Interlink.Extensions.Validation** – FluentValidation integration (`ValidationBehavior` + `AddInterlinkValidation()` with optional assembly scanning).
- **Interlink.AspNetCore** – `InterlinkExceptionFilter` (maps `HandlerNotFoundException` and optional FluentValidation exceptions to ProblemDetails) + `AddInterlinkAspNetCore()`.
- **Interlink.Analyzers** – Roslyn analyzer (`ILINK001`) that warns when an `IRequest<T>` has no corresponding `IRequestHandler`.
- XML documentation comments on all public APIs.

### Fixed
- Pipeline behavior signature documentation now matches the actual `Handle(request, next, cancellationToken)` order.
- Removed dead / commented-out code in `ServiceCollectionExtensions`.
- Removed unused `HandlerResolver`.
- Consolidated type-scanning cache.
- Publisher now uses the same dynamic dispatch style as Sender (no reflection `Invoke`).
- `InterlinkOptions.AddBehavior` supports an optional explicit order parameter.
- Proper null checks and `ArgumentNullException` on public entry points.
- **Streaming requests** — `IStreamRequest<T>`, `IStreamRequestHandler<TRequest,TResponse>`, `ISender.CreateStream` / `IMediator.CreateStream`
- **Stream pipeline behaviors** — `IStreamPipelineBehavior<TRequest,TResponse>`, `AddStreamBehavior`
- **Publish strategies** — `PublishStrategy.Sequential` (default) and `PublishStrategy.Parallel`
- **Notification pipeline behaviors** — `INotificationPipelineBehavior<T>`, `AddNotificationBehavior`
- **Request timeout** — `InterlinkOptions.DefaultRequestTimeout` + built-in `TimeoutBehavior<,>`
- **ILINK002** analyzer — duplicate request handlers

### Changed
- Version bumped to 1.5.0.
- `Sender` and `Publisher` are now `sealed`.
- Pre-processors run before the pipeline; post-processors run after a successful pipeline.

---

## [1.4.0] - Previous

### Changed
- Officially targets .NET Standard 2.0+ (improved multi-targeting and compatibility)

### Fixed
- Minor packaging and target framework alignment issues
- `Publisher` supports publish strategies and notification pipelines
- Analyzer detects both `IRequestHandler<TRequest>` and `IRequestHandler<TRequest,TResponse>`

---

## [1.3.1] - Previous

### Changed
- Support .NET Standard 2.0+ (works in .NET Core, .NET 5+, .NET Framework 4.7.2+)

---

## [1.3.0] — Performance & Customization
## [1.5.2]

### Added
- Handler resolution caching (delegate-based)
- Custom service factory injection support
- Pipeline ordering via attributes or configuration
- Assembly scanning filters by namespace or attribute

---

## [1.2.1] — Fix Critical Bugs

### Fixed
- Critical bugs in `IPipelineBehavior<TRequest, TResponse>`
- Unified **`IMediator`** interface (composes `ISender` + `IPublisher`)

---

## [1.2.0] — Pre/Post Processors
## [1.5.1]

### Added
- `IRequestPreProcessor<TRequest>` interface
- `IRequestPostProcessor<TRequest, TResponse>` interface
- Pre and post hooks for request lifecycle
- Optional unit-of-work behaviors

---
- **`Unit`** and non-generic **`IRequest`** / **`IRequestHandler<TRequest>`** for void-style commands
- **`ISender.Send(IRequest)`** convenience overload

## [1.1.0] — Notifications & Pipelines
### Fixed

### Added
- `INotification` and `INotificationHandler<TNotification>`
- `IPublisher` for event broadcasting
- `IPipelineBehavior<TRequest, TResponse>` support
- Enhanced `AddInterlink()` with scanning and registration for notifications and pipelines
- Updated documentation and examples
- .NET 8+ support
- Analyzer packaging (`build/Interlink.Analyzers.props`) for reliable NuGet consumption

---

## [1.0.1] — Core Mediator Basics

### Changed
- .NET 8+ support
## [1.5.0]

### Added
- Basic `IRequest<TResponse>` and `IRequestHandler<TRequest, TResponse>`
- `ISender` for sending requests
- `AddInterlink()` for automatic DI registration
- Clean, lightweight design

- `Interlink.Extensions.Logging`
- `Interlink.Extensions.Validation` (FluentValidation)
- `Interlink.AspNetCore` (exception filter → ProblemDetails)
- `Interlink.Analyzers` (**ILINK001** missing handler)
- `HandlerNotFoundException`
- Pipeline ordering via `PipelineOrderAttribute` / `AddBehavior(..., order)`

---

## [1.0.0] — Core Mediator Basics
## [1.4.x] and earlier

### Added
- Basic `IRequest<TResponse>` and `IRequestHandler<TRequest, TResponse>`
- `ISender` for sending requests
- `AddInterlink()` for automatic DI registration
- Clean, lightweight design
- Only .NET 9 support
- Core mediator: request/response, notifications, pipeline behaviors, pre/post processors, DI scanning
9 changes: 8 additions & 1 deletion Interlink-cqrs-library.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.8.12023.21 stable
VisualStudioVersion = 18.8.12023.21
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlink", "src\Interlink\Interlink.csproj", "{7C8514FF-93EF-4044-BF83-56D9879EF68A}"
EndProject
Expand All @@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlink.AspNetCore", "src
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlink.Analyzers", "src\Interlink.Analyzers\Interlink.Analyzers.csproj", "{B0809B2E-29E0-4190-B792-4EA7FB08A253}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlink.Extensions.Telemetry", "src\Interlink.Extensions.Telemetry\Interlink.Extensions.Telemetry.csproj", "{09B20002-CFB1-10AF-1C27-D32F01257280}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -57,6 +59,10 @@ Global
{B0809B2E-29E0-4190-B792-4EA7FB08A253}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0809B2E-29E0-4190-B792-4EA7FB08A253}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0809B2E-29E0-4190-B792-4EA7FB08A253}.Release|Any CPU.Build.0 = Release|Any CPU
{09B20002-CFB1-10AF-1C27-D32F01257280}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09B20002-CFB1-10AF-1C27-D32F01257280}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09B20002-CFB1-10AF-1C27-D32F01257280}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09B20002-CFB1-10AF-1C27-D32F01257280}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -69,6 +75,7 @@ Global
{2343B677-D159-4E8F-86CD-48056172A8E8} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{BB845504-4E55-494E-AD0F-277ED0CE170F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{B0809B2E-29E0-4190-B792-4EA7FB08A253} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{09B20002-CFB1-10AF-1C27-D32F01257280} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F76D0B0E-B0AB-47F3-8546-94FFD16BC0AE}
Expand Down
Loading
Loading