Beispiel #1
0
    static void Main(string[] args)
    {
        CClientSocket.QueueConfigure.MessageQueuePassword = "******";
        SetWorkDirectory();
        ReplicationSetting rs = new ReplicationSetting();

        using (CReplication <HelloWorld> hw = new CReplication <HelloWorld>(rs))
        {
            Dictionary <string, CConnectionContext> ConnQueue = new Dictionary <string, CConnectionContext>();
            CConnectionContext cc = new CConnectionContext("127.0.0.1", 20901, "replication", "p4localhost");
#if PocketPC
#else
            ConnQueue["Tolocal"] = cc;
#endif
            cc = new CConnectionContext("192.168.1.109", 20901, "remote_rep", "PassOne");
            ConnQueue["ToLinux"] = cc;
            bool ok = hw.Start(ConnQueue, "hw_root_queue_name");
            hw.StartJob();
            ok = hw.Send(hwConst.idSayHelloHelloWorld, "David", "Young");
            ok = hw.Send(hwConst.idEchoHelloWorld, CMyStruct.MakeOne());
            hw.EndJob();
            Console.WriteLine("Press key ENTER to shut down the application ......");
            Console.ReadLine();
        }
    }
Beispiel #2
0
 static void Main(string[] args)
 {
     CClientSocket.QueueConfigure.MessageQueuePassword = "******";
     SetWorkDirectory();
     ReplicationSetting rs = new ReplicationSetting();
     using (CReplication<HelloWorld> hw = new CReplication<HelloWorld>(rs))
     {
         Dictionary<string, CConnectionContext> ConnQueue = new Dictionary<string, CConnectionContext>();
         CConnectionContext cc = new CConnectionContext("127.0.0.1", 20901, "replication", "p4localhost");
     #if PocketPC
     #else
         ConnQueue["Tolocal"] = cc;
     #endif
         cc = new CConnectionContext("192.168.1.109", 20901, "remote_rep", "PassOne");
         ConnQueue["ToLinux"] = cc;
         bool ok = hw.Start(ConnQueue, "hw_root_queue_name");
         hw.StartJob();
         ok = hw.Send(hwConst.idSayHelloHelloWorld, "David", "Young");
         ok = hw.Send(hwConst.idEchoHelloWorld, CMyStruct.MakeOne());
         hw.EndJob();
         Console.WriteLine("Press key ENTER to shut down the application ......");
         Console.ReadLine();
     }
 }