I currently have a class of this form:
class Abc {
private readonly IDisposable disposable;
public Abc(IDisposable disposable) {
this.disposable = disposable;
}
...
}
Now, I'd like to know how can I make a binding of IDisposable
to Bitmap
using the
Bitmap(int widht, int height)
constructor.
I've tried with the following piece of code, but it doesn't seem to do it:
class TestModule : NinjectModule {
public override void Load()
{
Bind<IDisposable>().To<Bitmap>()
.WithConstructorArgument("width", 10)
.WithConstructorArgument("height", 22)
;
}
}