You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would something like this work in VContainer? I'm trying to create a subcontainer for UserFacade systems, while UserFacade itself stays accessible to scene level containers. Basically looking for VContainer alternative for FromSubContainerResolve().ByInstaller<>();
public class MainSceneInstaller : MonoInstaller
{
public override void InstallBindings()
{
Container.BindInterfacesAndSelfTo<UserFacade>().FromSubContainerResolve().ByInstaller<UserInstaller>().WithKernel().AsSingle().NonLazy();
Container.BindInterfacesAndSelfTo<InitializeApp>().AsSingle().NonLazy();
}
}
public class UserInstaller : Installer<UserInstaller>
{
public override void InstallBindings()
{
Container.BindInterfacesAndSelfTo<UserFacade>().AsSingle().NonLazy();
Container.BindInterfacesTo<UserData>().AsSingle();
Container.BindInterfacesTo<UserWallet>().AsSingle();
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How would something like this work in VContainer? I'm trying to create a subcontainer for UserFacade systems, while UserFacade itself stays accessible to scene level containers. Basically looking for VContainer alternative for FromSubContainerResolve().ByInstaller<>();
Beta Was this translation helpful? Give feedback.
All reactions