Skip to content

Commit

Permalink
Changed FromComponentsInHierarchy to require scope set
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Oct 7, 2018
1 parent fc9696b commit 07100a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public IEnumerator RunMatchMultiple()
Setup1();
PreInstall();
Container.Bind<Qux>().AsSingle();
Container.Bind<Foo>().FromComponentsInHierarchy();
Container.Bind<Foo>().FromComponentsInHierarchy().AsCached();

PostInstall();

Expand Down Expand Up @@ -88,7 +88,7 @@ public IEnumerator RunMatchNotFoundSuccess()
PreInstall();

Container.Bind<Qux>().AsSingle().NonLazy();
Container.Bind<Foo>().FromComponentsInHierarchy();
Container.Bind<Foo>().FromComponentsInHierarchy().AsCached();

PostInstall();

Expand Down Expand Up @@ -134,7 +134,7 @@ public IEnumerator RunMatchMultipleNonGeneric()
Setup1();
PreInstall();
Container.Bind<Qux>().AsSingle();
Container.Bind(typeof(Foo)).FromComponentsInHierarchy();
Container.Bind(typeof(Foo)).FromComponentsInHierarchy().AsCached();

PostInstall();

Expand Down Expand Up @@ -164,7 +164,7 @@ public IEnumerator RunMatchNotFoundSuccessNonGeneric()
PreInstall();

Container.Bind<Qux>().AsSingle().NonLazy();
Container.Bind(typeof(Foo)).FromComponentsInHierarchy();
Container.Bind(typeof(Foo)).FromComponentsInHierarchy().AsCached();

PostInstall();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ protected ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentsInHierarchy
{
BindingUtil.AssertIsInterfaceOrComponent(AllParentTypes);

BindInfo.RequireExplicitScope = false;
BindInfo.RequireExplicitScope = true;

// Don't know how it's created so can't assume here that it violates AsSingle
BindInfo.MarkAsCreationBinding = false;
Expand Down

0 comments on commit 07100a8

Please sign in to comment.