コード例 #1
0
 public static void NotifyMessageReceived(this INotifyMessageReceived sender, MessageReceivedEventArgs e)
 {
     MessageReceivedEventHandler handler;
     if (sender == null ||
         e == null ||
         (handler = sender.GetDelegate(EventHandlerName)
             .GetHandler<MessageReceivedEventHandler>()) == null) {
         return;
     }
     handler(sender, e);
 }
コード例 #2
0
 public static ChatMessage NotifyMessageReceived(this INotifyMessageReceived sender, ChatMessage message)
 {
     var e = new MessageReceivedEventArgs(message);
     sender.NotifyMessageReceived(e);
     return e.Response;
 }