Releases: Skymly/DesignPatterns
Releases · Skymly/DesignPatterns
Release list
0.2.2
What's New
Singleton captive dependency diagnostic (DP062)
CaptiveDependencyAnalyzer reports DP062 (Warning) when a Singleton service's constructor depends on a Scoped or Transient service. This is the first .NET compile-time captive dependency detector.
Scans AddSingleton/AddScoped/AddTransient/TryAdd(ServiceDescriptor) calls to build a type-to-lifetime registration map, then checks each Singleton implementation's constructor parameters against the map.
Previous preview (0.2.1-preview1) — now stable
- DI lifetime validation (DP060-DP061):
LifetimeMismatchAnalyzerreports captive dependency (DP060, Warning) and wasteful mismatch (DP061, Info) forRegisterDicall-site parameter combinations. - DI health checks:
AddDesignPatternsHealthChecksextension method registers anIHealthCheckthat verifies all DesignPatterns service registrations can be resolved at runtime.
Stats
- 611 tests passing, zero warnings
- 3 new diagnostics: DP060, DP061, DP062
- 26 new tests (6 + 9 + 11)