public CapacitySummary GetCapacitySummary(DirectoryIdentity objectIdentity, bool refreshData)
        {
            Func <ILoadBalanceService, HeatMapCapacityData> func = (ILoadBalanceService service) => service.GetCapacitySummary(objectIdentity, refreshData);
            HeatMapCapacityData capacityDatum = this.CallClientFunction <HeatMapCapacityData>(func);

            return(CapacitySummary.FromDatum(capacityDatum));
        }
Esempio n. 2
0
        internal static CapacitySummary FromDatum(HeatMapCapacityData capacityDatum)
        {
            CapacitySummary capacitySummary = new CapacitySummary();

            capacitySummary.SetExchangeVersion(ExchangeObjectVersion.Current);
            capacitySummary.Identity           = capacityDatum.Identity.Name;
            capacitySummary.PhysicalSize       = capacityDatum.PhysicalSize;
            capacitySummary.LogicalSize        = capacityDatum.LogicalSize;
            capacitySummary.MaximumSize        = capacityDatum.TotalCapacity;
            capacitySummary.TotalMailboxCount  = capacityDatum.TotalMailboxCount;
            capacitySummary.RetrievedTimeStamp = capacityDatum.RetrievedTimestamp;
            Report.ListWithToString <LoadMetricValue> listWithToString = new Report.ListWithToString <LoadMetricValue>();
            foreach (LoadMetric loadMetric in capacityDatum.LoadMetrics.Metrics)
            {
                LoadMetricValue item = new LoadMetricValue(loadMetric, capacityDatum.LoadMetrics[loadMetric]);
                listWithToString.Add(item);
            }
            capacitySummary.LoadMetrics = listWithToString;
            return(capacitySummary);
        }