I am building an interface to read, validate, convert and store data. In this way two systems can cummunicate with each other.
I have created a generic flow which works fine and is very extensible:
IProcessor< P, S> -> Proces() : void
IProvider -> GetItems() : IEnumerable< string>
IValidator -> Validate(string) : void
IParser< P > -> Parse(string) : P
IMapper< P, S> -> Map(P) : S
IStorage< S> -> Save(S)
new Processor(IProvider, IValidator, IParser< P>, IMapper< P, S>, IStorage< S>)
The problem is that there is a business rule which states that P must be mapped to S1 or S2 depending on a Value. How to alter the structure, so that it is more flexible?
Thanks,
Najra
Aucun commentaire:
Enregistrer un commentaire