I have three classes class A, class B and class C. I want to inject Class A and Class B as a dependency through constructor to Class C. I am using ScalDI dependency injection framework. Can someone tell me how I can do it?
class A {
...}
class B {
..}
class C(a:A , b:B) = {
...}
There is short explanation on scaldi website: constructor injection
You have to use
injected
macro, or inject them in the following fashion:Of Course binding to A and B have to be defined as well.