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
I have the configured injector, for example like this
auto injector = boost::di::make_injector(
boost::di::bind<AgentsController>().in(boost::di::unique),
boost::di::bind<AgentCommunicatorController>().in(boost::di::unique),
boost::di::bind<IAgentsManager>.to<WorkflowManager>().in(boost::di::singleton),
boost::di::bind<IAgentCommunicator>.to<WorkflowManager>().in(boost::di::singleton)
);
I want to write Types Factory with this injector, something like this. But the question is what type should injector member be?
class TypesFactory {
public:
template<typename T>
T resolve() {
return _injector.create<T>();
}
private:
SomeTypeOfInjector _injector; <---- What type should SomeTypeOfInjector be?
}
Specifications
Version: boost::di 1.2.0
Platform: debian 11
The text was updated successfully, but these errors were encountered:
I have the configured injector, for example like this
I want to write Types Factory with this injector, something like this. But the question is what type should injector member be?
Specifications
The text was updated successfully, but these errors were encountered: