示例#1
0
        static async void RunAsync()
        {
            logger.InfoFormat("demo start");

            MIMCDemo demo = new MIMCDemo();

            if (!await demo.ReadyAsync())
            {
                return;
            }

            //demo.SendMessageAsync();
            //Thread.Sleep(1000);

            //demo.SendGroupMessageAsync();
            //Thread.Sleep(1000);

            demo.SendUnlimitedGroupMessage();
            Thread.Sleep(1000);

            //demo.JoinInexistentUnlimitedGroup();
            //Thread.Sleep(1000);

            //demo.QuitInexistentUnlimitedGroup();
            //Thread.Sleep(5000);

            //if (!await demo.OverAsync())
            //{
            //    return;
            //}
        }
示例#2
0
        static void Run()
        {
            logger.InfoFormat("demo start");

            MIMCDemo demo = new MIMCDemo();

            if (!demo.Ready())
            {
                return;
            }
            Thread.Sleep(5 * 1000);

            demo.SendUnlimitedGroupMessage();

            Thread.Sleep(5 * 1000);

            if (!demo.Over())
            {
                return;
            }
        }