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