Skip to content

Commit

Permalink
Merge pull request Particular#87 from cshyjak/master
Browse files Browse the repository at this point in the history
NinjectObjectBuilder child container binding traversal
  • Loading branch information
Andreas Öhlund committed Jul 6, 2011
2 parents f7af3a0 + a77157f commit 8d394fb
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -195,8 +195,9 @@ public void RegisterSingleton(Type lookupType, object instance)
/// </returns>
public bool HasComponent(Type componentType)
{
var bindings = this.kernel.GetBindings(componentType);
return bindings.Any();
var req = this.kernel.CreateRequest(componentType, null, new IParameter[0], false, true);

return this.kernel.CanResolve(req);
}

/// <summary>
Expand Down

0 comments on commit 8d394fb

Please sign in to comment.