I had a project with IMyGrain which inherited from IGrainWithIntegerKey, but I forget to derive the implementation class from Grain.
This all compiles with no warning (as IGrainWithIntegerKey has no methods to implement), but at runtime fails with "cannot find an implementation class" when I call GetGrain
I feel this could be more helpfully spotted.
We are looking into making inheriting from Grain unnecessary in 4.0. In the meantime, is there a way to give a useful warning? By flagging any non-abstract class that implements IGrainWithXKey and doesn't inherit from Grain?
An analyzer could be used for this, the way Xunit does it.
Most helpful comment
An analyzer could be used for this, the way Xunit does it.