Skip to content
Snippets Groups Projects
Commit 6ea19acd authored by dgelessus's avatar dgelessus
Browse files

Replace kernel parameter of Command methods with injection

ProBKernel is now a singleton (it's very unlikely that we'll ever need
to run multiple kernels in a single process, and if we do, each would
have its own injector anyway). This allows injecting it into commands
when they need it. This makes more sense than using a parameter,
because most commands don't need access to the kernel object.

We have to use an Injector and inject the kernel only when it's
actually used. We can't inject the kernel as a constructor parameter,
because the ProBKernel constructor injects all the commands, which
would cause a circular dependency.
parent 68e03c8f
Branches
Tags
Loading
Showing
with 71 additions and 68 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment