private void Send(ForwardChannel channel, MessageChain chain) { _logger.LogInformation($"Forward to {channel.DestinationType switch{ MessageEventType.Friend => "f", MessageEventType.Group => "g" } }{channel.Destination} with rule {channel.Rule.Expression}:\n{chain.ToString()}"); switch (channel.DestinationType) { case MessageEventType.Friend: var friend = new Friend() { Identity = channel.Destination }; friend.SendAsync(chain).Wait(); break; case MessageEventType.Group: var group = new Group() { Identity = channel.Destination }; group.SendAsync(chain).Wait(); break; } }