How DI frameworks resolve dependency for same Interface with multiple configuration?
问题 Consider below code sample: public interface IMyInterface { void SetName(string name); string GetName(); } public class MyInterfaceImplementor1 : IMyInterface { protected string Name { set; get; } public void SetName(string name) { this.Name = name; } public virtual string GetName() { return this.Name; } } public class MyInterfaceImplementor2 : MyInterfaceImplementor1 { public override string GetName() { return String.Format("Hello! {0}", base.Name); } } And the DI configuration for this: (