If I have the following, and I were to say ObjectFactory.GetInstance<Master>() is it possible to tell StructureMap to make the I_A instance to A_User the same instance as the I_A passed to Master?
public interface I_A { }
public interface I_B { }
public class A_User {
public A_User(I_A A) { }
}
public class Master {
public Master(I_A _, I_B __, A_User ___) { }
}
UPDATED:
As @Joshua Flanagan points out below, this is default SM behaviour. The following unit tests show that. The first tests uses the default behaviour. The second shows how you would get a unique instance if you wanted it: