public async Task CanSaveAndLoadValue() { var text = DateTime.Now.ToString("O"); await _client.Save("/test", text); var loadedValue = await _client.Load("/test"); Console.WriteLine(loadedValue); Assert.That(loadedValue, Is.EqualTo(text)); }
public async Task <string> GetDestinationAddress(Message message) { var body = message.Body; var typeName = _typeHelper.GetName(body.GetType()); var address = await _client.Load(typeName); if (string.IsNullOrWhiteSpace(address)) { throw new RebusApplicationException($"Could not find destination address for command/request message of type {body.GetType()}"); } return(address); }