コード例 #1
0
        internal static MailboxDatabase[] InvokeResourceForest(LatencyTracker latencyTracker, Func <MailboxDatabase[]> activeDirectoryFunction)
        {
            if (latencyTracker == null)
            {
                throw new ArgumentNullException("latencyTracker");
            }
            if (activeDirectoryFunction == null)
            {
                throw new ArgumentNullException("activeDirectoryFunction");
            }
            long latency = 0L;

            MailboxDatabase[] latency2 = LatencyTracker.GetLatency <MailboxDatabase[]>(() => activeDirectoryFunction(), out latency);
            latencyTracker.HandleResourceLatency(latency);
            if (latency2 != null && latency2.Length > 0)
            {
                string originatingServer = latency2[0].OriginatingServer;
            }
            return(latency2);
        }