Exemplo n.º 1
0
        //此处的Update支持异步调用
        protected async override void Update()
        {
            var key = Console.ReadKey();

            if (key.Key == ConsoleKey.Escape)
            {
                return;
            }
            Log.L($"检测到按键  {key.Key} 并且发送消息 ,  按键序号为    {(int)key.Key}");

            Log.L($"剩余消息条数  {messageModule.count}");
            SendMessage();

            Log.L("开始发送紧急类型为重要的一条消息");
            await messageModule.PublishByNumber(this, null, (int)MessageUrgencyType.Important).SetCode(10);

            Log.L("已发送紧急类型为重要的一条消息");
        }