コード例 #1
0
        public static bool Send(Message msg, string localUri)
        {
            Sender sender = new Sender(msg.dst, localUri);

            sender.PostMessage(msg);
            return(true);
        }
コード例 #2
0
 /* 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);
     }
 }
コード例 #3
0
        /* 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);
            }
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }