コード例 #1
0
 public Build Run(BuildRunOptions options)
 {
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     return(AddToQueue(Endpoint, options.GetBuildModel()));
 }
コード例 #2
0
        public Build Run(string buildTypeId, string branchName = null, string comment = null)
        {
            var optionsBuilder = new BuildRunOptions().BuildType(buildTypeId);

            if (!string.IsNullOrEmpty(branchName))
            {
                optionsBuilder = optionsBuilder.Branch(branchName);
            }
            if (!string.IsNullOrEmpty(comment))
            {
                optionsBuilder = optionsBuilder.Comment(comment);
            }

            return(AddToQueue(Endpoint, optionsBuilder.GetBuildModel()));
        }