How i can restrict type resolving in child unityContainer ?
E.g
internal interface ITestInterface
{}
public class Test:ITestInterface
{}
class A
{
public A(ITestInterface testInterface)
{
}
}
class Program
{
static void Main(string[] args)
{
var container = new UnityContainer();
Test test = new Test();
container.RegisterInstance<ITestInterface>(test);
var childContainer = container.CreateChildContainer();
//shoudl resolved normally
container.Resolve<A>();
//should throw exception!
//because i want restrict resolving ITestInterface instance from parent container!
childContainer.Resolve<A>();
}
}