Skip to content

Releases: autofac/Autofac

v4.9.1

18 Feb 12:45
Compare
Choose a tag to compare
  • Fix for #960 - ExternalRegistrySource reuses ExternalComponentRegistration instances causing ObjectDisposedException
  • Made the backing field for ServiceRegistrationInfo.IsInitialized volatile to prevent the ComponentRegistry taking an avoidable lock due to reordering

v4.9.0

10 Feb 04:15
Compare
Choose a tag to compare
  • 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

28 Aug 03:37
Compare
Choose a tag to compare
v4.9.0-beta1 Pre-release
Pre-release
  • 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

09 May 19:08
Compare
Choose a tag to compare
  • Minor performance improvements.
  • Fix #916: IStartable that creates child lifetime scope during Start() no longer tries to activate itself.

v4.8.0

19 Apr 15:12
Compare
Choose a tag to compare

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

17 Apr 17:32
Compare
Choose a tag to compare

Issues addressed in this release:

  • #567: AutoActivate and IStartable 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() and AsImplementedInterfaces() incorrectly ignored custom constructor finders (FindConstructorsWith()).

v4.7.0

10 Apr 23:11
Compare
Choose a tag to compare

Issues addressed in this release:

  • #624: Components registered as IStartable and AutoActivate() 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 the IConstructorSelector 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.

v4.6.2

16 Oct 16:57
Compare
Choose a tag to compare
  • Fix #870: Error building container when class inherits from same generic interface twice.
  • Updated default parameter value handling to account for Core CLR issues:
    • dotnet/corefx#17943
    • dotnet/corefx#12338
    • dotnet/corefx#11797

v4.6.1

25 Jul 12:59
Compare
Choose a tag to compare
  • Fixed #847: ScopeRestrictedRegistry now also applies ComponentRegistrationLifetimeDecorator to registrations from registration sources.
  • Fixed #855: Fixed ACTNARS resolve on a closed generic type containing a generic type argument that doesn't match the type predicate passed to the registration source.
  • Fixed #746: Registrations added to a nested lifetime scope were not being disposed.
  • Fixed #780: Disposal tracking of provided instances is now consistent in root and nested lifetime scopes.

v4.6.0

16 May 12:42
Compare
Choose a tag to compare
  • Fixed #730: Added MatchingLifetimeScopeTags() extension to IComponentRegistration to get scope tags.
  • Fixed #849: Store build callbacks in property bag so modules can add to them.