/// <summary> /// Gets the projects. /// </summary> /// <returns> /// The projects for the server. /// </returns> public ICollection <CCProject> GetProjects() { var snapshot = this.client.GetCruiseServerSnapshot(); var projects = snapshot.ProjectStatuses.Select(p => CCProject.Wrap(this.client, p, this)); return(projects.ToList()); }
/// <summary> /// Wraps the specified project status. /// </summary> /// <param name="owningClient">The owning client.</param> /// <param name="projectStatus">The project status.</param> /// <param name="connection">The connection.</param> /// <returns> /// The new <see cref="CCProject"/>. /// </returns> internal static CCProject Wrap(CruiseServerClientBase owningClient, ProjectStatus projectStatus, CCConnection connection) { var project = new CCProject( owningClient, projectStatus.Name, projectStatus.Category, projectStatus.Activity, projectStatus.BuildStatus, projectStatus.Status, projectStatus.WebURL, projectStatus.LastBuildDate, projectStatus.LastBuildLabel, projectStatus.LastSuccessfulBuildLabel, projectStatus.NextBuildTime, projectStatus.BuildStage, projectStatus.Queue, projectStatus.QueuePriority) { Connection = connection }; return(project); }
/// <summary> /// Wraps the specified project status. /// </summary> /// <param name="owningClient">The owning client.</param> /// <param name="projectStatus">The project status.</param> /// <param name="connection">The connection.</param> /// <returns> /// The new <see cref="CCProject"/>. /// </returns> internal static CCProject Wrap(CruiseServerClientBase owningClient, ProjectStatus projectStatus, CCConnection connection) { var project = new CCProject( owningClient, projectStatus.Name, projectStatus.Category, projectStatus.Activity, projectStatus.BuildStatus, projectStatus.Status, projectStatus.WebURL, projectStatus.LastBuildDate, projectStatus.LastBuildLabel, projectStatus.LastSuccessfulBuildLabel, projectStatus.NextBuildTime, projectStatus.BuildStage, projectStatus.Queue, projectStatus.QueuePriority, projectStatus.Parameters) { Connection = connection }; return project; }
/// <summary> /// Initializes a new instance of the <see cref="CCBuild"/> class. /// </summary> /// <param name="client">The client.</param> /// <param name="summary">The summary.</param> /// <param name="project">The project.</param> public CCBuild(CruiseServerClientBase client, BuildSummary summary, CCProject project) : base(summary) { this.client = client; this.Project = project; }
/// <summary> /// Wraps the specified package status. /// </summary> /// <param name="owningClient">The owning client.</param> /// <param name="packageStatus">The package status.</param> /// <param name="project">The project.</param> /// <returns> /// The new <see cref="CCPackage"/>. /// </returns> internal static CCPackage Wrap(CruiseServerClientBase owningClient, PackageDetails packageStatus, CCProject project) { var package = new CCPackage( owningClient, packageStatus.Name, packageStatus.BuildLabel, packageStatus.DateTime, packageStatus.NumberOfFiles, packageStatus.Size, packageStatus.FileName) { Project = project }; return(package); }
/// <summary> /// Wraps the specified package status. /// </summary> /// <param name="owningClient">The owning client.</param> /// <param name="packageStatus">The package status.</param> /// <param name="project">The project.</param> /// <returns> /// The new <see cref="CCPackage"/>. /// </returns> internal static CCPackage Wrap(CruiseServerClientBase owningClient, PackageDetails packageStatus, CCProject project) { var package = new CCPackage( owningClient, packageStatus.Name, packageStatus.BuildLabel, packageStatus.DateTime, packageStatus.NumberOfFiles, packageStatus.Size, packageStatus.FileName) { Project = project }; return package; }