Take the following example:
public interface ISerialRVD
{
RouteValueDictionary ToRVD();
}
public interface IViewModel : ISerialRVD // Here?
{
Int32 Page { get; set; }
String Action { get; set; }
}
public class myViewModel : IViewModel, ISerialRVD // Or Here?
{
}
I understand that if I make IViewModel
inherit ISerialRVD
that is forcing all who implement IViewModel
to implement ISerialRVD
but should I do just : IViewModel
or : IViewModel, ISerialRVD
on the class implementing IViewModel
?
To my knowledge repeating the ISerialRVD
part does not hurt anything, and I want to put it there to make it clearer it's implementing that interface, but if I were to have many more interfaces it would become quite the clutter. Am I wrong?
Is there a sensible way of dealing with this? On one-hand I feel it should be verbose and tell you what you're implementing, but on the other hand it should be infer-able from the interface itself. All IViewModels implement ISerialRVD.