Added support for Unity, Autofac to Siege.ServiceLocation

…plus, some other house-cleaning items.

Last night I put together adapters for Autofac and Unity. The process turned out to be rather straightforward; I think all told for both it took me about an hour from adding the projects to all tests passing. I may have a final tweak for this project around how adapters work – there is one method that I think doesn’t need to be placed where it is, so I’ll probably move it. After that, I don’t anticipate many (if any) major changes to how it works … I’ll just put out a Siege.ServiceLocation.Extensions project to house more things (an auto-register, factory method support, things like that). It’ll be a good chance to prove out how extensible this really is.

Other than that I did some tweaks to namespaces to bring everything into one common scheme for namespacing. Nothing new beyond those items; I updated all the downloadable items with the latest versions. Here are the links:

 

Siege.ServiceLocation library:

Siege.ServiceLocation.zip

 

ASP.NET MVC Integration:

Siege.ServiceLocation.HttpIntegration.zip

 

IoC Framework Adapters:

Siege.ServiceLocation.AutofacAdapter.zip
Siege.ServiceLocation.NinjectAdapter.zip
Siege.ServiceLocation.StructureMapAdapter.zip
Siege.ServiceLocation.UnityAdapter.zip
Siege.ServiceLocation.WindsorAdapter.zip

 

Quick Start:

SiegeMVCQuickStart.zip

 

For convenience the main library is bundled with the HttpIntegration zip as well as each of the Adapter zip files.

Have a Happy Holidays!

This entry was posted in IoC, Siege. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://www.twitter.com/adrianomm Adriano Machado

    Great piece of code.

    Is it possible to extend the container to give named instances when it is injected into a specific type? I know that Ninject is able, but is it easy to extend this functionality to Siege?

    Thanks.

  • http://www.lostechies.com/members/mbratton/default.aspx mbratton

    It’s certainly possible. It’ll just require a custom implementation of IUseCase and some syntax to let people wire it up like that. When I’m putting together the extensions I’ll take a peek to see how difficult that is and might just throw it in.

  • http://www.lostechies.com/members/mbratton/default.aspx mbratton

    Turned out not to be too hard. I went ahead and incorporated it. I posted details on it in my new blog post.