Bind.ModelChanged doing IoC.GetInstance(null, key)

Topics: Bugs
Aug 30, 2011 at 12:49 AM

The Bind.ModelChanged method has the following code:

if(containerKey != null)
    target = IoC.GetInstance(null, containerKey);

This is asking the IoC to resolve an instance of an unknown type, but with the name specified. Is this the correct behavior? It seems odd to request an instance without a type, especially when the result is stored into a var declared local, so the type must be known. This seems like a bug to me.