示例#1
0
        protected override async Task OnEvent(FB_Event ev)
        {
            switch (ev)
            {
            case FB_MessageEvent t1:
                Console.WriteLine(string.Format("Got new message from {0}: {1}", t1.author, t1.message));
                break;

            default:
                Console.WriteLine(string.Format("Something happened: {0}", ev.ToString()));
                break;
            }
            await Task.Yield();
        }
示例#2
0
        protected override async Task OnEvent(FB_Event ev)
        {
            switch (ev)
            {
            case FB_MessageEvent t1:
                UpdateEvent?.Invoke(this, new UpdateEventArgs(UpdateStatus.NEW_MESSAGE, t1.message));
                break;

            default:
                Console.WriteLine(string.Format("Something happened: {0}", ev.ToString()));
                break;
            }
            await Task.Yield();
        }