Ninject: How to resolve this dependency?

Posted by Rosarch on Stack Overflow See other posts from Stack Overflow or by Rosarch
Published on 2010-04-05T22:39:29Z Indexed on 2010/04/05 22:43 UTC
Read the original article Hit count: 159

Filed under:
|
|

I have a class with a public constructor:

    public MasterEngine(IInputReader inputReader)
    {
        this.inputReader = inputReader;

        graphicsDeviceManager = new GraphicsDeviceManager(this);
        Components.Add(new GamerServicesComponent(this));
    }

How can I inject dependencies like graphicsDeviceManager and new GamerServicesComponent while still supplying the argument this?

© Stack Overflow or respective owner

Related posts about ninject

Related posts about c#