Exemplo n.º 1
0
        public Task PutAsync(T message, TimeSpan?delay = null)
        {
            var serializer = new JsonSerializer();

            var text = serializer.Serialize(message).ToString(pretty: false);

            return(client.SendMessageAsync(url, new SendMessageRequest(text)
            {
                Delay = delay
            }));
        }
Exemplo n.º 2
0
        public async Task <string> PutAsync(T message, TimeSpan?delay = null)
        {
            string text = JsonSerializer.Serialize(message, jso);

            var request = new SendMessageRequest(text)
            {
                Delay = delay
            };

            var result = await client.SendMessageAsync(url, request).ConfigureAwait(false);

            return(result.MessageId);
        }