private void Display(IEnumerable <AggregatedQueueInfo> aggregatedQueues)
 {
     foreach (AggregatedQueueInfo aggregatedQueueInfo in aggregatedQueues)
     {
         QueueDigestPresentationObject sendToPipeline = QueueDigestPresentationObject.Create(aggregatedQueueInfo);
         this.cmdlet.WriteObject(sendToPipeline);
     }
 }
        public override void ProcessRecord()
        {
            MultiValuedProperty <ComparisonFilter> dataFilter = this.SplitQueryFilter(this.cmdlet.QueryFilter);

            this.cmdlet.WriteDebug("Connecting to MTRT");
            MultiValuedProperty <Guid> siteIds;
            MultiValuedProperty <Guid> dagIds;
            MultiValuedProperty <Guid> serverIds;

            this.GetParameterIdentities(out siteIds, out dagIds, out serverIds);
            Guid   guid;
            string text;

            TransportADUtils.GetForestInformation(out guid, out text);
            this.cmdlet.WriteDebug(string.Format(CultureInfo.InvariantCulture, "ForestName: {0}; ForestGuid: {1};", new object[]
            {
                text,
                guid
            }));
            Exception ex = null;

            try
            {
                int num = 0;
                foreach (TransportQueueStatistics mtrtQueueAggregate in this.FindQueueFromMtrt(guid, dataFilter, siteIds, dagIds, serverIds))
                {
                    this.cmdlet.WriteObject(QueueDigestPresentationObject.Create(mtrtQueueAggregate, this.cmdlet.GroupBy));
                    num++;
                    if (!this.cmdlet.ResultSize.IsUnlimited && (long)num == (long)((ulong)this.cmdlet.ResultSize.Value))
                    {
                        break;
                    }
                }
            }
            catch (FaultException <DiagnosticsAggregationFault> faultException)
            {
                ex = faultException;
            }
            catch (CommunicationException ex2)
            {
                ex = ex2;
            }
            catch (TimeoutException ex3)
            {
                ex = ex3;
            }
            catch (Exception ex4)
            {
                this.cmdlet.WriteDebug("Unhandled Excpetion: " + ex4.ToString());
                throw;
            }
            if (ex != null)
            {
                this.cmdlet.WriteError(new LocalizedException(Strings.GetQueueDigestFromMtrtFailed(ex.ToString())), ErrorCategory.ReadError, null);
            }
        }