We have a massive code set, so each of the classes is of the form:
public class A :
DPM<Time, Data, TypeAKindA,
TypeAKindB, TypeAKindC,
TypeAKindC, TypeAkindD, TypeAKindE>
public class B:
DPM<Temp, Data, TypeBKindA,
TypeBKindB, TypeBKindB,
TypeBKindC, TypeBKindD, TypeBKindE>
So Time
is specific struct
for example which differs from Temp
.
The problem, is for each of these classes I have an init
, constructor
, so for example in the init, I am doing this specific to the class name. I.e. A goes off and does something specific for each class.
This is a massive code-set so I cannot re-factor. I'd like to combine these, so I have one class call it C
, that will basically either execute the functionality of each or somehow merge them. I cannot change class DPM, and this is a complex structure with plenty of where clauses in it.
It looks like this:
public abstract class DPM<TypeA, TypeB, TypeC, , ... > : ID
where ID is an interface.
An example of the issue is the class DPM
inherited has a property called _xyz
which is populated with different values in .init()
depending on whether it is called from Class A
or Class B
. And I don't know the dependencies downstream - so where is called or used later in the code.
Any suggestions very welcome.