Firstly I have a class signature that looks like this:
internal class JobStore : IJobStore
{
private readonly IFileHandler fileHandler;
private readonly IJobSerializer serializer;
private readonly IJobValidator validator;
internal readonly string DirectoryPath = "JobStore";
internal readonly string JobExtension = ".job";
public JobStore(IFileHandler fileHandler, IJobSerializer jobSerializer, IJobValidator jobValidator)...
I kind of want to remove the DirectoryPath and extension into their own class, but I’m not too sure.
I do think having four objects in the constructor is a bad idea though.
My question is how could I combine two of these objects to reduce the number of parameters I’m taking into this method, and is three too much?
Apologies for the vagueness of the question.
Looks like you should Refactor to Aggregate Services.