Skip to content

v8.0.0

Choose a tag to compare

@tillig tillig released this 24 Jun 17:26
· 11 commits to develop since this release
e5c2102

Breaking Changes

  • Dropped support for net6.0. This target framework has reached end of life and is no longer built. Consumers must target net8.0 or later (or one of the supported netstandard targets).
  • Minimum Autofac version raised to 9.x. The Autofac dependency moved from 6.5.0 to 9.3.0. Projects must be compatible with Autofac 9 to upgrade.

Other Changes

  • Conditional interception via a type predicate (#42). EnableClassInterceptors and EnableInterfaceInterceptors now accept an optional Func<Type, bool> shouldIntercept predicate so interception can be applied selectively based on the implementation type. This is especially useful with assembly scanning, where only some scanned types should be intercepted. For interface interception the predicate is evaluated at resolve time against the resolved implementation type; for class interception it is evaluated per type at registration. All new overloads are additive — existing signatures are unchanged, preserving binary compatibility.
  • Interface interception now works with open generic assembly scanning (#27). Previously, scanning an assembly with AsClosedTypesOf and enabling interface interception could throw because the concrete type registered alongside the interface failed the interface-only check. Interception now validates only the service actually being resolved.
  • Added support for net10.0 and net8.0; retained support for netstandard2.1 and netstandard2.0.
  • Updated Castle.Core from 5.1.1 to 5.2.1.
  • Known issue: Using [KeyFilter] with an enum key together with class interception does not work, because Castle DynamicProxy reproduces the enum attribute argument as its underlying integer type, so the key no longer matches the registered keyed service (upstream castleproject/Core#748). Workarounds: use a string key, or use interface interception instead of class interception (#56).