示例#1
0
        public void Send(object value)
        {
            string data    = _dataSerializer.ToJson(value);
            var    request = new SendMessageRequest
            {
                QueueUrl    = _config.QueueUrl,
                MessageBody = data
            };

            _client.SendMessage(request);
        }
示例#2
0
 /// <summary>
 /// Serailize an object to JSON string.
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="formatted"></param>
 /// <returns></returns>
 public static string ToJson(object obj, bool formatted = false)
 {
     return(serializer.ToJson(obj, formatted));
 }