Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Repository repo = new Repository();

            repo.startRepository();
            //------------------test sub------------------
#if (TEST_REPOSITORY)
            CommandData cmd = new CommandData();
            cmd.from       = "client";
            cmd.to         = "repo";
            cmd.testAuthor = "me";
            cmd.testName   = "test";
            cmd.command    = "Request Query";
            DateTime tm = new DateTime(2016, 11, 20, 09, 00, 00);
            cmd.dateTime = tm.ToString("MM_dd_yyyy_hh_mm_ss");
            cmd.url      = "http://localhost:8082/";
            cmd.dllFiles.Add("tc1.dll");
            cmd.dllFiles.Add("tc2.dll");
            cmd.dllFiles.Add("td1.dll");
            cmd.dllFiles.Add("td2.dll");
            cmd.xmlFile = "XMLFile1.xml";
            try
            {
                stringSender   sndr        = new stringSender("http://localhost:8081/RepoStrRcvr");
                CommandEncoder cmdEnocoder = new CommandEncoder(cmd);
                sndr.PostMessage(cmdEnocoder.encode());
                cmd.testAuthor = "me1";
                cmdEnocoder    = new CommandEncoder(cmd);
                sndr.PostMessage(cmdEnocoder.encode());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
#endif
        }