Esempio n. 1
0
 public GenerateLayer(int maxThreadsCount, CommunicationSet <FileSource> inputSet, CommunicationSet <FileSource> outputSet)
 {
     maxCount       = maxThreadsCount;
     this.outputSet = outputSet;
     this.inputSet  = inputSet;
     generator      = new TestsGenerator();
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 public WriteLayer(int maxThreadsCount, CommunicationSet <FileSource> inputSet, string folder)
 {
     maxCount      = maxThreadsCount;
     this.inputSet = inputSet;
     outputFolder  = folder;
 }
Esempio n. 4
0
 public ReadLayer(int maxThreadsCount, ConcurrentQueue <string> sourceList, CommunicationSet <FileSource> outputSet)
 {
     maxCount       = maxThreadsCount;
     files          = sourceList;
     this.outputSet = outputSet;
 }