public async Task <GoCDEnvironment> CreateAsync(GoCDEnvironment environmentDto) { return(await this.BeginRequest() .PostJsonAsync(environmentDto) .ReceiveJson <GoCDEnvironment>() .ConfigureAwait(false)); }
public GoCDUpdateEnvironmentRequest(GoCDEnvironment env) { this.ETag = env.ETag; this.Pipelines = new List <GoCDUpdateEnvironmentPipelineRequest>(env.Pipelines.Select(p => new GoCDUpdateEnvironmentPipelineRequest { Name = p.Name })); this.Agents = new List <string>(); this.EnvironmentVariables = new List <GoCDEnvironmentVariable>(); }