feat: add null object pattern#493
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Adds Null Object pattern support across PatternKit runtime APIs, source generation, hosting extensions, examples, docs, tests, and benchmarks.
Changes:
- Introduces
NullObject<TContract>fluent runtime wrapper and DI registration helpers. - Adds
[GenerateNullObject]/[NullObjectDefault]attributes plus a generator for interface null implementations. - Adds customer notification examples, catalog entries, docs, tests, and benchmark coverage.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
src/PatternKit.Core/Structural/NullObject/NullObject.cs |
Adds runtime Null Object wrapper and builder. |
src/PatternKit.Generators.Abstractions/NullObject/NullObjectAttributes.cs |
Adds generator attributes. |
src/PatternKit.Generators/NullObject/NullObjectGenerator.cs |
Adds source generator implementation. |
src/PatternKit.Generators/AnalyzerReleases.Unshipped.md |
Registers new analyzer diagnostics. |
src/PatternKit.Hosting.Extensions/DependencyInjection/PatternKitServiceCollectionExtensions.cs |
Adds DI registration helpers. |
src/PatternKit.Examples/NullObjectDemo/CustomerNotificationNullObjectDemo.cs |
Adds customer notification example. |
src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs |
Registers example with DI catalog. |
src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs |
Adds Null Object to production catalog. |
src/PatternKit.Examples/ProductionReadiness/PatternKitHostingIntegrationCatalog.cs |
Adds hosting integration catalog entry. |
src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs |
Adds example catalog entry. |
benchmarks/PatternKit.Benchmarks/Structural/NullObjectBenchmarks.cs |
Adds scenario benchmarks. |
test/PatternKit.Tests/Structural/NullObject/NullObjectTests.cs |
Adds runtime tests. |
test/PatternKit.Generators.Tests/NullObjectGeneratorTests.cs |
Adds generator tests. |
test/PatternKit.Hosting.Extensions.Tests/DependencyInjection/PatternKitServiceCollectionExtensionsTests.cs |
Extends hosting tests. |
test/PatternKit.Examples.Tests/NullObjectDemo/CustomerNotificationNullObjectDemoTests.cs |
Adds example tests. |
test/PatternKit.Examples.Tests/DependencyInjection/PatternKitExampleDependencyInjectionTests.cs |
Verifies DI import path. |
test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs |
Updates production catalog expectations. |
README.md |
Updates pattern counts/table. |
docs/patterns/structural/null-object/index.md |
Adds pattern docs. |
docs/guides/hosting-extensions.md |
Documents hosting registration. |
docs/generators/null-object.md |
Adds generator docs. |
docs/examples/null-object-notification.md |
Adds example docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 10m 33s ⏱️ Results for commit 0d76816. ♻️ This comment has been updated with latest results. |
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
3003429 to
787e508
Compare
787e508 to
210322a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #493 +/- ##
==========================================
- Coverage 97.41% 97.40% -0.01%
==========================================
Files 583 587 +4
Lines 47614 48026 +412
Branches 3097 34 -3063
==========================================
+ Hits 46382 46782 +400
- Misses 1232 1244 +12
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:
|
210322a to
9c7366a
Compare
9c7366a to
fd1fbd1
Compare
fd1fbd1 to
4a517ac
Compare
4a517ac to
35d5ea3
Compare
35d5ea3 to
0d76816
Compare
Code Coverage |
Summary
Validation
CustomerNotificationNullObjectDemoTests|FullyQualifiedNamePatternKitExampleDependencyInjectionTests|FullyQualifiedNamePatternKitPatternCatalogTests|FullyQualifiedNamePatternKitExampleCatalogTests" --no-restore