The lib uses DI, each command is passed the HttpClient in the injector.
Also the DIC call the registerCommand method for each command defined in the library and soon for registering your own commands ( setter injection ).
All this logic is done in the compiler passes.
Also, commands are declared as lazy services, meaning that at runtime it is a proxy class that is passed to the CommandManager, and the class is instantiated only when calling the command itself, so uncalled command classes will not be instantiated.
The lib uses DI, each command is passed the HttpClient in the injector. Also the DIC call the registerCommand method for each command defined in the library and soon for registering your own commands ( setter injection ). All this logic is done in the compiler passes.
Also, commands are declared as lazy services, meaning that at runtime it is a proxy class that is passed to the CommandManager, and the class is instantiated only when calling the command itself, so uncalled command classes will not be instantiated.