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); } }
private void OnIncomingMessage(IncomingMessage incomingMessage) { var handlers = IncomingMessage; if (handlers != null) { handlers(this, incomingMessage); } }