Los Techies : Blogs about software and anything tech!

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!

Kick It on DotNetKicks.com
Posted Dec 23 2009, 12:23 PM by mbratton
Filed under: ,

Comments

Adriano Machado wrote re: Added support for Unity, Autofac to Siege.ServiceLocation
on 12-23-2009 1:36 PM

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.

mbratton wrote re: Added support for Unity, Autofac to Siege.ServiceLocation
on 12-23-2009 2:40 PM

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.

mbratton wrote re: Added support for Unity, Autofac to Siege.ServiceLocation
on 12-27-2009 4:24 PM

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

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Enter the numbers above:
Copyright Los Techies 2008, 2009. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems