Skip to content

Add Observer Pattern Source Generator#119

Merged
JerrettDavis merged 23 commits intomainfrom
copilot/create-observer-pattern-generator
Mar 20, 2026
Merged

Add Observer Pattern Source Generator#119
JerrettDavis merged 23 commits intomainfrom
copilot/create-observer-pattern-generator

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 19, 2026

Observer Pattern Source GeneratorImplements a fully functional source generator that produces reflection-free Observer pattern implementations with configurable threading, exception handling, and ordering semantics.### Core FeaturesAttributes (PatternKit.Generators.Abstractions/Observer/)- [Observer(typeof(TPayload))] - marks partial class/record class types for generation- Threading policies: SingleThreadedFast, Locking (default), Concurrent- Exception policies: Continue (default), Stop, Aggregate- Order policies: RegistrationOrder (default), UndefinedGenerated APIcsharp[Observer(typeof(Temperature), Threading = ObserverThreadingPolicy.Locking)]public partial class TemperatureChanged { }// Generates:IDisposable Subscribe(Action<Temperature> handler);IDisposable Subscribe(Func<Temperature, ValueTask> handler);void Publish(Temperature value);ValueTask PublishAsync(Temperature value, CancellationToken ct = default);partial void OnSubscriberError(Exception ex); // optional error hookImplementation Highlights- Reflection-free: Uses ObserverState object with direct method calls, AOT-compatible- Thread-safe: Configurable policies with proper synchronization primitives- Snapshot semantics: Publish iterates stable copy, safe during concurrent subscribe/unsubscribe- Fire-and-forget async: Sync Publish() invokes async handlers via Task.Run with proper error routing- Warning-free: Uses discard assignment (_ = Task.Run(...)) to avoid CS4014- Type-safe: Accepts any ITypeSymbol payload type including arrays- Memory-safe: ConcurrentDictionary-backed undefined-order subscriptions support deterministic removal without rebuild/compaction racesSupported Types- ✅ partial class- ✅ partial record class- ❌ partial struct / partial record struct - rejected with PKOBS003 diagnostic due to lambda capture complexityStruct Handling- AttributeTargets.Struct included to allow attribute application- Generator provides clear PKOBS003 diagnostic instead of compiler CS0592 error- Users see meaningful message about why structs aren't supportedThreading Policies- SingleThreadedFast: No locks, documented as not thread-safe- Locking: Lock-based thread safety with snapshot under lock- Concurrent + RegistrationOrder: Lock-free with ImmutableList and atomic updates- Concurrent + Undefined: Lock-free with ConcurrentDictionary<int, Subscription> for deterministic removal without compaction races- Atomic initialization via LazyInitializer.EnsureInitialized prevents race conditionsException Handling- Sync handlers: Follow configured policy (Continue/Stop/Aggregate)- Async handlers (fire-and-forget in sync Publish): - Continue: Exceptions routed to OnSubscriberError hook - Stop: Exceptions routed to OnSubscriberError (cannot stop sync execution deterministically) - Aggregate: Exceptions logged via OnSubscriberError (cannot aggregate synchronously)- For deterministic exception behavior with async handlers, use PublishAsyncHub Mode- [ObserverHub] and [ObservedEvent] attributes defined but NOT implemented- Explicitly documented as "reserved for future implementation"- Hub generation deferred to v2### Documentation & Examples**/docs/generators/observer.md** (21KB+)- Complete API reference with all configuration options- Performance characteristics for each threading/exception/order policy- Common patterns (observable properties, event aggregators)- Diagnostics reference (PKOBS001-003)- Threading policy comparison table with disposal behavior notes- Dependency notes (System.Collections.Immutable for Concurrent+RegistrationOrder)- ConcurrentDictionary-based undefined-order removal behavior documented for Concurrent+Undefined**/src/PatternKit.Examples/ObserverGeneratorDemo/- TemperatureMonitor.cs - Basic subscription patterns with fault tolerance- NotificationSystem.cs - Async handlers, multi-channel notifications, cancellation- README.md - Comprehensive usage guide with examples### Test CoverageComprehensive Test Suite:- ✅ All target type validation (class, record class, struct diagnostics)- ✅ All threading policies tested (SingleThreadedFast, Locking, Concurrent with both order modes)- ✅ Subscribe/unsubscribe lifecycle- ✅ Disposal during publish (snapshot semantics)- ✅ Registration order preservation- ✅ Async handlers with fire-and-forget- ✅ Mixed sync/async handler invocation- ✅ Exception policy Continue- ✅ Deterministic test synchronization (TaskCompletionSource)- ❌ Exception policy Stop- ❌ Exception policy AggregateTest Improvements Made:**- Added threading policy tests for SingleThreadedFast and both Concurrent modes- Replaced flaky Task.Delay with deterministic TaskCompletionSource- All tests assert EmitResult.Success with diagnostic output### Diagnostics- PKOBS001 (Error): Type marked [Observer] must be partial- PKOBS002 (Error): Observer attribute requires payload type argument- PKOBS003 (Warning): Unsupported observer type (struct, nested, generic) or invalid configuration### Quality Assurance- ✅ Fully reflection-free and AOT-compatible- ✅ No CS4014 warnings in generated code- ✅ Enum range validation with defaults- ✅ ForceAsync implies GenerateAsync=true automatically- ✅ All examples compile and work correctly- ✅ Nested type examples corrected to top-level- ✅ Thread-safe initialization for all concurrent modes- ✅ Proper using System.Linq; for ImmutableList operations- ✅ Uses Roslyn built-in SyntaxKind.PartialKeyword for partial detection- ✅ ConcurrentDictionary removal avoids undefined-order compaction racesDefault configuration (Continue exception policy, Locking threading) is production-ready and covers typical use cases.
Original prompt----This section details on the original issue you should resolve<issue_title>Generator: Create Observer Pattern</issue_title><issue_description>## SummaryAdd a source generator that produces a complete implementation of the Observer pattern for event publication and subscription, with safe-by-default lifetimes and deterministic behavior.The generator lives in PatternKit.Generators and emits code that is:* reflection-free* allocation-aware* explicit about threading policy* self-contained (no runtime PatternKit dependency)---## Motivation / ProblemObserver is easy to misuse:* leaking subscriptions* nondeterministic invocation order* unclear exception behavior (one subscriber breaks others?)* ad-hoc concurrency policiesWe want a generated implementation that makes the ΓÇ£rules of engagementΓÇ¥ explicit and testable.---## Supported Targets (must-have)The generator must support:* partial class* partial struct* partial record class* partial record structTwo consumption modes must be supported:1. Event type (a type represents one observable event stream).2. Event hub (a type groups multiple generated events).---## Proposed User Experience### A) Single event, payload-basedcsharp[Observer]public partial class TemperatureChanged { }Generated (representative shape):csharppublic partial class TemperatureChanged{ public IDisposable Subscribe(Action<Temperature> handler); public IDisposable Subscribe(Func<Temperature, ValueTask> handler); public void Publish(Temperature value); public ValueTask PublishAsync(Temperature value, CancellationToken ct = default);}### B) Event hub (multi-event grouping)csharp[ObserverHub]public static partial class SystemEvents{ [ObservedEvent] public static partial TemperatureChanged TemperatureChanged { get; } [ObservedEvent] public static partial ShutdownRequested ShutdownRequested { get; }}Generated semantics:* Each [ObservedEvent] property returns a singleton instance of that event stream.* Hub generation is optional, but if present must be deterministic and self-contained.---## Attributes / Surface AreaNamespace: PatternKit.Generators.Observer### Core* [Observer] on an event stream type* [ObserverHub] on a hub type* [ObservedEvent] on hub properties### ConfigurationObserverAttribute suggested properties:* ObserverThreadingPolicy Threading (default: Locking)* ObserverExceptionPolicy Exceptions (default: Continue)* ObserverOrderPolicy Order (default: RegistrationOrder)* bool GenerateAsync (default: inferred)* bool ForceAsync (default: false)Enums:* ObserverThreadingPolicy: SingleThreadedFast, Locking, Concurrent* ObserverExceptionPolicy: Stop, Continue, Aggregate* ObserverOrderPolicy: RegistrationOrder, Undefined---## Semantics (must-have)### Subscriptions* Subscribe(Action<T>) returns an IDisposable token.* Dispose() unsubscribes deterministically.* Duplicate subscriptions are allowed in v1 (invoked multiple times).### Publishing* Default order: RegistrationOrder.* Publishing uses snapshot semantics (publish iterates a stable snapshot so modifications during publish do not affect the current cycle).### Exception policies* Continue (default): invoke all handlers; exceptions do not stop others. * v1: either swallow exceptions or route them to an optional user hook (see below). Must be explicit.* Stop: first exception aborts.* Aggregate: run all and throw an AggregateException (or return a result) at the end.Recommended v1 behavior:* For sync Publish: Continue swallows by default but provides an optional hook: OnSubscriberError(Exception ex) if present.* For async PublishAsync: same semantics.### Async* Subscribe(Func<T, ValueTask>) must be supported.* PublishAsync invokes async handlers in deterministic order.* Cancellation token behavior: best-effort. If canceled before next invocation, stop and return canceled.### Threading policies* SingleThreadedFast: no locks; documented as not thread-safe.* Locking: lock around subscribe/unsubscribe; publish takes snapshot under lock.* Concurrent: thread-safe with concurrent primitives; ordering may degrade to Undefined unless extra work is done. Must be documented.---## Optional advanced features (explicitly v2 unless trivial)* Weak subscriptions* Backpressure / queueing* Filters / predicate subscriptions* ΓÇ£OnceΓÇ¥ subscriptions---## Diagnostics (must-have)Stable IDs, actionable:* PKOBS001 Type marked [Observer] must be partial.* PKOBS002 Hub type marked [ObserverHub] must be partial and static.* PKOBS003 Hub property marked [ObservedEvent] has invalid shape (must be static partial and return the event stream type).* PKOBS004 Async publish requested but async handler shape unsupported.* PKOBS005 ...
- Fixes #45---✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 8 commits February 19, 2026 04:20
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
…ribute

Complete rewrite of ObserverGenerator.cs to extract the payload type from the
[Observer(typeof(TPayload))] attribute constructor argument and generate type-safe
Subscribe/Publish methods.

Key features:
- Extract TPayload from attribute constructor (typeof(TPayload))
- Generate Subscribe(Action<TPayload>) and Subscribe(Func<TPayload, ValueTask>)
- Generate Publish(TPayload) and PublishAsync(TPayload, CancellationToken)
- Implement proper snapshot semantics for thread-safe iteration
- Support three threading policies:
  * SingleThreadedFast: No locking, just a List
  * Locking: Use lock() for thread safety (default)
  * Concurrent: Use Immutable collections for lock-free operation
- Support three exception policies:
  * Continue: Invoke all handlers, call optional OnSubscriberError hook
  * Stop: Rethrow first exception
  * Aggregate: Collect all exceptions and throw AggregateException
- Support RegistrationOrder (FIFO) and Undefined order policies
- Support all target type kinds (class, struct, record class, record struct)
- Handle structs without field initializers (C# 11+ compatibility)
- Nested private Subscription class implementing IDisposable
- Idempotent, thread-safe disposal
- Clean, deterministic code generation with proper nullability annotations

The generator now follows the same pattern as StrategyGenerator for extracting
constructor arguments and generating clean, focused implementation code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ty issues

- Add ObserverAttribute(Type payloadType) constructor to accept payload type
- Add PayloadType property to ObserverAttribute
- Update documentation example to show [Observer(typeof(Temperature))]
- Fix critical thread safety bugs in lock usage:
  * Use lock field assignment to ensure same lock object is used
  * Change 'lock (_lock ?? new object())' to proper initialization
- Add defensive null check for Attributes array access
- Ensure lock object is initialized before use in Publish and Unsubscribe

These fixes address code review feedback and ensure proper thread-safe operation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
- Created comprehensive documentation at docs/generators/observer.md
  - Overview and motivation
  - Basic usage examples with sync and async handlers
  - Configuration options (threading, exceptions, ordering)
  - Complete API reference (Subscribe, Publish, PublishAsync)
  - Best practices and performance considerations
  - Common patterns (observable properties, event aggregator)
  - Diagnostics reference (PKOBS001-003)
  - Troubleshooting guide

- Added real-world examples in src/PatternKit.Examples/ObserverGeneratorDemo/
  - TemperatureMonitor.cs: Basic Observer usage with temperature sensors
    - Demonstrates sync handlers, multiple subscribers
    - Exception handling with OnSubscriberError
    - Subscription lifecycle management
  - NotificationSystem.cs: Advanced async patterns
    - Multi-channel notifications (Email, SMS, Push)
    - Async handlers with PublishAsync
    - Exception policies (Continue vs Aggregate)
    - Cancellation token support
  - README.md: Comprehensive example documentation
    - Quick start guide
    - Configuration examples
    - Common patterns
    - Running instructions

- Updated docs/generators/toc.yml to include observer.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use positional parameters instead of named parameters with incorrect casing
in Notification record instantiation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI changed the title [WIP] Add source generator for Observer pattern implementation Add Observer Pattern Source Generator Feb 19, 2026
Copilot AI requested a review from JerrettDavis February 19, 2026 05:04
@JerrettDavis JerrettDavis requested a review from Copilot February 19, 2026 05:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Observer-pattern Roslyn incremental source generator to PatternKit, along with the public attribute surface area, documentation, examples, and generator-focused unit tests.

Changes:

  • Introduces ObserverGenerator plus new Observer attributes/enums in PatternKit.Generators.Abstractions.
  • Adds extensive docs and runnable examples for the generated Observer API.
  • Adds a new test suite for Observer generation and updates test lockfile dependencies.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
test/PatternKit.Generators.Tests/packages.lock.json Updates locked dependencies to support new test/project references.
test/PatternKit.Generators.Tests/ObserverGeneratorTests.cs Adds unit tests covering generation, subscribe/publish, ordering, async, and exception policies.
src/PatternKit.Generators/Observer/ObserverGenerator.cs Implements the incremental generator and emits the generated Observer implementation.
src/PatternKit.Generators/AnalyzerReleases.Unshipped.md Registers new diagnostic IDs PKOBS001–PKOBS003.
src/PatternKit.Generators.Abstractions/Observer/ObserverThreadingPolicy.cs Adds threading policy enum for the generator configuration surface.
src/PatternKit.Generators.Abstractions/Observer/ObserverOrderPolicy.cs Adds ordering policy enum for handler invocation ordering.
src/PatternKit.Generators.Abstractions/Observer/ObserverHubAttribute.cs Adds (future) hub-mode attribute surface.
src/PatternKit.Generators.Abstractions/Observer/ObserverExceptionPolicy.cs Adds exception policy enum for publish behavior.
src/PatternKit.Generators.Abstractions/Observer/ObserverAttribute.cs Adds primary [Observer] attribute and config properties.
src/PatternKit.Generators.Abstractions/Observer/ObservedEventAttribute.cs Adds (future) hub event property marker attribute.
src/PatternKit.Examples/ObserverGeneratorDemo/TemperatureMonitor.cs Adds sync usage examples (subscribe/publish, ordering, disposal, error hook).
src/PatternKit.Examples/ObserverGeneratorDemo/README.md Documents how to run and understand the example scenarios.
src/PatternKit.Examples/ObserverGeneratorDemo/NotificationSystem.cs Adds async usage examples (PublishAsync, exception policies, mixed handlers, cancellation).
docs/generators/toc.yml Adds Observer generator doc entry to generator docs navigation.
docs/generators/observer.md Adds full Observer generator documentation and diagnostics reference.

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

@JerrettDavis
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Copilot AI and others added 2 commits February 19, 2026 05:31
…ion, fire-and-forget async, disable struct support

Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
…ixed handler test, verify struct diagnostics

Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.


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

@JerrettDavis
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

…ets.Struct, improve async error handling, remove unused using

Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@JerrettDavis Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 9a136d00-3432-4cf5-b824-a20c42f7351b

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@JerrettDavis Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f51db1cb-48f7-4513-9afa-7c0dc5089c89

Sorry for the inconvenience!

4 similar comments
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@JerrettDavis Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f51db1cb-48f7-4513-9afa-7c0dc5089c89

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@JerrettDavis Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f51db1cb-48f7-4513-9afa-7c0dc5089c89

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@JerrettDavis Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f51db1cb-48f7-4513-9afa-7c0dc5089c89

Sorry for the inconvenience!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@JerrettDavis Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: f51db1cb-48f7-4513-9afa-7c0dc5089c89

Sorry for the inconvenience!

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

test/PatternKit.Generators.Tests/PatternKit.Generators.Tests.csproj

PackageVersionLicenseIssue Type
System.Collections.Immutable10.0.5NullUnknown License
Denied Licenses: GPL-2.0, GPL-3.0, AGPL-3.0

OpenSSF Scorecard

PackageVersionScoreDetails
nuget/System.Collections.Immutable 10.0.5 UnknownUnknown

Scanned Files

  • test/PatternKit.Generators.Tests/PatternKit.Generators.Tests.csproj

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

Test Results

417 tests   417 ✅  1m 36s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 6768ad8.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

🔍 PR Validation Results

Version: ``

✅ Validation Steps

  • Build solution
  • Run tests
  • Build documentation
  • Dry-run NuGet packaging

📊 Artifacts

Dry-run artifacts have been uploaded and will be available for 7 days.


This comment was automatically generated by the PR validation workflow.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.


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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage

Summary
  Generated on: 03/20/2026 - 02:22:08
  Coverage date: 03/20/2026 - 02:21:16 - 03/20/2026 - 02:22:01
  Parser: MultiReport (9x Cobertura)
  Assemblies: 4
  Classes: 458
  Files: 238
  Line coverage: 80.9%
  Covered lines: 16388
  Uncovered lines: 3869
  Coverable lines: 20257
  Total lines: 49581
  Branch coverage: 73.9% (5455 of 7373)
  Covered branches: 5455
  Total branches: 7373
  Method coverage: 79.3% (2741 of 3456)
  Full method coverage: 71.7% (2481 of 3456)
  Covered methods: 2741
  Fully covered methods: 2481
  Total methods: 3456

PatternKit.Core                                                                                                   96.8%
  PatternKit.Behavioral.Chain.ActionChain<T>                                                                       100%
  PatternKit.Behavioral.Chain.AsyncActionChain<T>                                                                  100%
  PatternKit.Behavioral.Chain.AsyncResultChain<T1, T2>                                                            97.7%
  PatternKit.Behavioral.Chain.ResultChain<T1, T2>                                                                  100%
  PatternKit.Behavioral.Command.Command<T>                                                                         100%
  PatternKit.Behavioral.Interpreter.ActionInterpreter                                                              100%
  PatternKit.Behavioral.Interpreter.ActionInterpreter<T>                                                          96.9%
  PatternKit.Behavioral.Interpreter.ActionInterpreterBuilder<T>                                                    100%
  PatternKit.Behavioral.Interpreter.AsyncActionInterpreter                                                         100%
  PatternKit.Behavioral.Interpreter.AsyncActionInterpreter<T>                                                      100%
  PatternKit.Behavioral.Interpreter.AsyncActionInterpreterBuilder<T>                                               100%
  PatternKit.Behavioral.Interpreter.AsyncInterpreter                                                               100%
  PatternKit.Behavioral.Interpreter.AsyncInterpreter<T1, T2>                                                      96.8%
  PatternKit.Behavioral.Interpreter.AsyncInterpreterBuilder<T1, T2>                                                100%
  PatternKit.Behavioral.Interpreter.Builder<T1, T2>                                                                 96%
  PatternKit.Behavioral.Interpreter.ExpressionExtensions                                                           100%
  PatternKit.Behavioral.Interpreter.Interpreter                                                                    100%
  PatternKit.Behavioral.Interpreter.Interpreter<T1, T2>                                                           96.6%
  PatternKit.Behavioral.Interpreter.NonTerminalExpression                                                          100%
  PatternKit.Behavioral.Interpreter.TerminalExpression                                                             100%
  PatternKit.Behavioral.Iterator.AsyncFlow<T>                                                                      100%
  PatternKit.Behavioral.Iterator.AsyncFlowExtensions                                                               100%
  PatternKit.Behavioral.Iterator.AsyncReplayBuffer<T>                                                             93.9%
  PatternKit.Behavioral.Iterator.Flow<T>                                                                          94.4%
  PatternKit.Behavioral.Iterator.FlowExtensions                                                                    100%
  PatternKit.Behavioral.Iterator.ReplayableSequence<T>                                                            98.2%
  PatternKit.Behavioral.Iterator.ReplayableSequenceExtensions                                                      100%
  PatternKit.Behavioral.Iterator.SharedAsyncFlow<T>                                                                100%
  PatternKit.Behavioral.Iterator.SharedFlow<T>                                                                     100%
  PatternKit.Behavioral.Iterator.WindowSequence                                                                    100%
  PatternKit.Behavioral.Mediator.Mediator                                                                         91.9%
  PatternKit.Behavioral.Mediator.MediatorHelpers                                                                   100%
  PatternKit.Behavioral.Mediator.TaskExtensions                                                                    100%
  PatternKit.Behavioral.Memento.Memento<T>                                                                         100%
  PatternKit.Behavioral.Observer.AsyncObserver<T>                                                                 98.7%
  PatternKit.Behavioral.Observer.Observer<T>                                                                      98.2%
  PatternKit.Behavioral.State.AsyncStateMachine<T1, T2>                                                             95%
  PatternKit.Behavioral.State.StateMachine<T1, T2>                                                                  99%
  PatternKit.Behavioral.Strategy.ActionStrategy<T>                                                                  97%
  PatternKit.Behavioral.Strategy.AsyncActionStrategy<T>                                                            100%
  PatternKit.Behavioral.Strategy.AsyncStrategy<T1, T2>                                                             100%
  PatternKit.Behavioral.Strategy.Strategy<T1, T2>                                                                  100%
  PatternKit.Behavioral.Strategy.TryStrategy<T1, T2>                                                              95.8%
  PatternKit.Behavioral.Template.ActionTemplate<T>                                                                 100%
  PatternKit.Behavioral.Template.AsyncActionTemplate<T>                                                            100%
  PatternKit.Behavioral.Template.AsyncTemplate<T1, T2>                                                            97.1%
  PatternKit.Behavioral.Template.AsyncTemplateMethod<T1, T2>                                                       100%
  PatternKit.Behavioral.Template.Template<T1, T2>                                                                  100%
  PatternKit.Behavioral.Template.TemplateMethod<T1, T2>                                                            100%
  PatternKit.Behavioral.TypeDispatcher.ActionTypeDispatcher<T>                                                    91.4%
  PatternKit.Behavioral.TypeDispatcher.AsyncActionTypeDispatcher<T>                                               94.5%
  PatternKit.Behavioral.TypeDispatcher.AsyncTypeDispatcher<T1, T2>                                                94.4%
  PatternKit.Behavioral.TypeDispatcher.TypeDispatcher<T1, T2>                                                      100%
  PatternKit.Behavioral.Visitor.ActionVisitor<T>                                                                  85.7%
  PatternKit.Behavioral.Visitor.ActionVisitorBase<T>                                                               100%
  PatternKit.Behavioral.Visitor.AsyncActionVisitor<T>                                                             94.5%
  PatternKit.Behavioral.Visitor.AsyncFluentActionVisitor<T>                                                        100%
  PatternKit.Behavioral.Visitor.AsyncFluentVisitor<T1, T2>                                                         100%
  PatternKit.Behavioral.Visitor.AsyncVisitor<T1, T2>                                                              86.1%
  PatternKit.Behavioral.Visitor.FluentActionVisitor<T>                                                             100%
  PatternKit.Behavioral.Visitor.FluentVisitor<T1, T2>                                                              100%
  PatternKit.Behavioral.Visitor.Visitor<T1, T2>                                                                   91.1%
  PatternKit.Behavioral.Visitor.VisitorBase<T1, T2>                                                                100%
  PatternKit.Common.Option<T>                                                                                      100%
  PatternKit.Common.Throw                                                                                          100%
  PatternKit.Common.TryHandlerExtensions                                                                           100%
  PatternKit.Creational.AbstractFactory.AbstractFactory<T>                                                        91.6%
  PatternKit.Creational.Builder.BranchBuilder<T1, T2>                                                              100%
  PatternKit.Creational.Builder.BuilderExtensions                                                                  100%
  PatternKit.Creational.Builder.ChainBuilder<T>                                                                    100%
  PatternKit.Creational.Builder.Composer<T1, T2>                                                                   100%
  PatternKit.Creational.Builder.MutableBuilder<T>                                                                  100%
  PatternKit.Creational.Factory.Factory<T1, T2>                                                                   92.3%
  PatternKit.Creational.Factory.Factory<T1, T2, T3>                                                               92.3%
  PatternKit.Creational.Prototype.Prototype<T>                                                                     100%
  PatternKit.Creational.Prototype.Prototype<T1, T2>                                                                 90%
  PatternKit.Creational.Singleton.Singleton<T>                                                                    96.5%
  PatternKit.Structural.Adapter.Adapter<T1, T2>                                                                    100%
  PatternKit.Structural.Adapter.AsyncAdapter<T1, T2>                                                               100%
  PatternKit.Structural.Bridge.ActionBridge<T1, T2>                                                               90.9%
  PatternKit.Structural.Bridge.AsyncActionBridge<T1, T2>                                                          96.5%
  PatternKit.Structural.Bridge.AsyncBridge<T1, T2, T3>                                                            90.6%
  PatternKit.Structural.Bridge.Bridge<T1, T2, T3>                                                                  100%
  PatternKit.Structural.Composite.ActionComposite<T>                                                               100%
  PatternKit.Structural.Composite.AsyncActionComposite<T>                                                          100%
  PatternKit.Structural.Composite.AsyncComposite<T1, T2>                                                          97.8%
  PatternKit.Structural.Composite.Composite<T1, T2>                                                               97.3%
  PatternKit.Structural.Decorator.ActionDecorator<T>                                                               100%
  PatternKit.Structural.Decorator.AsyncActionDecorator<T>                                                          100%
  PatternKit.Structural.Decorator.AsyncDecorator<T1, T2>                                                            98%
  PatternKit.Structural.Decorator.Decorator<T1, T2>                                                               97.6%
  PatternKit.Structural.Facade.Facade<T1, T2>                                                                     88.8%
  PatternKit.Structural.Facade.TypedFacade<T>                                                                     79.4%
  PatternKit.Structural.Facade.TypedFacadeDispatchProxy<T>                                                        81.8%
  PatternKit.Structural.Facade.TypedFacadeProxyFactory<T>                                                          100%
  PatternKit.Structural.Flyweight.Flyweight<T1, T2>                                                               97.9%
  PatternKit.Structural.Proxy.ActionProxy<T>                                                                       100%
  PatternKit.Structural.Proxy.AsyncActionProxy<T>                                                                  100%
  PatternKit.Structural.Proxy.AsyncProxy<T1, T2>                                                                  98.6%
  PatternKit.Structural.Proxy.Proxy<T1, T2>                                                                       98.8%

PatternKit.Examples                                                                                               62.4%
  PatternKit.Examples.AbstractFactoryDemo.AbstractFactoryDemo                                                     98.2%
  PatternKit.Examples.AdapterGeneratorDemo.ClockAdapterMappings                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.ConsoleLoggerAdapter                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.LegacyConsoleLogger                                                     100%
  PatternKit.Examples.AdapterGeneratorDemo.LegacySystemClock                                                       100%
  PatternKit.Examples.AdapterGeneratorDemo.LoggerAdapterMappings                                                   100%
  PatternKit.Examples.AdapterGeneratorDemo.PaymentResult                                                           100%
  PatternKit.Examples.AdapterGeneratorDemo.PayPalAdapterMappings                                                   100%
  PatternKit.Examples.AdapterGeneratorDemo.PayPalAmount                                                            100%
  PatternKit.Examples.AdapterGeneratorDemo.PayPalPaymentAdapter                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.PayPalPaymentService                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.PayPalRefund                                                            100%
  PatternKit.Examples.AdapterGeneratorDemo.PayPalTransaction                                                       100%
  PatternKit.Examples.AdapterGeneratorDemo.RefundResult                                                            100%
  PatternKit.Examples.AdapterGeneratorDemo.StripeAdapterMappings                                                   100%
  PatternKit.Examples.AdapterGeneratorDemo.StripeChargeRequest                                                     100%
  PatternKit.Examples.AdapterGeneratorDemo.StripeChargeResponse                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.StripePaymentAdapter                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.StripePaymentClient                                                     100%
  PatternKit.Examples.AdapterGeneratorDemo.StripeRefundResponse                                                    100%
  PatternKit.Examples.AdapterGeneratorDemo.SystemClockAdapter                                                      100%
  PatternKit.Examples.ApiGateway.Demo                                                                             97.9%
  PatternKit.Examples.ApiGateway.MiniRouter                                                                       96.6%
  PatternKit.Examples.ApiGateway.Request                                                                            75%
  PatternKit.Examples.ApiGateway.Response                                                                          100%
  PatternKit.Examples.ApiGateway.Responses                                                                         100%
  PatternKit.Examples.AsyncStateDemo.ConnectionStateDemo                                                          93.5%
  PatternKit.Examples.BridgeDemo.BridgeDemo                                                                       96.7%
  PatternKit.Examples.Chain.AuthLoggingDemo                                                                       95.2%
  PatternKit.Examples.Chain.CardProcessors                                                                         100%
  PatternKit.Examples.Chain.CardTenderStrategy                                                                    77.7%
  PatternKit.Examples.Chain.CashTenderStrategy                                                                     100%
  PatternKit.Examples.Chain.ChainStage                                                                             100%
  PatternKit.Examples.Chain.CharityRoundUpRule                                                                      50%
  PatternKit.Examples.Chain.ConfigDriven.Bundle1OffEach                                                           14.2%
  PatternKit.Examples.Chain.ConfigDriven.CardTender                                                               72.2%
  PatternKit.Examples.Chain.ConfigDriven.Cash2Pct                                                                 16.6%
  PatternKit.Examples.Chain.ConfigDriven.CashTender                                                               90.9%
  PatternKit.Examples.Chain.ConfigDriven.CharityRoundUp                                                            100%
  PatternKit.Examples.Chain.ConfigDriven.ConfigDrivenPipelineBuilderExtensions                                    94.2%
  PatternKit.Examples.Chain.ConfigDriven.ConfigDrivenPipelineDemo                                                  100%
  PatternKit.Examples.Chain.ConfigDriven.Loyalty5Pct                                                                20%
  PatternKit.Examples.Chain.ConfigDriven.NickelCashOnly                                                           77.7%
  PatternKit.Examples.Chain.ConfigDriven.PipelineOptions                                                           100%
  PatternKit.Examples.Chain.Customer                                                                               100%
  PatternKit.Examples.Chain.DeviceBus                                                                              100%
  PatternKit.Examples.Chain.GenericProcessor                                                                       100%
  PatternKit.Examples.Chain.HttpRequest                                                                            100%
  PatternKit.Examples.Chain.IRoundingRule                                                                          100%
  PatternKit.Examples.Chain.LineItem                                                                               100%
  PatternKit.Examples.Chain.MediatedTransactionPipelineDemo                                                        100%
  PatternKit.Examples.Chain.NickelCashOnlyRule                                                                     100%
  PatternKit.Examples.Chain.NoopCharityTracker                                                                     100%
  PatternKit.Examples.Chain.RoundingPipeline                                                                       100%
  PatternKit.Examples.Chain.Tender                                                                                 100%
  PatternKit.Examples.Chain.TenderRouterFactory                                                                   91.3%
  PatternKit.Examples.Chain.TransactionContext                                                                     100%
  PatternKit.Examples.Chain.TransactionPipeline                                                                    100%
  PatternKit.Examples.Chain.TransactionPipelineBuilder                                                            92.3%
  PatternKit.Examples.Chain.TxResult                                                                               100%
  PatternKit.Examples.CompositeDemo.CompositeDemo                                                                  100%
  PatternKit.Examples.Decorators.CachingFileStorage                                                                  0%
  PatternKit.Examples.Decorators.FileStorageDecoratorBase                                                            0%
  PatternKit.Examples.Decorators.FileStorageDecorators                                                               0%
  PatternKit.Examples.Decorators.InMemoryFileStorage                                                                 0%
  PatternKit.Examples.Decorators.LoggingFileStorage                                                                  0%
  PatternKit.Examples.Decorators.RetryFileStorage                                                                    0%
  PatternKit.Examples.Decorators.StorageDecoratorDemo                                                                0%
  PatternKit.Examples.EnterpriseDemo.EnterpriseOrderDemo                                                          97.1%
  PatternKit.Examples.FacadeDemo.FacadeDemo                                                                        100%
  PatternKit.Examples.FlyweightDemo.FlyweightDemo                                                                 96.9%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.BackgroundJobsModule                     100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.CorporateApp                             100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.CorporateApplication                      45%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.CorporateApplicationBuilder             52.6%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.CorporateApplicationBuilderExtensions   94.7%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.CorporateApplicationDemo                27.2%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.CorporateAppState                        100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.InMemoryJobScheduler                     100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.MessagingModule                          100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.NotificationOptions                        0%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.ObservabilityModule                      100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.QueueNotificationPublisher               100%
  PatternKit.Examples.Generators.Builders.CorporateApplicationBuilderDemo.SecretsProvider                          100%
  PatternKit.Examples.Generators.Facade.BillingFacade                                                              100%
  PatternKit.Examples.Generators.Facade.BillingFacadeDemo                                                           96%
  PatternKit.Examples.Generators.Facade.BillingHost                                                               96.1%
  PatternKit.Examples.Generators.Facade.BillingResult                                                              100%
  PatternKit.Examples.Generators.Facade.DeliveryEstimator                                                           70%
  PatternKit.Examples.Generators.Facade.Invoice                                                                    100%
  PatternKit.Examples.Generators.Facade.InvoiceService                                                             100%
  PatternKit.Examples.Generators.Facade.NotificationService                                                         50%
  PatternKit.Examples.Generators.Facade.PaymentProcessor                                                            62%
  PatternKit.Examples.Generators.Facade.PaymentRecord                                                              100%
  PatternKit.Examples.Generators.Facade.PaymentResult                                                              100%
  PatternKit.Examples.Generators.Facade.RateCalculator                                                              75%
  PatternKit.Examples.Generators.Facade.RefundResult                                                                40%
  PatternKit.Examples.Generators.Facade.ShippingFacade                                                             100%
  PatternKit.Examples.Generators.Facade.ShippingFacadeDemo                                                         100%
  PatternKit.Examples.Generators.Facade.ShippingHost                                                              90.9%
  PatternKit.Examples.Generators.Facade.ShippingValidator                                                          100%
  PatternKit.Examples.Generators.Facade.TaxService                                                                91.6%
  PatternKit.Examples.Generators.Factories.ApplicationOrchestrator                                                   0%
  PatternKit.Examples.Generators.Factories.BackgroundWorker                                                        100%
  PatternKit.Examples.Generators.Factories.ConsoleMetricsSink                                                      100%
  PatternKit.Examples.Generators.Factories.MemoryCacheProvider                                                     100%
  PatternKit.Examples.Generators.Factories.OrchestratorStepFactory                                                31.7%
  PatternKit.Examples.Generators.Factories.SeedDataStep                                                            100%
  PatternKit.Examples.Generators.Factories.ServiceModuleBootstrap                                                  100%
  PatternKit.Examples.Generators.Factories.ServiceModules                                                         54.8%
  PatternKit.Examples.Generators.Factories.StartWorkersStep                                                        100%
  PatternKit.Examples.Generators.Factories.WarmCacheStep                                                           100%
  PatternKit.Examples.Generators.Memento.EditorStateDemo                                                             0%
  PatternKit.Examples.Generators.Memento.EditorStateHistory                                                          0%
  PatternKit.Examples.Generators.Memento.EditorStateMemento                                                          0%
  PatternKit.Examples.Generators.Memento.GameStateDemo                                                               0%
  PatternKit.Examples.Generators.Memento.GameStateHistory                                                            0%
  PatternKit.Examples.Generators.Memento.GameStateMemento                                                            0%
  PatternKit.Examples.Generators.State.DocumentWorkflow                                                              0%
  PatternKit.Examples.Generators.State.OrderFlow                                                                     0%
  PatternKit.Examples.Generators.State.OrderFlowDemo                                                                 0%
  PatternKit.Examples.Generators.Strategies.IntParser                                                               60%
  PatternKit.Examples.Generators.Strategies.OrderRouter                                                           95.2%
  PatternKit.Examples.Generators.Strategies.ScoreLabeler                                                           100%
  PatternKit.Examples.Generators.Visitors.Document                                                                   0%
  PatternKit.Examples.Generators.Visitors.DocumentActionVisitorBuilder                                               0%
  PatternKit.Examples.Generators.Visitors.DocumentAsyncActionVisitorBuilder                                          0%
  PatternKit.Examples.Generators.Visitors.DocumentAsyncVisitorBuilder<T>                                             0%
  PatternKit.Examples.Generators.Visitors.DocumentProcessingDemo                                                     0%
  PatternKit.Examples.Generators.Visitors.DocumentVisitorBuilder<T>                                                  0%
  PatternKit.Examples.Generators.Visitors.MarkdownDocument                                                           0%
  PatternKit.Examples.Generators.Visitors.PdfDocument                                                                0%
  PatternKit.Examples.Generators.Visitors.SpreadsheetDocument                                                        0%
  PatternKit.Examples.Generators.Visitors.WordDocument                                                               0%
  PatternKit.Examples.InterpreterDemo.InterpreterDemo                                                             93.1%
  PatternKit.Examples.IteratorDemo.IteratorDemo                                                                   98.8%
  PatternKit.Examples.MediatorDemo.AppMediator                                                                     100%
  PatternKit.Examples.MediatorDemo.AuditLogHandler                                                                 100%
  PatternKit.Examples.MediatorDemo.BoxHelper                                                                        25%
  PatternKit.Examples.MediatorDemo.CountUpCmd                                                                      100%
  PatternKit.Examples.MediatorDemo.CountUpHandler                                                                  100%
  PatternKit.Examples.MediatorDemo.EchoCmd                                                                         100%
  PatternKit.Examples.MediatorDemo.EchoHandler                                                                     100%
  PatternKit.Examples.MediatorDemo.LoggingBehavior<T1, T2>                                                         100%
  PatternKit.Examples.MediatorDemo.MediatorAssemblyScanner                                                         100%
  PatternKit.Examples.MediatorDemo.MediatorDemoSink                                                                100%
  PatternKit.Examples.MediatorDemo.MediatorRegistry                                                                100%
  PatternKit.Examples.MediatorDemo.PingCmd                                                                         100%
  PatternKit.Examples.MediatorDemo.PingHandler                                                                     100%
  PatternKit.Examples.MediatorDemo.ServiceCollectionExtensions                                                    83.3%
  PatternKit.Examples.MediatorDemo.SumCmd                                                                          100%
  PatternKit.Examples.MediatorDemo.SumCmdBehavior                                                                  100%
  PatternKit.Examples.MediatorDemo.SumHandler                                                                      100%
  PatternKit.Examples.MediatorDemo.UserCreated                                                                     100%
  PatternKit.Examples.MediatorDemo.WelcomeEmailHandler                                                             100%
  PatternKit.Examples.MementoDemo.MementoDemo                                                                     83.5%
  PatternKit.Examples.Messaging.CreateUser                                                                           0%
  PatternKit.Examples.Messaging.DispatcherUsageExamples                                                              0%
  PatternKit.Examples.Messaging.EmailSent                                                                            0%
  PatternKit.Examples.Messaging.OrderPlaced                                                                          0%
  PatternKit.Examples.Messaging.PagedItem                                                                            0%
  PatternKit.Examples.Messaging.PagedRequest                                                                         0%
  PatternKit.Examples.Messaging.SearchQuery                                                                          0%
  PatternKit.Examples.Messaging.SearchResult                                                                         0%
  PatternKit.Examples.Messaging.SendEmail                                                                            0%
  PatternKit.Examples.Messaging.SourceGenerated.ComprehensiveMediatorDemo                                            0%
  PatternKit.Examples.Messaging.SourceGenerated.CreateCustomerCommand                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.CreateCustomerHandler                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.Customer                                                             0%
  PatternKit.Examples.Messaging.SourceGenerated.CustomerCreatedEvent                                                 0%
  PatternKit.Examples.Messaging.SourceGenerated.GetCustomerHandler                                                   0%
  PatternKit.Examples.Messaging.SourceGenerated.GetCustomerQuery                                                     0%
  PatternKit.Examples.Messaging.SourceGenerated.GetOrdersByCustomerHandler                                           0%
  PatternKit.Examples.Messaging.SourceGenerated.GetOrdersByCustomerQuery                                             0%
  PatternKit.Examples.Messaging.SourceGenerated.InMemoryCustomerRepository                                           0%
  PatternKit.Examples.Messaging.SourceGenerated.InMemoryLogger                                                       0%
  PatternKit.Examples.Messaging.SourceGenerated.InMemoryOrderRepository                                              0%
  PatternKit.Examples.Messaging.SourceGenerated.InMemoryProductRepository                                            0%
  PatternKit.Examples.Messaging.SourceGenerated.LoggingBehavior<T1, T2>                                              0%
  PatternKit.Examples.Messaging.SourceGenerated.MediatorServiceCollectionExtensions                                  0%
  PatternKit.Examples.Messaging.SourceGenerated.NotifyInventoryHandler                                               0%
  PatternKit.Examples.Messaging.SourceGenerated.Order                                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.OrderItem                                                            0%
  PatternKit.Examples.Messaging.SourceGenerated.OrderPlacedEvent                                                     0%
  PatternKit.Examples.Messaging.SourceGenerated.PaymentProcessedEvent                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.PerformanceBehavior<T1, T2>                                          0%
  PatternKit.Examples.Messaging.SourceGenerated.PlaceOrderCommand                                                    0%
  PatternKit.Examples.Messaging.SourceGenerated.PlaceOrderHandler                                                    0%
  PatternKit.Examples.Messaging.SourceGenerated.ProcessPaymentCommand                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.ProcessPaymentHandler                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.ProductionDispatcher                                                 0%
  PatternKit.Examples.Messaging.SourceGenerated.ProductSearchResult                                                  0%
  PatternKit.Examples.Messaging.SourceGenerated.RecordPaymentAuditHandler                                            0%
  PatternKit.Examples.Messaging.SourceGenerated.SearchProductsHandler                                                0%
  PatternKit.Examples.Messaging.SourceGenerated.SearchProductsQuery                                                  0%
  PatternKit.Examples.Messaging.SourceGenerated.SendOrderConfirmationHandler                                         0%
  PatternKit.Examples.Messaging.SourceGenerated.SendWelcomeEmailHandler                                              0%
  PatternKit.Examples.Messaging.SourceGenerated.TransactionBehavior<T1, T2>                                          0%
  PatternKit.Examples.Messaging.SourceGenerated.UpdateCustomerStatsHandler                                           0%
  PatternKit.Examples.Messaging.SourceGenerated.ValidationBehavior<T1, T2>                                           0%
  PatternKit.Examples.Messaging.UserCreated                                                                          0%
  PatternKit.Examples.Messaging.UserRegistered                                                                       0%
  PatternKit.Examples.ObserverDemo.EventHub<T>                                                                     100%
  PatternKit.Examples.ObserverDemo.LineItem                                                                        100%
  PatternKit.Examples.ObserverDemo.ObservableList<T>                                                                47%
  PatternKit.Examples.ObserverDemo.ObservableVar<T>                                                                100%
  PatternKit.Examples.ObserverDemo.ProfileViewModel                                                                100%
  PatternKit.Examples.ObserverDemo.PropertyChangedHub                                                              100%
  PatternKit.Examples.ObserverDemo.ReactiveTransaction                                                            95.4%
  PatternKit.Examples.ObserverDemo.UserEvent                                                                       100%
  PatternKit.Examples.ObserverGeneratorDemo.AsyncNotificationDemo                                                    0%
  PatternKit.Examples.ObserverGeneratorDemo.CancellationDemo                                                         0%
  PatternKit.Examples.ObserverGeneratorDemo.ExceptionHandlingDemo                                                    0%
  PatternKit.Examples.ObserverGeneratorDemo.MixedHandlersDemo                                                        0%
  PatternKit.Examples.ObserverGeneratorDemo.MultipleSubscribersDemo                                                  0%
  PatternKit.Examples.ObserverGeneratorDemo.Notification                                                             0%
  PatternKit.Examples.ObserverGeneratorDemo.NotificationPublished                                                    0%
  PatternKit.Examples.ObserverGeneratorDemo.NotificationResult                                                       0%
  PatternKit.Examples.ObserverGeneratorDemo.NotificationSent                                                         0%
  PatternKit.Examples.ObserverGeneratorDemo.NotificationSystem                                                       0%
  PatternKit.Examples.ObserverGeneratorDemo.SubscriptionLifecycleDemo                                                0%
  PatternKit.Examples.ObserverGeneratorDemo.TemperatureAlert                                                         0%
  PatternKit.Examples.ObserverGeneratorDemo.TemperatureAlertRaised                                                   0%
  PatternKit.Examples.ObserverGeneratorDemo.TemperatureChanged                                                       0%
  PatternKit.Examples.ObserverGeneratorDemo.TemperatureMonitorDemo                                                   0%
  PatternKit.Examples.ObserverGeneratorDemo.TemperatureMonitoringSystem                                              0%
  PatternKit.Examples.ObserverGeneratorDemo.TemperatureReading                                                       0%
  PatternKit.Examples.PatternShowcase.PatternShowcase                                                             91.2%
  PatternKit.Examples.PointOfSale.CustomerInfo                                                                     100%
  PatternKit.Examples.PointOfSale.Demo                                                                            99.6%
  PatternKit.Examples.PointOfSale.OrderLineItem                                                                    100%
  PatternKit.Examples.PointOfSale.PaymentProcessorDemo                                                            95.7%
  PatternKit.Examples.PointOfSale.PaymentReceipt                                                                   100%
  PatternKit.Examples.PointOfSale.PromotionConfig                                                                  100%
  PatternKit.Examples.PointOfSale.PurchaseOrder                                                                    100%
  PatternKit.Examples.PointOfSale.ReceiptLineItem                                                                  100%
  PatternKit.Examples.PointOfSale.StoreLocation                                                                    100%
  PatternKit.Examples.Pricing.ApiPricingSource                                                                     100%
  PatternKit.Examples.Pricing.CharityRoundUpRule                                                                   100%
  PatternKit.Examples.Pricing.Coupon                                                                               100%
  PatternKit.Examples.Pricing.DbPricingSource                                                                      100%
  PatternKit.Examples.Pricing.DefaultSourceRouting                                                                83.3%
  PatternKit.Examples.Pricing.FilePricingSource                                                                    100%
  PatternKit.Examples.Pricing.LineItem                                                                             100%
  PatternKit.Examples.Pricing.Location                                                                             100%
  PatternKit.Examples.Pricing.LoyaltyMembership                                                                    100%
  PatternKit.Examples.Pricing.NickelCashOnlyRule                                                                   100%
  PatternKit.Examples.Pricing.PercentLoyaltyRule                                                                   100%
  PatternKit.Examples.Pricing.PricingContext                                                                       100%
  PatternKit.Examples.Pricing.PricingDemo                                                                         56.7%
  PatternKit.Examples.Pricing.PricingPipeline                                                                      100%
  PatternKit.Examples.Pricing.PricingPipelineBuilder                                                               100%
  PatternKit.Examples.Pricing.PricingResult                                                                        100%
  PatternKit.Examples.Pricing.RegionCategoryTaxPolicy                                                              100%
  PatternKit.Examples.Pricing.Sku                                                                                 85.7%
  PatternKit.Examples.Pricing.SourceRouter                                                                        92.3%
  PatternKit.Examples.PrototypeDemo.PrototypeDemo                                                                  100%
  PatternKit.Examples.ProxyDemo.ProxyDemo                                                                         94.5%
  PatternKit.Examples.ProxyGeneratorDemo.GetTransactionHistoryMethodContext                                          0%
  PatternKit.Examples.ProxyGeneratorDemo.Interceptors.AuthenticationInterceptor                                      0%
  PatternKit.Examples.ProxyGeneratorDemo.Interceptors.CachingInterceptor                                             0%
  PatternKit.Examples.ProxyGeneratorDemo.Interceptors.LoggingInterceptor                                             0%
  PatternKit.Examples.ProxyGeneratorDemo.Interceptors.RetryInterceptor                                               0%
  PatternKit.Examples.ProxyGeneratorDemo.Interceptors.TimingInterceptor                                              0%
  PatternKit.Examples.ProxyGeneratorDemo.PaymentRequest                                                              0%
  PatternKit.Examples.ProxyGeneratorDemo.PaymentResult                                                               0%
  PatternKit.Examples.ProxyGeneratorDemo.PaymentServiceProxy                                                         0%
  PatternKit.Examples.ProxyGeneratorDemo.ProcessPaymentAsyncMethodContext                                            0%
  PatternKit.Examples.ProxyGeneratorDemo.ProcessPaymentMethodContext                                                 0%
  PatternKit.Examples.ProxyGeneratorDemo.ProxyGeneratorDemo                                                          0%
  PatternKit.Examples.ProxyGeneratorDemo.RealPaymentService                                                          0%
  PatternKit.Examples.ProxyGeneratorDemo.Transaction                                                                 0%
  PatternKit.Examples.Singleton.DeviceRegistry                                                                     100%
  PatternKit.Examples.Singleton.PosAppState                                                                        100%
  PatternKit.Examples.Singleton.PosAppStateDemo                                                                    100%
  PatternKit.Examples.Singleton.PricingCache                                                                       100%
  PatternKit.Examples.Singleton.StoreConfig                                                                        100%
  PatternKit.Examples.SingletonGeneratorDemo.AppClock                                                             71.4%
  PatternKit.Examples.SingletonGeneratorDemo.ConfigManager                                                        90.4%
  PatternKit.Examples.SingletonGeneratorDemo.ServiceRegistry                                                      95.4%
  PatternKit.Examples.StateDemo.OrderStateDemo                                                                     100%
  PatternKit.Examples.Strategies.Coercion.Coercer<T>                                                              83.3%
  PatternKit.Examples.Strategies.Coercion.CoercerExtensions                                                        100%
  PatternKit.Examples.Strategies.Composed.ChannelPolicy                                                            100%
  PatternKit.Examples.Strategies.Composed.ChannelPolicyFactory                                                     100%
  PatternKit.Examples.Strategies.Composed.ComposedStrategies                                                      94.2%
  PatternKit.Examples.Strategies.Composed.SendContext                                                              100%
  PatternKit.Examples.Strategies.Composed.SendResult                                                               100%
  PatternKit.Examples.TemplateDemo.AsyncDataPipeline                                                               100%
  PatternKit.Examples.TemplateDemo.DataProcessor                                                                   100%
  PatternKit.Examples.TemplateDemo.TemplateAsyncFluentDemo                                                         100%
  PatternKit.Examples.TemplateDemo.TemplateFluentDemo                                                               90%
  PatternKit.Examples.TemplateDemo.TemplateMethodDemo                                                              100%
  PatternKit.Examples.TemplateMethodGeneratorDemo.DataRecord                                                       100%
  PatternKit.Examples.TemplateMethodGeneratorDemo.ImportContext                                                    100%
  PatternKit.Examples.TemplateMethodGeneratorDemo.ImportWorkflow                                                   100%
  PatternKit.Examples.TemplateMethodGeneratorDemo.ImportWorkflowDemo                                              88.4%
  PatternKit.Examples.TemplateMethodGeneratorDemo.OrderContext                                                     100%
  PatternKit.Examples.TemplateMethodGeneratorDemo.OrderProcessingDemo                                             85.7%
  PatternKit.Examples.TemplateMethodGeneratorDemo.OrderProcessingWorkflow                                         95.5%
  PatternKit.Examples.VisitorDemo.Card                                                                             100%
  PatternKit.Examples.VisitorDemo.Cash                                                                             100%
  PatternKit.Examples.VisitorDemo.CountersHandler                                                                  100%
  PatternKit.Examples.VisitorDemo.Demo                                                                             100%
  PatternKit.Examples.VisitorDemo.GiftCard                                                                         100%
  PatternKit.Examples.VisitorDemo.ReceiptRendering                                                                 100%
  PatternKit.Examples.VisitorDemo.Routing                                                                          100%
  PatternKit.Examples.VisitorDemo.StoreCredit                                                                      100%
  PatternKit.Examples.VisitorDemo.Tender                                                                           100%
  PatternKit.Examples.VisitorDemo.Unknown                                                                          100%

PatternKit.Generators                                                                                             91.8%
  PatternKit.Generators.Adapter.AdapterGenerator                                                                  90.7%
  PatternKit.Generators.Builders.BuilderGenerator                                                                 96.3%
  PatternKit.Generators.ComposerGenerator                                                                         87.6%
  PatternKit.Generators.DecoratorGenerator                                                                        90.5%
  PatternKit.Generators.FacadeGenerator                                                                           92.8%
  PatternKit.Generators.Factories.FactoriesGenerator                                                              86.6%
  PatternKit.Generators.MementoGenerator                                                                          94.8%
  PatternKit.Generators.Messaging.DispatcherGenerator                                                             98.1%
  PatternKit.Generators.Observer.ObserverGenerator                                                                92.3%
  PatternKit.Generators.PrototypeGenerator                                                                        95.3%
  PatternKit.Generators.ProxyGenerator                                                                              85%
  PatternKit.Generators.Singleton.SingletonGenerator                                                              98.1%
  PatternKit.Generators.StateMachineGenerator                                                                     92.6%
  PatternKit.Generators.StrategyGenerator                                                                         93.9%
  PatternKit.Generators.TemplateGenerator                                                                         84.6%
  PatternKit.Generators.VisitorGenerator                                                                          99.4%

PatternKit.Generators.Abstractions                                                                                23.6%
  PatternKit.Generators.Adapter.AdapterMapAttribute                                                                  0%
  PatternKit.Generators.Adapter.GenerateAdapterAttribute                                                             0%
  PatternKit.Generators.Builders.BuilderRequiredAttribute                                                          100%
  PatternKit.Generators.Builders.GenerateBuilderAttribute                                                          100%
  PatternKit.Generators.Composer.ComposerAttribute                                                                   0%
  PatternKit.Generators.Composer.ComposeStepAttribute                                                                0%
  PatternKit.Generators.Decorator.GenerateDecoratorAttribute                                                         0%
  PatternKit.Generators.Facade.FacadeExposeAttribute                                                                 0%
  PatternKit.Generators.Facade.FacadeMapAttribute                                                                    0%
  PatternKit.Generators.Facade.GenerateFacadeAttribute                                                               0%
  PatternKit.Generators.Factories.FactoryCaseAttribute                                                             100%
  PatternKit.Generators.Factories.FactoryClassAttribute                                                            100%
  PatternKit.Generators.Factories.FactoryClassKeyAttribute                                                         100%
  PatternKit.Generators.Factories.FactoryMethodAttribute                                                           100%
  PatternKit.Generators.GenerateStrategyAttribute                                                                  100%
  PatternKit.Generators.MementoAttribute                                                                             0%
  PatternKit.Generators.MementoStrategyAttribute                                                                     0%
  PatternKit.Generators.Messaging.GenerateDispatcherAttribute                                                        0%
  PatternKit.Generators.Observer.ObserverAttribute                                                                   0%
  PatternKit.Generators.Prototype.PrototypeAttribute                                                                 0%
  PatternKit.Generators.Prototype.PrototypeStrategyAttribute                                                         0%
  PatternKit.Generators.Proxy.GenerateProxyAttribute                                                                 0%
  PatternKit.Generators.Singleton.SingletonAttribute                                                                 0%
  PatternKit.Generators.State.StateEntryAttribute                                                                    0%
  PatternKit.Generators.State.StateExitAttribute                                                                     0%
  PatternKit.Generators.State.StateGuardAttribute                                                                    0%
  PatternKit.Generators.State.StateMachineAttribute                                                                  0%
  PatternKit.Generators.State.StateTransitionAttribute                                                               0%
  PatternKit.Generators.Template.TemplateAttribute                                                                   0%
  PatternKit.Generators.Template.TemplateHookAttribute                                                               0%
  PatternKit.Generators.Template.TemplateStepAttribute                                                               0%
  PatternKit.Generators.Visitors.GenerateVisitorAttribute                                                            0%

@JerrettDavis JerrettDavis marked this pull request as ready for review March 20, 2026 03:55
@JerrettDavis JerrettDavis requested a review from Copilot March 20, 2026 03:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.


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

@JerrettDavis JerrettDavis merged commit 26cd384 into main Mar 20, 2026
13 checks passed
@JerrettDavis JerrettDavis deleted the copilot/create-observer-pattern-generator branch March 20, 2026 04:12
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 53.32226% with 281 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.03%. Comparing base (d19591a) to head (6768ad8).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...amples/ObserverGeneratorDemo/NotificationSystem.cs 3.12% 155 Missing ⚠️
...amples/ObserverGeneratorDemo/TemperatureMonitor.cs 3.15% 92 Missing ⚠️
...atternKit.Generators/Observer/ObserverGenerator.cs 92.60% 25 Missing ⚠️
...erators.Abstractions/Observer/ObserverAttribute.cs 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
+ Coverage   82.17%   86.03%   +3.85%     
==========================================
  Files         192      196       +4     
  Lines       18532    19134     +602     
  Branches     2663     2712      +49     
==========================================
+ Hits        15229    16461    +1232     
- Misses       2591     2673      +82     
+ Partials      712        0     -712     
Flag Coverage Δ
unittests 86.03% <53.32%> (+3.85%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generator: Create Observer Pattern

3 participants