var container = new WindsorContainer();
container.Register(AllTypes.Pick()
.FromAssembly(Assembly.GetExecutingAssembly())
.WithService
.FirstInterface());
Sunday, June 7, 2009
Easy component registration for Windsor Container
If you are tired of forests of declarations for WindsorContainer you might find this do a trick for you:This piece of code will search all types within running assembly and register them in container.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment