/// <summary>
        /// Gets the queues.
        /// </summary>
        /// <returns>
        /// The queues for the server.
        /// </returns>
        public ICollection <CCQueue> GetQueues()
        {
            var snapshot = this.client.GetCruiseServerSnapshot();
            var queues   = snapshot.QueueSetSnapshot.Queues.Select(q => CCQueue.Wrap(this.client, q, this));

            return(queues.ToList());
        }
        /// <summary>
        /// Wraps the specified queue status.
        /// </summary>
        /// <param name="owningClient">The owning client.</param>
        /// <param name="queueStatus">The queue status.</param>
        /// <param name="connection">The connection.</param>
        /// <returns>
        /// The new <see cref="CCProject"/>.
        /// </returns>
        internal static CCQueue Wrap(CruiseServerClientBase owningClient, QueueSnapshot queueStatus, CCConnection connection)
        {
            var queue = new CCQueue(owningClient, queueStatus.QueueName, queueStatus.Requests)
            {
                Connection = connection
            };

            return(queue);
        }
 /// <summary>
 /// Wraps the specified queue status.
 /// </summary>
 /// <param name="owningClient">The owning client.</param>
 /// <param name="queueStatus">The queue status.</param>
 /// <param name="connection">The connection.</param>
 /// <returns>
 /// The new <see cref="CCProject"/>.
 /// </returns>
 internal static CCQueue Wrap(CruiseServerClientBase owningClient, QueueSnapshot queueStatus, CCConnection connection)
 {
     var queue = new CCQueue(owningClient, queueStatus.QueueName, queueStatus.Requests) { Connection = connection };
     return queue;
 }