public static bool Send(Message msg, string localUri) { Sender sender = new Sender(msg.dst, localUri); sender.PostMessage(msg); return(true); }
/* Send request to analyze a list of projects to a server */ public void Analyze(Dictionary <string, List <string> > selectedProjects) { subscribe(); foreach (string server in selectedProjects.Keys) { Message msg = MessageGenerator. GetDepAnalyzeMessage(selectedProjects[server], server, loader.localServiceUrl); Sender sender = new Sender(msg.dst, msg.src); sender.PostMessage(msg); } }
/* Send request to get the list of projects in a server */ public void GetProjects() { List <Message> requests = MessageGenerator. getProjectListRequestMessages(loader.localServiceUrl, loader.servers); foreach (Message request in requests) { Sender sender = new Sender(request.dst, request.src); sender.PostMessage(request); } }
static void Main(string[] args) { Receiver recvr = new Receiver(); recvr.CreateRecvChannel(args[0]); Sender sender = new Sender(args[0], args[1]); Message msg = new Message(); sender.PostMessage(msg); }
void getProjectsList(Message msg) { ProjectFileFinder projectFileFinder = new ProjectFileFinder(loader.rootPath); projectFileFinder.findProjects(); List <string> fileNames = projectFileFinder.projectFiles; Message response = MessageGenerator.GetProjectsReplyMessage(fileNames, msg.src, loader.localServiceUrl); Sender sender = new Sender(response.dst, response.src); sender.PostMessage(response); }