private void ReceiveMessage(ExternalMessage m) { Task.Run(delegate { _helper.UnPackSendReceivedMessage(m); }); }
private void Send <T>(ExternalMessage externalMessage) where T : BaseTransportMessage { _m.SendAsync <T>(externalMessage.Message as T); }
public void UnPackSendReceivedMessage(ExternalMessage m) { var generic = _generics.GetOrAdd(m.Type, t => _sendMethod.MakeGenericMethod(m.Type)); generic.Invoke(this, new object[] { m }); }