public bool Create(VirtualHost virtualHost, User user, Permission permission) { return(Client.Put( permission, "permissions/:vhost/:user", new { vhost = virtualHost.Name, user = user.Name }) .Is(HttpStatusCode.NoContent)); }
public bool Create(VirtualHost virtualHost, Exchange exchange, ExchangeOptions options) { return(Client.Put(options, "exchanges/:vhost/:name", new { vhost = virtualHost.Name, exchange.Name, }).Is(HttpStatusCode.NoContent)); }
public bool Create(VirtualHost virtualHost, Exchange exchange, Queue queue, BindingOptions options) { return(Client.Post(options, "bindings/:vhost/e/:exchange/q/:queue", new { vhost = virtualHost.Name, exchange = exchange.Name, queue = queue.Name }).Is(HttpStatusCode.Created)); }
public async Task <bool> CreateAsync(VirtualHost virtualHost) { var response = await httpClient.Execute(HttpMethod.Put, "vhosts/{name}", new Dictionary <string, string> { { "name", virtualHost.Name } }); return(response.StatusCode == HttpStatusCode.NoContent); }
public async Task <bool> CreateAsync(VirtualHost virtualHost, Exchange exchange, Queue queue, BindingOptions options) { var response = await httpClient.Execute( HttpMethod.Post, "bindings/{vhost}/e/{exchange}/q/{queue}", new Dictionary <string, string> { { "vhost", virtualHost.Name }, { "exchange", exchange.Name }, { "queue", queue.Name } }, options); return(response.StatusCode == HttpStatusCode.Created); }
public async Task <bool> CreateAsync(VirtualHost virtualHost, User user, Permission permission) { var response = await httpClient.Execute( HttpMethod.Put, "permissions/{vhost}/{user}", new Dictionary <string, string> { { "vhost", virtualHost.Name }, { "user", user.Name } }, permission ); return(response.StatusCode == HttpStatusCode.NoContent); }
public async Task <bool> CreateAsync(VirtualHost virtualHost, Exchange exchange, ExchangeOptions options) { var response = await httpClient.Execute(HttpMethod.Put, "exchanges/{vhost}/{name}", new Dictionary <string, string> { { "vhost", virtualHost.Name }, { "name", exchange.Name } }, options); return(response.StatusCode == HttpStatusCode.NoContent); }
public IEnumerable <Message> Messages(VirtualHost virtualHost, Queue queue) { var options = new { vhost = virtualHost.Name, name = queue.Name, count = "1", requeue = "true", encoding = "auto", truncate = "50000" }; return(Client.Post(options, "queues/:vhost/:queue/get", new { vhost = virtualHost.Name, queue = queue.Name }).OnOk().As <List <Message> >()); }
public Task <IEnumerable <Message> > MessagesAsync(VirtualHost virtualHost, Queue queue) { var options = new { vhost = virtualHost.Name, name = queue.Name, count = "1", requeue = "true", encoding = "auto", truncate = "50000" }; return(httpClient.ExecuteList <Message>( HttpMethod.Post, "queues/{vhost}/{queue}/get", new Dictionary <string, string> { { "vhost", virtualHost.Name }, { "queue", queue.Name } }, options )); }
public bool Create(VirtualHost virtualHost, Exchange exchange, Queue queue) { return Create(virtualHost, exchange, queue, BindingOptions.Default); }
public IEnumerable <Message> Messages(VirtualHost virtualHost, Queue queue) { return(MessagesAsync(virtualHost, queue).Result); }
public bool Create(VirtualHost virtualHost) { return Client.Put("vhosts/:name", new { name = virtualHost.Name }) .Is(HttpStatusCode.NoContent); }
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)); }
public Task <bool> CreateAsync(VirtualHost virtualHost, Exchange exchange) { return(CreateAsync(virtualHost, exchange, ExchangeOptions.Default)); }
public bool Create(VirtualHost virtualHost, Exchange exchange, Queue queue, BindingOptions options) { return Client.Post(options, "bindings/:vhost/e/:exchange/q/:queue", new { vhost = virtualHost.Name, exchange = exchange.Name, queue = queue.Name }).Is(HttpStatusCode.Created); }
public IEnumerable<Message> Messages(VirtualHost virtualHost, Queue queue) { var options = new { vhost = virtualHost.Name, name = queue.Name, count = "1", requeue = "true", encoding = "auto", truncate = "50000" }; return Client.Post(options, "queues/:vhost/:queue/get", new { vhost = virtualHost.Name, queue = queue.Name }).OnOk().As<List<Message>>(); }
public bool Exists(VirtualHost virtualHost, Queue queue) { return Queues(virtualHost).Any(q => q.Name == queue.Name); }
public IEnumerable<Queue> Queues(VirtualHost virtualHost) { return Client.Get("queues/:vhost", new { vhost = virtualHost.Name }).OnOk().As<List<Queue>>(); }
public IEnumerable<Exchange> Exchanges(VirtualHost virtualHost) { return Client.Get("exchanges/:vhost", new { vhost = virtualHost.Name }).OnOk().As<List<Exchange>>(); }
public bool Create(VirtualHost virtualHost, Exchange exchange) { return Create(virtualHost, exchange, ExchangeOptions.Default); }
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); }
public bool Create(VirtualHost virtualHost, Queue queue) { return Create(virtualHost, queue, QueueOptions.Default); }
public Task <IEnumerable <Queue> > QueuesAsync(VirtualHost virtualHost) { return(httpClient.ExecuteList <Queue>("queues/{vhost}", new Dictionary <string, string> { { "vhost", virtualHost.Name } })); }
public bool Exists(VirtualHost virtualHost, Queue queue) { return(Queues(virtualHost).Any(q => q.Name == queue.Name)); }
public Task <IEnumerable <Permissions> > PermissionsAsync(VirtualHost virtualHost) { return(httpClient.ExecuteList <Permissions>("vhosts/{name}/permissions", new Dictionary <string, string> { { "name", virtualHost.Name } })); }
public bool Exists(VirtualHost virtualHost, Exchange exchange) { return Exchanges(virtualHost).Any(e => e.Name == exchange.Name); }
public Task <bool> CreateAsync(VirtualHost virtualHost, Queue queue) { return(CreateAsync(virtualHost, queue, QueueOptions.Default)); }
public IEnumerable <Queue> Queues(VirtualHost virtualHost) { return(Client.Get("queues/:vhost", new { vhost = virtualHost.Name }).OnOk().As <List <Queue> >()); }
public bool Create(VirtualHost virtualHost, User user, Permission permission) { return Client.Put( permission, "permissions/:vhost/:user", new { vhost = virtualHost.Name, user = user.Name }) .Is(HttpStatusCode.NoContent); }
public bool Create(VirtualHost virtualHost) { return(Client.Put("vhosts/:name", new { name = virtualHost.Name }) .Is(HttpStatusCode.NoContent)); }
public bool Create(VirtualHost virtualHost, Exchange exchange, Queue queue) { return(Create(virtualHost, exchange, queue, BindingOptions.Default)); }
public IEnumerable<Permissions> Permissions(VirtualHost virtualHost) { return Client.Get("vhosts/:name/permissions", new { virtualHost.Name }) .OnOk() .As<List<Permissions>>(); }
public bool Create(VirtualHost virtualHost, User user, Permission permission) { return(CreateAsync(virtualHost, user, permission).Result); }
public bool Create(VirtualHost virtualHost, Exchange exchange, Queue queue) { return(CreateAsync(virtualHost, exchange, queue).Result); }
public bool Exists(VirtualHost virtualHost, Exchange exchange) { return(Exchanges(virtualHost).Any(e => e.Name == exchange.Name)); }
public bool Create(VirtualHost virtualHost, Exchange exchange, Queue queue, BindingOptions options) { return(CreateAsync(virtualHost, exchange, queue, options).Result); }
public IEnumerable <Exchange> Exchanges(VirtualHost virtualHost) { return(Client.Get("exchanges/:vhost", new { vhost = virtualHost.Name }).OnOk().As <List <Exchange> >()); }
public bool Exists(VirtualHost virtualHost, Queue queue) { return(ExistsAsync(virtualHost, queue).Result); }
public IEnumerable <Permissions> Permissions(VirtualHost virtualHost) { return(Client.Get("vhosts/:name/permissions", new { virtualHost.Name }) .OnOk() .As <List <Permissions> >()); }
public bool Exists(VirtualHost virtualHost, Exchange exchange) { return(ExistsAsync(virtualHost, exchange).Result); }
public bool Create(VirtualHost virtualHost, Queue queue) { return(Create(virtualHost, queue, QueueOptions.Default)); }
public bool Delete(VirtualHost virtualHost) { return(DeleteAsync(virtualHost).Result); }
public bool Create(VirtualHost virtualHost, Exchange exchange) { return(Create(virtualHost, exchange, ExchangeOptions.Default)); }
public bool Create(VirtualHost virtualHost, Exchange exchange, ExchangeOptions options) { return Client.Put(options, "exchanges/:vhost/:name", new { vhost = virtualHost.Name, exchange.Name, }).Is(HttpStatusCode.NoContent); }