示例#1
0
 private async void IncomingMessage(object sender, IncomingMessage e)
 {
     var strategy = IncomingMessageStrategy;
     if (strategy == null) { return; }
     try
     {
         await strategy(e);
     }
     catch (Exception ex)
     {
         logger.Warn(ex, "Incoming message from {0} handling", e.Sender);
     }
 }
示例#2
0
 private void OnIncomingMessage(IncomingMessage incomingMessage)
 {
     var handlers = IncomingMessage;
     if (handlers != null) { handlers(this, incomingMessage); }
 }