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, ExchangeOptions options) { return(CreateAsync(virtualHost, exchange, options).Result); }
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 bool Create(VirtualHost virtualHost, Exchange exchange, ExchangeOptions options) { return Client.Put(options, "exchanges/:vhost/:name", new { vhost = virtualHost.Name, exchange.Name, }).Is(HttpStatusCode.NoContent); }