Example #1
0
        public async Task <bool> CreateAsync(VirtualHost virtualHost, Queue queue, QueueOptions options)
        {
            var response = await httpClient.Execute(HttpMethod.Put,
                                                    "queues/{vhost}/{name}",
                                                    new Dictionary <string, string>
            {
                { "vhost", virtualHost.Name },
                { "name", queue.Name }
            },
                                                    options);

            return(response.StatusCode == HttpStatusCode.NoContent);
        }
Example #2
0
 public bool Create(VirtualHost virtualHost, Queue queue, QueueOptions options)
 {
     return(Client.Put(options, "queues/:vhost/:name", new { vhost = virtualHost.Name, queue.Name })
            .Is(HttpStatusCode.NoContent));
 }
Example #3
0
 public bool Create(VirtualHost virtualHost, Queue queue, QueueOptions options)
 {
     return(CreateAsync(virtualHost, queue, options).Result);
 }