Skip to content

feat(mediator): name assembly-scanning APIs explicitly#794

Merged
AndreaCuneo merged 2 commits into
masterfrom
copilot/continue-next-task-docs-mediator-framework
Jul 26, 2026
Merged

feat(mediator): name assembly-scanning APIs explicitly#794
AndreaCuneo merged 2 commits into
masterfrom
copilot/continue-next-task-docs-mediator-framework

Conversation

Copilot AI commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Generic mediator registration APIs did not indicate that their type parameter selects the assembly to scan. This made call sites ambiguous and obscured cross-assembly discovery behavior.

  • API surface
    • Renamed generated methods:
      • MapArkEndpointsFromAssembly<TAssemblyMarker>
      • MapArkGrpcServicesFromAssembly<TAssemblyMarker>
      • RegisterArkRebusHandlersFromAssembly<TAssemblyMarker>
    • Removed legacy names and updated XML documentation.
  • Generator discovery
    • Updated syntax filters and assembly extraction for all three transports.
  • Consumers and documentation
    • Updated samples, tests, package descriptions, mediator docs, and task tracking.
endpoints.MapArkEndpointsFromAssembly<ApplicationMarker>();
endpoints.MapArkGrpcServicesFromAssembly<ApplicationMarker>();
ArkGeneratedEndpoints.RegisterArkRebusHandlersFromAssembly<ApplicationMarker>(container);

Copilot AI and others added 2 commits July 26, 2026 05:57
Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com>
Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot July 26, 2026 06:06
@AndreaCuneo
AndreaCuneo marked this pull request as ready for review July 26, 2026 06:06
@AndreaCuneo
AndreaCuneo requested a review from a team as a code owner July 26, 2026 06:06
Copilot AI review requested due to automatic review settings July 26, 2026 06:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the mediator transport “assembly marker” APIs to make it explicit that the generic type parameter selects the assembly to scan, and updates generators + consumers accordingly to keep discovery behavior consistent across transports.

Changes:

  • Renamed generated public APIs to *FromAssembly<TAssemblyMarker> across Minimal API, gRPC, and Rebus, including updated generator call-site discovery.
  • Updated sample hosts and generator snapshot tests to use the new method names.
  • Updated NuGet package descriptions and mediator docs/task tracking to reference the new names.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Ark.Tools.MediatorFramework.Tests/GeneratorSnapshotTests.cs Updates snapshot assertions to the new generated method names.
src/mediator-framework/Ark.Tools.MediatorFramework.Rebus/Ark.Tools.MediatorFramework.Rebus.csproj Updates package description to reference the new Rebus registration API name.
src/mediator-framework/Ark.Tools.MediatorFramework.Rebus.Generators/RebusEndpointGenerator.cs Updates Rebus generator discovery and emitted API name + XML docs.
src/mediator-framework/Ark.Tools.MediatorFramework.MinimalApi/Ark.Tools.MediatorFramework.MinimalApi.csproj Updates package description to reference the new Minimal API mapping method name.
src/mediator-framework/Ark.Tools.MediatorFramework.MinimalApi.Generators/MinimalApiEndpointGenerator.cs Updates Minimal API generator discovery and emitted API name + XML docs.
src/mediator-framework/Ark.Tools.MediatorFramework.Grpc/Ark.Tools.MediatorFramework.Grpc.csproj Updates package description to reference the new gRPC mapping method name.
src/mediator-framework/Ark.Tools.MediatorFramework.Grpc.Generators/GrpcEndpointGenerator.cs Updates gRPC generator discovery and emitted API name + XML docs.
samples/Ark.MediatorFramework.Sample/src/Ark.MediatorFramework.Sample.WebInterface/SampleStartup.cs Updates sample endpoint mapping calls to the new *FromAssembly methods.
samples/Ark.MediatorFramework.Sample/src/Ark.MediatorFramework.Sample.WebInterface/SampleComposition.cs Updates sample Rebus handler registration call to the new *FromAssembly method.
docs/mediator-framework/tasks/security/SEC-03-messagepack-untrusted-data.md Updates task references to the renamed Minimal API mapping method.
docs/mediator-framework/tasks/security/SEC-01-secure-by-default-endpoints.md Updates task references to the renamed Minimal API mapping method.
docs/mediator-framework/tasks/README.md Marks GEN-08 as completed.
docs/mediator-framework/tasks/generator-dx/GEN-08-from-assembly-api-names.md Marks GEN-08 acceptance criteria as completed.
docs/mediator-framework/tasks/generator-dx/GEN-03-startup-handler-verification.md Updates task references to the renamed APIs.
docs/mediator-framework/pre-release-review.md Updates pre-release review notes to reference the renamed API.
docs/mediator-framework/migration-from-mvc.md Updates migration guide references to the renamed Minimal API mapping method.
docs/mediator-framework/implementation-plan.md Updates implementation plan references to the renamed Minimal API mapping method.
docs/mediator-framework/design.md Updates design doc references to the renamed Minimal API mapping method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AndreaCuneo
AndreaCuneo merged commit 60d1221 into master Jul 26, 2026
7 checks passed
@AndreaCuneo
AndreaCuneo deleted the copilot/continue-next-task-docs-mediator-framework branch July 26, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants