Can you do conventions-based binding with StructureMap 2.5.3?
Posted
by Peter Goras
on Stack Overflow
See other posts from Stack Overflow
or by Peter Goras
Published on 2009-10-09T07:50:44Z
Indexed on
2010/05/18
5:30 UTC
Read the original article
Hit count: 260
I find one of the best features of Ninject is conventions-based binding. eg.
Bind<IConfigurationSource>().To<RemoteConfigurationSource>()
.Only(When.Context.Target.Name.BeginsWith("remote"));
Bind<IConfigurationSource>().To<LocalConfigurationSource>()
.Only(When.Context.Target.Name.BeginsWith("local"));
http://ninject.codeplex.com/Wiki/View.aspx?title=Conventions-Based%20Binding&referringTitle=Home
Is this possible in StructureMap 2.5.3?
Thanks
© Stack Overflow or respective owner