Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.Write("\n  Starting CommService");
            Console.Write("\n ======================\n");

            string   ServerUrl = "http://localhost:8000/CommService";
            Receiver receiver  = new Receiver(ServerUrl);

            EchoCommunicator echo = new EchoCommunicator();

            echo.Name = "echo";
            receiver.Register(echo);
            echo.Start();

            string ClientUrl = echo.GetClientUrl();
            Sender sender    = new Sender();

            sender.Name = "sender";
            sender.Connect(ClientUrl);
            receiver.Register(sender);
            sender.Start();


            QueryCommunicator query = new QueryCommunicator();

            query.Name = "query";
            receiver.Register(query);
            query.Start();

            // parent/child relationships

            NavigationCommunicator nav = new NavigationCommunicator();

            nav.Name = "nav";
            receiver.Register(nav);
            nav.Start();

            Console.Write("\n  Started CommService - Press key to exit:\n ");
            Console.ReadKey();
        }
Esempio n. 2
0
            static void Main(string[] args)
            {
                Console.Write("\n  Starting CommService");
                Console.Write("\n ======================\n");

                string   ServerUrl = "http://localhost:8000/CommService";
                Receiver receiver  = new Receiver(ServerUrl);

                string ClientUrl = "http://localhost:8001/CommService";

                Sender sender = new Sender();

                sender.Name = "sender";
                sender.Connect(ClientUrl);
                receiver.Register(sender);
                sender.Start();

                // Test Component that simply echos message

                EchoCommunicator echo = new EchoCommunicator();

                echo.Name = "echo";
                receiver.Register(echo);
                echo.Start();

                // Placeholder for query processor

                QueryCommunicator query = new QueryCommunicator();

                query.Name = "query";
                receiver.Register(query);
                query.Start();

                FileContent filecontent = new FileContent();

                filecontent.Name = "filecontent";
                receiver.Register(filecontent);
                filecontent.Start();

                EditMetadataCommunicator editmetadata = new EditMetadataCommunicator();

                editmetadata.Name = "metadataedit";
                receiver.Register(editmetadata);
                editmetadata.Start();
                // Placeholder for component that searches for and returns
                // parent/child relationships

                TextFilesCommunicator textfiles = new TextFilesCommunicator();

                textfiles.Name = "textfiles";
                receiver.Register(textfiles);
                textfiles.Start();

                NavigationCommunicator nav = new NavigationCommunicator();

                nav.Name = "nav";
                receiver.Register(nav);
                nav.Start();

                FileInsertionCommunicator fic = new FileInsertionCommunicator();

                fic.Name = "file";
                receiver.Register(fic);
                fic.Start();

                Console.Write("\n  Started CommService - Press key to exit:\n ");
                Console.ReadKey();
            }