autofac

Upcoming decorator enhancements in Autofac 4.9

The existing decorator implementation in Autofac requires decorator chains be declared in an explicit manner using named/keyed registrations. This was an intentional design decision to ensure that the correct decorators are applied in the correct order, even in the presence of dynamic registrations or those added in a late-bound manner. For better or for worse, it has become more common place in DI container implementations to imply meaning from the order that registrations are configured, and use that implication to change the behaviour of services resolved at runtime.

Read more...

Introducing the Autofac integration for Service Fabric

The dependency injection support in Service Fabric allows you to provide instances for reliable actors, stateful services, and stateless services. Instead of providing a conforming container abstraction the Service Fabric team opted to use a factory based mechanism instead. Factory methods for creating service instances are registered with the runtime via the ActorRuntime.RegisterActorAsync and ServiceRuntime.RegisterServiceAsync methods.

Read more...

Autofac 4.0.0 is in the wild

As Travis mentioned in his earlier blog post the road to 4.0.0 has certainly been an interesting one. This is largely in part because we got on the .NET Core train back in the early DNX days, and as a result experienced all the renames and breaking changes that come with using early bits of a new technology. It certainly highlighted to me just how much I had been taking for granted to the excellent tooling support that Visual Studio provides. There were a few points in time when the Visual Studio tooling would align with a public beta or RC version of .NET Core, but that wasn't useful to us because we had already moved on to working with the next release which was no longer compatible with that tooling. The tooling team was always playing catch up with what had already been finished and fixing things that had been broken. On the plus side I ended becoming more familiar with the new .NET Core command line tools and Visual Studio Code which is a great code editor that you can definitely be productive in.

Read more...

Autofac 4.0 alpha1 for ASP.NET 5.0 beta3

As Travis outlined in his recent post, we've been hard at work getting Autofac ready for ASP.NET 5.0 and the new Core CLR. The 4.0.0-alpha1 release of the core library and integration for ASP.NET 5.0 are now available on NuGet. The packages can be used with Visual Studio 2015 CTP 6 and the 1.0.0-beta3 release of ASP.NET 5.0.

Read more...

OWIN support for the Web API 2 and MVC 5 integrations in Autofac

Currently, in the both the Web API and MVC frameworks, dependency injection support does not come into play until after the OWIN pipeline has started executing. This is simply a result of the OWIN support being added to both frameworks after their initial release. In fact, the OWIN support in MVC does not yet extend to the self hosting scenario and is limited to plugging in OWIN middleware.

Read more...

Using Autofac with Self Hosted WCF Services in a Windows Service

I was recently asked how to best create ServiceHost instances wired up with Autofac when using WCF Self Hosting in a Windows Service. In particular, how to do this in a dynamic way when the WCF services are defined in a separate assembly, without moving the service host configuration into the Windows Service entry point assembly.

Read more...

Fluent interface for Filter Overrides in the Autofac MVC and Web API integrations

The ASP.NET and Web Tools for Visual Studio 2013 introduced filter overrides for MVC 5 and Web API 2. This rather useful feature is only briefly mentioned in the release notes.

Read more...

New features in the Autofac 3.1.0 updates

The following 3.1.0 packages have been pushed to NuGet:

Read more...

Autofac 3.0.2 update pushed to NuGet

We have pushed some minor updates to the core Autofac package and a few of the integration packages to NuGet. There is a mix of enhancements and bug fixes across the different packages. You can find all the details below.

Read more...

Autofac 3.0 Final Release

The NuGet packages and download zips are now available for the final release of Autofac 3.0. The biggest changes since Beta 2 are the introduction of an official SignalR integration (built against the RC1 version) and plenty more documentation on the wiki (with even more on the way). The release notes below outline the changes between Beta 2 and the final release. You find details for the previous beta versions on the release notes page. Thank you to everyone who tested the beta versions and provided the team with valuable feedback. A big shout out to Travis Illig for helping make 3.0 such a great release, and to Nicholas Blumhardt for starting such an awesome open source project.

Read more...