예제 #1
0
 public async Task <GoCDEnvironment> CreateAsync(GoCDEnvironment environmentDto)
 {
     return(await this.BeginRequest()
            .PostJsonAsync(environmentDto)
            .ReceiveJson <GoCDEnvironment>()
            .ConfigureAwait(false));
 }
예제 #2
0
 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>();
 }