@johnnyluo @flypaper0 I would like to propose a full re-factory of this view model and create a service, with protocols and polymorphism so that we can eliminate those switches and if, else. We can use generics, and some factories to make the calculations.
@johnnyluo @flypaper0 I would like to propose a full re-factory of this view model and create a service, with protocols and polymorphism so that we can eliminate those switches and if, else. We can use generics, and some factories to make the calculations.
Some abstract classes:
So some commons classes can be reused and we can override whatever is particular.
Then we will have a way more organized view model.