using ModestTree; namespace Zenject { // Note that you only need to install this once public class SignalBusInstaller : Installer { public override void InstallBindings() { Assert.That(!Container.HasBinding(), "Detected multiple SignalBus bindings. SignalBusInstaller should only be installed once"); Container.BindInterfacesAndSelfTo().AsSingle().CopyIntoAllSubContainers(); Container.BindInterfacesTo().AsSingle().CopyIntoAllSubContainers(); Container.BindMemoryPool(); // Dispose last to ensure that we don't remove SignalSubscription before the user does Container.BindLateDisposableExecutionOrder(-999); Container.BindFactory(); } } }