private ExternalMessage UnpackResponse(string response) { var deserializedObject = _dataProvider.Deserialize(response); return(!(deserializedObject is BaseTransportMessage message) ? null : new ExternalMessage(message.SessionId, message)); }
protected override void OnMessage(MessageEventArgs e) { var msg = !(DataProvider.Deserialize(e.Data) is BaseTransportMessage baseMsg) ? null : new ExternalMessage(SessionId, baseMsg); M.Send(msg); }
private ExternalMessage UnpackResponse(string response, ObjectId clientId) { return(!(_dataProvider.Deserialize(response) is BaseTransportMessage message) ? null : new ExternalMessage(clientId, message)); }