Initialize the conditional bindings builder
Predicate deciding whether the bindings should be used
The container instance to register bindings with
Register a binding to use when the condition returns true. The factory function is called on every resolution.
The binding key (string, symbol, or class constructor)
Factory function that resolves the binding value
Register a binding to use when the condition returns true. The factory function is called on every resolution.
The binding key (string, symbol, or class constructor)
Factory function that resolves the binding value
Register a singleton to use when the condition returns true. The factory function is called only once and the return value is cached forever.
The condition is still evaluated on every resolution. Only the factory function result is cached.
The binding key (string, symbol, or class constructor)
Factory function that resolves the binding value
Register a singleton to use when the condition returns true. The factory function is called only once and the return value is cached forever.
The condition is still evaluated on every resolution. Only the factory function result is cached.
The binding key (string, symbol, or class constructor)
Factory function that resolves the binding value
A fluent builder to register conditional bindings with the container.
Bindings registered using this builder are only used when the condition returns true. The condition is evaluated on every resolution.