ServiceManager class runs and stops the processes on threads. All processes will implement the IImportProcess interface. Is it a good idea to use a list of IImportProcess so that in the future if a new process is implemented there would be no change in the ServiceManager, or use subtypes of IImportProcess that will require changes in the ServiceManager but improve object orientation?
public ServiceManager(IEnumerable<IImportProcess> importProcesses, ILogger logger){ }
or
public ServiceManager(IProductImportProcess productImportProcesses, IAuthorImportProcess authorImportProcesses, ILogger logger)
Aucun commentaire:
Enregistrer un commentaire