/// <inheritdoc/> public async Task SendPrivateMessageAsync(RedisChannel channel, T message) { if (IsSelf(channel, out var clientId)) { OnPrivateMessageReceived(clientId, message); } else { await SendPrivateMessageAsync(channel, valueConverter.ConvertToMessage(message)); } }
/// <inheritdoc/> public void SendPrivateMessage(Guid clientId, T message) { if (IsSelf(clientId)) { OnPrivateMessageReceived(clientId, message); } else { SendingPrivateMessage(clientId, valueConverter.ConvertToMessage(message)); } }
void SendMessageThroughAdapter(Guid targetClientId, T messageForClient) { var messageForAdapter = valueConverter.ConvertToMessage(messageForClient); adapterSidePrivateMessageCallbackHelper.CallAndForget(targetClientId, messageForAdapter); }