Using AppSpace as DI Container

Dec 22, 2010 at 7:37 AM


in the dotnetpro articel from 8/2009 found i this code example:

using (XcoAppSpace server = new XcoAppSpace(...)){
 server.Register<IMessageStore, TransientMessageStore>();

The MessageStore has a attribute [Dependency].

But now i don't find it. How can i use the space as DI Container?

Dec 22, 2010 at 9:28 AM

Hi Thomas,

The dependency injection funtionality was part of a previous appspace version, but it's not any more. We felt that, although dependency injection is an important thing for nearly every project, it is not really needed to be in the application space itself. Of course we encourage you that you still use dependency injection for your project(s)! You can also still easily instantiate Workers with your DI container and then run them in the application space. A nice choice for a DI container e.g. is Microsoft's Unity (, which was also used in the appspace.