public interface IInterface1 { } public interface IInterface2 { } public class MyClass : IInterface1, IInterface2 { } ... ObjectFactory.Initialize(x => {
You can use the Forward<,>() registration to tell StructureMap to resolve a type using the resolution of a different type. This should do what you expect:
ObjectFactory.Initialize(x => { x.For().Singleton().Use(); x.Forward(); });