Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds two major behavioral patterns - Mediator and Command - to PatternKit's core library and examples, along with modernizing collection syntax and dependency updates across the codebase.
Key changes:
- Added allocation-light Mediator pattern supporting commands, notifications, and streaming with pipeline behaviors
- Added Command pattern with Do/Undo capabilities and macro composition
- Updated collection syntax to use collection expressions (
[]instead ofnew()) - Added JetBrains.Annotations package dependency
Reviewed Changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PatternKit.Core/Behavioral/Mediator/Mediator.cs | New mediator implementation with commands, notifications, streaming, and behaviors |
| src/PatternKit.Core/Behavioral/Command/Command.cs | New command pattern with undo support and macro composition |
| src/PatternKit.Examples/MediatorDemo/ | Demo abstractions and DI scanning for MediatR-like functionality |
| test/PatternKit.Tests/Behavioral/Mediator/MediatorTests.cs | Comprehensive tests for mediator functionality |
| test/PatternKit.Tests/Behavioral/Command/CommandTests.cs | Tests for command execution and macro scenarios |
| Various files | Collection syntax modernization and JetBrains.Annotations dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (!r.ShouldApply(ctx, total)) | ||
| continue; |
There was a problem hiding this comment.
[nitpick] The early continue pattern is good, but the removed braces and the logic that follows should be properly aligned. The subsequent code block starting at line 168 should be indented to show it's part of the else condition.
| if (!r.ShouldApply(ctx, total)) | |
| continue; | |
| if (!r.ShouldApply(ctx, total)) | |
| { | |
| continue; | |
| } |
Code Coverage |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #16 +/- ##
==========================================
+ Coverage 84.93% 89.58% +4.64%
==========================================
Files 33 37 +4
Lines 1932 2333 +401
Branches 277 356 +79
==========================================
+ Hits 1641 2090 +449
- Misses 216 243 +27
+ Partials 75 0 -75
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.