Releases: autofac/Autofac
Releases · autofac/Autofac
v4.9.4
v4.9.3
- Fix #976 - Throw an exception if a lifetime scope is created with a duplicate tag
- Fix #972 - Resolving services registered as open generics with generic constraints throws
ComponentNotRegisteredException
- Fix #999 - Support decoration of component returned from lambda expression and cast as interface
- Faster
RegisterAssemblyTypes
by putting slow custom attribute check last
v4.9.2
- Reduce the verbosity of activator exception messages; reverts #343.
- Resolved #932: Added serialization constructor to DependencyResolutionException for supported framework targets.
- Fixed an issue where a decorator was only applied if the decorator interface was the first service assigned to the registration. Found while investigating #963.
- Resolved #965: Do not apply the decorator if already applied, or if the registration is for an adapter.
v4.9.1
v4.9.0
- Decorator enhancements
- Switched from symbol server to SourceLink support
- #919: Memory optimisations
- Reduced locking in
ComponentRegistry
to improve concurrency of service resolution (extracted from PR #953) - Fix for #635 SingleInstance lock. Use lock only if instance not created yet.
- Alternative to #924: Changed max resolve limit to static for reflection access
- Improved performance of
CollectionRegistrationSource
- Resolved #927: Clarified duplicate lifetime scope exception message with respect to
Owned<T>
- Fix for #889 and #932 - Add .NET Standard 2.0 target and make
DependencyResolutionException
serializable - Fix for #929: Resetting resolve op activation stack on succeed or fail to allow try/catch in lambda registrations
- Inherit Registered callback in child scopes (closes #218)
- Move registration source extension method to a dedicated class and make consistent with module registration
- Fix for #218: Module.AttachToComponentRegistration() detects registrations in nested scopes
- Throw
ObjectDisposedException
on activation if activator is disposed - Solution upgraded to .NET Core SDK 2.2.101
v4.9.0-beta1
- Decorator enhancements
- Switched from symbol server to SourceLink support
- #919: Memory optimisations
- Solution upgraded to Upgrade to .NET Core SDK 2.1.200
- Alternative to #924: Changed max resolve limit to static for reflection access
v4.8.1
v4.8.0
Reverted behavior from #897 change to re-include internal and nested private classes for backwards compatibility. Added a new PublicOnly()
filter method to enable opt-in to data encapsulation when scanning for assembly types.
builder.RegisterAssemblyTypes(asm)
.PublicOnly()
.Where(t => t.Name.EndsWith("Repository"))
.Except<MyUnwantedRepository>();
v4.7.1
Issues addressed in this release:
- #567:
AutoActivate
andIStartable
now correctly get run if added to child lifetime scope registrations. - #897: Assembly scanning registrations now properly ignore internal and private nested classes - only public classes will be found when scanning.
- #907: Fixed issue where
AsSelf()
andAsImplementedInterfaces()
incorrectly ignored custom constructor finders (FindConstructorsWith()
).
v4.7.0
Issues addressed in this release:
- #624: Components registered as
IStartable
andAutoActivate()
will be started in dependency order. - #733: Building a container will fail with an exception if you
RegisterType<T>()
a type that doesn't have a public constructor. - #824: Parameters passed to a
Resolve()
operation for a decorated object will pass by the decorators and only be provided to the object being decorated. - #846: Parameters passed to a
Resolve()
operation will be provided to the constructor selector so they can be used to influence which constructor gets used (IConstructorSelector.SelectConstructorBinding()
). This is a minor breaking change for theIConstructorSelector
interface but very few people have implemented custom constructor selectors so a major version increment wasn't used. - #882: An exception is now thrown if you try to create a new lifetime scope with a tag that has already been assigned to a parent lifetime scope.