Using Component Glue to build your object graphs automatically

July 26, 2013 Open Source, Dependency Injection, IoC, C#, .NET

Component Glue is an IoC container and you use it of course to wire up your object graphs for you. Component Glue can also build your object graphs for you automatically if there are no interfaces involved. Take this example:

In After.cs, you can see that Component Glue is able to build the entire object graph for us. This will include all future dependencies as well so long as interfaces don't come into play. Should an interface be needed, you can just bind that single component.

This is a very powerful thing. If one component needs to take on a dependency, just ask for it in the constructor and Component Glue will handle it for you.

Component Glue v1.0

June 11, 2013 .NET, C#, ComponentGlue, Dependency Injection, Github, IoC, NuGet

I finally brought Component Glue up to a state where I felt like the product was finished. You can get it via NuGet:

`PM> Install-Package ComponentGlue`

or you can get the source from GitHub. The documentation is definitely sparse I know but I recommend taking a look at the unit tests to get a feel for what you can do with Component Glue.

Credit for the NuGet CSS here.

ComponentGlue on GitHub

May 10, 2011 ComponentGlue, Dependency Injection, IoC

I moved the ComponentGlue repository to GitHub. I updated the example slightly and cleaned up some of the source code a little. Need to build a full blown app with it eventually.

Implementing basic Dependency Injection using a Service Container

June 21, 2010 .NET, C#, Dependency Injection, Design Patterns, Service Continer

By extending your Service Container class, a very basic version of dependency injection can be implemented. We'll implement two forms of dependency injection: constructor and property injection.

Read More