Пример #1
0
        /// <summary>
        /// Gets the packages.
        /// </summary>
        /// <param name="start">The starting position.</param>
        /// <param name="count">The number to get.</param>
        /// <returns>
        /// The packages for the project.
        /// </returns>
        public IList <CCPackage> GetPackages(int start, int count)
        {
            var packages = this.client.RetrievePackageList(this.Name);
            var filtered = packages.OrderByDescending(p => p.DateTime).Skip(start).Take(count);

            return(filtered.Select(p => CCPackage.Wrap(this.client, p, this)).ToList());
        }
Пример #2
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);
        }
Пример #3
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;
 }