//send the request files and the conresponding scource files to the build mother private void sendRequesttoBuild(CM msg) { string path = Path.Combine("..\\..\\..\\Repository\\BuildRequests", msg.filename); string direc = parseDir(path); CM reply = new CM(CM.MessageType.request); reply.to = "http://localhost:" + (8079).ToString() + "/Ibuilder"; reply.from = "http://localhost:" + (8079).ToString() + "/Ibuilder"; reply.command = "sendRequestFileToBuild"; reply.filename = path; sdToMotherBuild.postMessage(reply); sdToMotherBuild.WritePath_ = "..\\..\\..\\ProcessMother\\BuildRequests"; Console.Write("\n\n repository send file {0} to build mother ..\\..\\..\\ProcessMother\\BuildRequests", msg.filename); sdToMotherBuild.postFile(path); //post the requet files List <string> sourceFiles = Directory.GetFiles("..\\..\\..\\Repository\\sourceFIles\\" + direc, "*.*").ToList(); sdToMotherBuild.WritePath_ = "..\\..\\..\\ProcessMother\\" + direc; foreach (string file in sourceFiles) // post the scource fils associated with the request files { Console.Write("\n\n repository send source file {0} to build mother ..\\..\\..\\ProcessMother\\{1}", Path.GetFileName(file), direc); sdToMotherBuild.postFile(file); } }
//send the sendRequest message to repository and send the request file to repo private void SendRequestFilestoRepo(object sender, RoutedEventArgs e) { sndrToRepo.WritePath_ = "..\\..\\..\\Repository\\BuildRequests"; CM msg1 = new CM(CM.MessageType.request); msg1.from = "http://localhost:" + (8068).ToString() + "/Ibuilder"; msg1.to = "http://localhost:" + (8068).ToString() + "/Ibuilder"; msg1.author = "Quanfeng Du"; msg1.command = "SendRequest"; msg1.arguments.Add(RequestFiles.SelectedItem as string); msg1.filename = filesListBox.SelectedItem as string; sndrToRepo.postMessage(msg1); //get the file name being selected in GUI string selet = "..\\..\\..\\request\\" + RequestFiles.SelectedItem as string; Console.Write("\n\n client send {0} to repository ..\\..\\..\\Repository\\BuildRequests", filesListBox.SelectedItem as string); sndrToRepo.postFile(selet); }