コード例 #1
0
        public void OnSmsReceivedMsg(Message msg)
        {
            msg = FormatterMsgEvent?.Invoke(msg) ?? msg;

            lock (LockMsgTextList) {
                MsgTextListGet.Add(msg);
            }

            UpdateView();
        }
コード例 #2
0
 public void AttachOnlyOneHandler(Func <Message, Message> handler)
 {
     if (FormatterMsgEvent != null)
     {
         foreach (var del in FormatterMsgEvent.GetInvocationList())
         {
             FormatterMsgEvent -= (Func <Message, Message>)del;
         }
     }
     FormatterMsgEvent += handler;
 }
コード例 #3
0
 public bool FormatterMsgEventIsSubscribed(Func <Message, Message> d)
 {
     return(FormatterMsgEvent.GetInvocationList().Contains(d));
 }