Ejemplo n.º 1
0
        /// <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());
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 /// <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;
 }
Ejemplo n.º 4
0
 /// <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;
 }
Ejemplo n.º 5
0
 /// <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;
 }
Ejemplo n.º 6
0
        /// <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);
        }
Ejemplo n.º 7
0
 /// <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;
 }