I have a fairly large application in which there are many base classes. I want to change this to interfaces in order to (easier) test the device.
However, when I create a new “design” of interfaces that I can use, I notice that some classes inherit from 5 or more interfaces. Could this cause problems?
I ask for this, since I do not want to reorganize the entire application to find out that this will not work; or if there is a good solution to do this in the refactoring steps.
Some interfaces that I had in mind (pseudo-code). It is incomplete, but it shows the interface relationships that I want to make (there will be many more). For instance. IBank comes from 5 interfaces, and I think more will be needed.
INavigation: IOffset
INavigation Root { get; }
INavigation Parent { get; }
IMemory
string FileName { get; set; }
byte[] Content { get; }
Model Model { get; }
IPcgMemory: IMemory
ProgramBanks ProgramBanks { get; }
CombiBanks CombiBanks { get; }
SetLists SetLists { get; }
DrumKitBanks { get; }
WaveSequenceBanks WaveSequenceBanks { get; }
ISelectable
bool IsSelected { get; set; }
ICountable
int Count { get; }
IName
string Name { get; set; }
IOffset
int ByteOffset { get; set; }
IPatch: IName, ISelectable, IOffset, INavigation
IBank: ICountable, IName, ISelectable, IOffset, ICountable, INavigation
IEnumerable<Patch> Patches { get; }
IProgramBank: IBank
ICombiBank: IBank
ISetList: IBank
IWaveSequenceBank: IBank
IDrumKitBank: IBank
IBanks: ICountable, INavigation, ISelectable, IOffset, ICountable
IEnumerable<IBank> Banks { get; }
IProgramBanks : IBanks
int CountModeledPrograms { get; }
int CountSampledPrograms { get; }
ICombiBanks: IBanks
ISetLists: IBanks
IWaveSequenceBanks: IBanks
IDrumKitBanks: IBanks
PcgMemory: IPcgMemory
ProgramBanks: IPatchCollection