示例#1
0
 public async Task <GoCDPipelineConfig> EditAsync(GoCDPipelineConfig pipelineConfig)
 {
     return(await this.BeginRequest()
            .WithHeader("If-Match", pipelineConfig.ETag)
            .AppendPathSegment(pipelineConfig.Name)
            .PutJsonAsync(pipelineConfig)
            .ReceiveJson <GoCDPipelineConfig>()
            .ConfigureAwait(false));
 }
 public GoCDCreatePipelineConfigRequest(GoCDPipelineConfig pipelineConfig)
 {
     this.Group    = pipelineConfig.Group;
     this.Pipeline = new GoCDPipeline
     {
         EnvironmentVariables = pipelineConfig.EnvironmentVariables,
         LabelTemplate        = pipelineConfig.LabelTemplate,
         LockBehavior         = pipelineConfig.LockBehavior,
         Materials            = pipelineConfig.Materials,
         Name       = pipelineConfig.Name,
         Parameters = pipelineConfig.Parameters,
         Stages     = pipelineConfig.Stages,
         Template   = pipelineConfig.Template,
         Timer      = pipelineConfig.Timer
     };
 }
示例#3
0
 public async Task <GoCDPipelineConfig> CreateAsync(GoCDPipelineConfig pipelineConfig)
 {
     return(await this.CreateAsync(new GoCDCreatePipelineConfigRequest(pipelineConfig)));
 }