Пример #1
0
        public Child()
        {
            Console.WriteLine("@ child| created");

            /*
             * MiddleMan.Outgoing += MiddleManOnOutgoing;
             * MiddleMan.Initialize += MiddleManOnInitialize;
             * MiddleMan.MonitoredOut += MiddleManOnMonitoredOut;
             * MiddleMan.NonMonitoredOut += MiddleMan_NonMonitoredOut;
             *
             */

            s0 = new SubChild();
            s0.ConfigListener(Program.INIT_EVT_NAME);

            s1 = new SubChild();
            s1.ConfigListener(Program.INIT_EVT_NAME);

            s2 = new SubChild();
            s2.ConfigListener(Program.INIT_EVT_NAME);

            Orator.Listen(Program.INIT_EVT_NAME, OnIntEvent);

            // Modified = Orator.GetAnnouncer(Program.MODIFY_EVT_NAME);
            Modified2 = Orator.GetAnnouncer2(this, Program.MODIFY_EVT_NAME);
        }
Пример #2
0
        public SubChild()
        {
            // MiddleMan.Outgoing += MiddleManOnOutgoing;

            index = ++Program.count;

            Console.WriteLine("@ subchild " + index + "| created");

            // xModified = Orator.GetAnnouncer(Program.MODIFY_EVT_NAME);
            xModified2 = Orator.GetAnnouncer2(this, Program.MODIFY_EVT_NAME);
        }
Пример #3
0
        public void Test3()
        {
            Console.WriteLine("\n@ program| Test 2");

            Orator.Listen(MODIFY_EVT_NAME, OnModifiedEvent);

            // send message to children
            // Orator.ConfRoom.Announcer A = Orator.GetAnnouncer(INIT_EVT_NAME);
            Orator.ConfRoom.Announcer2 A2 = Orator.GetAnnouncer2(this, INIT_EVT_NAME);

            // AnnounceInit("init event sent");

            Console.WriteLine("\n@ program| announcing on A2\n");
            // A.Announce(this, true);
            A2.Announce("this is an A2 package");
        }