XNA and Ninject: Syntax for dependency arguments?

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/06 10:43 UTC
Read the original article Hit count: 182

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#