Exemplo n.º 1
0
 /// <summary>
 /// Add subscribers to queue.
 /// </summary>
 public async Task<bool> AddSubscribersAsync(params string[] subscribers)
 {
     var add = new _Subscribers(subscribers);
     var content = new JsonContent(content: add);
     var response = await _client.PostAsync(string.Format("queues/{0}/subscribers", Name), content);
     return response.IsSuccessStatusCode;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Remove subscribers from a queue.
        /// </summary>
        public async Task <bool> RemoveSubscribersAsync(params string[] subscribers)
        {
            var add      = new _Subscribers(subscribers);
            var content  = new JsonContent(content: add);
            var response = await _client.DeleteAsync(string.Format("queues/{0}/subscribers", Name), content);

            return(response.IsSuccessStatusCode);
        }