public GenerateLayer(int maxThreadsCount, CommunicationSet <FileSource> inputSet, CommunicationSet <FileSource> outputSet) { maxCount = maxThreadsCount; this.outputSet = outputSet; this.inputSet = inputSet; generator = new TestsGenerator(); }
static void Main(string[] args) { string inputPath = Path.GetFullPath(@"..\..\..\Input\"); string outputPath = Path.GetFullPath(@"..\..\..\Output\"); int maxReadTasksCount = 3; int maxWriteTasksCount = 3; int maxProcessesTasksCount = 3; var files = new ConcurrentQueue <string>(Directory.GetFiles(inputPath, "*.cs")); var readGenerateSet = new CommunicationSet <FileSource>(10); var writeGenerateSet = new CommunicationSet <FileSource>(10); ReadLayer reader = new ReadLayer(maxReadTasksCount, files, readGenerateSet); GenerateLayer generate = new GenerateLayer(maxProcessesTasksCount, readGenerateSet, writeGenerateSet); WriteLayer writer = new WriteLayer(maxWriteTasksCount, writeGenerateSet, outputPath); reader.Start(); generate.Start(); writer.Start(); Console.ReadKey(); }
public WriteLayer(int maxThreadsCount, CommunicationSet <FileSource> inputSet, string folder) { maxCount = maxThreadsCount; this.inputSet = inputSet; outputFolder = folder; }
public ReadLayer(int maxThreadsCount, ConcurrentQueue <string> sourceList, CommunicationSet <FileSource> outputSet) { maxCount = maxThreadsCount; files = sourceList; this.outputSet = outputSet; }