//----------------sends test driver request message to repo------------------------------------------------------------------------ private void getDriversOnClick(object sender, RoutedEventArgs e) { leftDriverBox.Items.Clear(); CommMessage msg = message.Clone(); msg.type = CommMessage.MessageType.Drivers; comm.postMessage(msg); Console.Write("Request sent to Repo for test drivers"); }
void main() { CommMessage msg = new CommMessage(CommMessage.MessageType.connect); msg.to = "http://localhost:9060/BasicService"; msg.from = "http://localhost:9060/BasicService"; comm.postMessage(msg); CommMessage msg2 = msg.Clone(); msg2.type = CommMessage.MessageType.BuildRequest; msg2.to = "http://localhost:9070/BasicService"; msg2.body = "Build Request"; comm.postMessage(msg2); }
static void Main(string[] args) { MotherBuilder rs = new MotherBuilder(); readyQ = new BlockingQueue <CommMessage>(); requestQ = new BlockingQueue <CommMessage>(); CommMessage msg = new CommMessage(CommMessage.MessageType.connect); msg.to = "http://localhost:9080/BasicService"; msg.from = "http://localhost:9080/BasicService"; rs.comm.postMessage(msg); CommMessage msg3 = msg.Clone(); msg3.type = CommMessage.MessageType.SpawnProcess; msg3.numberProcess = 2; rs.comm.postMessage(msg3); }
public RepoMock() { Console.Write("\n------------------------Repository is started---------------------------\n"); comm = new Comm("http://localhost", 9070); string[] buildRequests = Directory.GetFiles(Path.Combine(Path.GetFullPath(repoStorage), "BuildRequests"), "*BuildRequest*.xml"); CommMessage commMessage = new CommMessage(CommMessage.MessageType.BuildRequest); commMessage.from = "http://localhost:9070/BasicService"; commMessage.to = "http://localhost:9080/BasicService"; foreach (string buildRequest in buildRequests) { CommMessage commMsg = commMessage.Clone(); commMsg.body = File.ReadAllText(buildRequest); commMsg.fileName = Path.GetFileName(buildRequest); comm.postMessage(commMsg); } receiverThread = new Thread(receiverThreadProc); receiverThread.Start(); }