You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 3, 2018. It is now read-only.
hmemcpy edited this page Dec 7, 2012
·
12 revisions
StructureMap is one of the first containers created for .NET. It has two syntax flavors, the older, more verbose one (now considered obsolete), and the newer, less verbose but fluent. Only the newer syntax is supported.
The following methods are supported both in a container instance or as instance members of a Registry.
For<IFoo>().Use<Foo>()
For(typeof(IFoo)).Use(typeof(Foo))
For<IFoo>().Add<Foo>()
Scan
WithDefaultConventions()
TheCallingAssembly()
AddAllTypesOf<T>()
AddAllTypesOf(typeof(T))
Assembly() - currently supports Assembly.GetExecutingAssembly() and typeof(Foo).Assembly. Other assembly sources, including local variables are currently not supported.
AssemblyContaining<T>()
AssemblyContaining(typeof(T))
ExcludeNamespace()
ExcludeNamespaceContainingType<T>()
ExcludeType<T>()
IncludeNamespace()
IncludeNamespaceContainingType<T>()
RegisterConcreteTypesAgainstTheFirstInterface()
SingleImplementationsOfInterface()
Not (yet) supported
Scan
Exclude - this requires reflection, and it's currently not supported