public Task<Parameter> Get(Action<ComponentTarget> target, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.RequestCanceled(LogInfo); LogInfo( "Sent request to return all information pertaining to all parameters on all virtual hosts on current RabbitMQ server."); var targetImpl = new ComponentTargetImpl(); target(targetImpl); string url = string.Format("api/parameters/{0}/{1}/{2}", targetImpl.Component, targetImpl.VirtualHost.SanitizeVirtualHostName(), targetImpl.Name); return base.Get(url, cancellationToken).As<Parameter>(cancellationToken); }
public Task<ServerResponse> Delete(Action<ComponentTarget> target, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.RequestCanceled(LogInfo); var targetImpl = new ComponentTargetImpl(); target(targetImpl); LogInfo( string.Format( "Sent request to RabbitMQ server to delete parameter '{0}' of component '{1}' on virtual host '{2}'.", targetImpl.Name, targetImpl.Component, targetImpl.VirtualHost)); string url = string.Format("api/parameters/{0}/{1}/{2}", targetImpl.Component, targetImpl.VirtualHost.SanitizeVirtualHostName(), targetImpl.Name); return base.Delete(url, cancellationToken).Response<ServerResponse>(cancellationToken); }
public Task<IEnumerable<Parameter>> GetAll(Action<ComponentTarget> target, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.RequestCanceled(LogInfo); var targetImpl = new ComponentTargetImpl(); target(targetImpl); LogInfo( string.Format( "Sent request to return all information pertaining to all parameters for component '{0} on virtual host '{1}' on current RabbitMQ server.", targetImpl.Component, targetImpl.VirtualHost)); string url = string.Format("api/parameters/{0}/{1}", targetImpl.Component, targetImpl.VirtualHost.SanitizeVirtualHostName()); return base.Get(url, cancellationToken).As<IEnumerable<Parameter>>(cancellationToken); }