I have a service class with the following ctor:
public class (IMessageService emailService, IMessageService smsService)
{ ... }
and two impleme
Don't need to be complicated. Just simply register all the implementations of an interface.
this.For().Use();
this.For().Use();
Then structuremap will automatically inject all implementation of the IMessageService interface into any constructor that has IEnumerable/list/array of an interface. Like below:
private IEnumerator _current;
public SomeClass(IEnumerable features) {
_current = features.GetEnumerator();
}
Hope it helps