Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ByNewPrefabResourceInstaller description of README. #605

Conversation

@adarapata
Copy link

commented Feb 13, 2019

Hi.
The explanation about ByNewPrefabResourceInstaller seemed not to be appropriate, so I fixed it.
Because ByNewPrefabResourceInstaller has to inherit InstallerBase, it should be a class that inherited Installer, not MonoInstaller.

refs test code

public IEnumerator TestResourceInstaller()
{
PreInstall();
Container.Bind<Qux>().FromSubContainerResolve()
.ByNewPrefabResourceInstaller<FooInstaller>(FooPrefabResourcePath).AsCached();
PostInstall();
Assert.IsEqual(Container.Resolve<Qux>().Data, "asdf");
yield break;
}

public class FooInstaller : Installer<FooInstaller>
{
public override void InstallBindings()
{
Container.Bind<Qux>().AsSingle().WithArguments("asdf");
}
}

Sorry if it is not wrong.

@svermeulen

This comment has been minimized.

Copy link

commented May 5, 2019

You're right, thanks. I've cherry picked this in extenject with commit 8bfdf0e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.