Bug reproduction:
Class hierarchy :
public interface IEntity
{
void DoWork();
}
public interface IBase
{
void Foo<A>() where A : IEntity;
}
public abstract class Base : IBase
{
public abstract void Foo<A>() where A : IEntity;
}
public class Derivate : Base
{
public override void Foo<A>()
{
}
}
Dependency registration:
IKernel Kernel = new StandardKernel();
Kernel.Bind().To();
// In next line an "System.MethodAccessException" exception is thrown
var instance = Kernel.Get< IBase>();
Bug description:
Code does not work ONLY on Windows Phone 7.5 platform, but works fine on Windows Phone 8. I didn't test it on other platforms.
Code does not work ONLY when generic type "A" is an interface.
My package version:
< package id="Ninject" version="3.0.1.10" targetFramework="wp71" />
Thank you guys for this great framework!