Skip to content

R10.11-R10.14: Add TestingDemo, SourceGenerators, Advanced, and NexumEndpoints examples - #10

Merged
asawicki merged 1 commit into
mainfrom
feature/r10.11-r10.14-examples
Mar 15, 2026
Merged

R10.11-R10.14: Add TestingDemo, SourceGenerators, Advanced, and NexumEndpoints examples#10
asawicki merged 1 commit into
mainfrom
feature/r10.11-r10.14-examples

Conversation

@asawicki

Copy link
Copy Markdown
Collaborator

Summary

  • R10.13 Advanced — console app demonstrating depth guard (MaxDispatchDepth, NexumDispatchDepthExceededException), handler lifetimes ([HandlerLifetime] Transient/Scoped/Singleton), polymorphic handler resolution, and NexumOptions configuration
  • R10.11 TestingDemo — xUnit project (15 tests) demonstrating NexumTestHost, FakeCommandDispatcher, FakeQueryDispatcher, InMemoryNotificationCollector, and assertion extensions (ShouldHaveDispatched<T>(), ShouldHavePublished<T>())
  • R10.12 SourceGenerators — console app demonstrating SG Tier 1 (DI registration), Tier 2 (compiled pipeline delegates), Tier 3 (call-site interceptors), [HandlerLifetime(Singleton)] override, and marker attributes with educational // SG: comments
  • R10.14 NexumEndpoints — ASP.NET Core app demonstrating [NexumEndpoint] attribute, MapNexumEndpoints() SG-generated registration, Result<T> → HTTP mapping, IVoidCommand → 204 NoContent, and OpenAPI metadata

Test plan

  • dotnet build Nexum.slnx — 0 warnings, 0 errors
  • dotnet test Nexum.slnx — 616 tests pass (including 15 new from TestingDemo)
  • dotnet run --project examples/Nexum.Examples.Advanced — all 4 sections produce expected output
  • dotnet run --project examples/Nexum.Examples.SourceGenerators — Tier 1-3 demo runs correctly
  • dotnet test examples/Nexum.Examples.TestingDemo — 15/15 pass
  • dotnet build examples/Nexum.Examples.NexumEndpoints — compiles with SG-generated endpoints
  • All 9 pre-existing examples verified working

…Endpoints examples

Four new example projects completing the examples/ suite:
- R10.13 Advanced: depth guard, handler lifetimes, polymorphic resolution, NexumOptions
- R10.11 TestingDemo: 15 xUnit tests demonstrating NexumTestHost, FakeDispatchers, assertions
- R10.12 SourceGenerators: Tier 1-3 demo with educational comments
- R10.14 NexumEndpoints: [NexumEndpoint] + MapNexumEndpoints() + Result mapping

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: e4cdf72 Previous: ff075a6 Ratio
Nexum.Benchmarks.NexumRegressionBenchmarks.Nexum_SimpleCommand 77.14948952198029 ns (± 0.09129116437350118) 57.51668103841635 ns (± 0.09281288383361881) 1.34

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions

Copy link
Copy Markdown

Test Results

601 tests  +15   601 ✅ +15   1m 57s ⏱️ -5s
 15 suites + 1     0 💤 ± 0 
 15 files   + 1     0 ❌ ± 0 

Results for commit e4cdf72. ± Comparison against base commit ff075a6.

@asawicki
asawicki merged commit db22229 into main Mar 15, 2026
6 checks passed
@asawicki
asawicki deleted the feature/r10.11-r10.14-examples branch March 15, 2026 13:34
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.

1 participant