using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class EventProxy : ProxyBase { public EventProxy() => opeCode = OpeCode.ope_event; /// /// 拉取新的角标通知 /// /// public void GetNewCornerSignNotifications(Action> callback) { Post(CmdCode.cmd_event_GetConerSignNotifications, new object[] { }, resp => { var ret= resp.result.TryGetValue("notifications", out var jo) ? jo.ToObject>() : new List(); callback?.Invoke(ret); }); } /// /// 清除指定类型的角标 /// /// 清理的种类 /// 返回最新角标信息 public void ClearCornerSignNotification(CornerSignType cType, Action> callback) { Post(CmdCode.cmd_event_ClearNotifications, new object[] { cType }, resp => { var ret = resp.result.TryGetValue("notifications", out var jo)?jo.ToObject>() : new List(); callback?.Invoke(ret); }); } }