Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 public bool Create(VirtualHost virtualHost, Exchange exchange, ExchangeOptions options)
 {
     return(CreateAsync(virtualHost, exchange, options).Result);
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 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);
 }