示例#1
0
 private static void RefreshRsoTopology()
 {
     if (ExchangeTopology.rsoTopology == null)
     {
         lock (ExchangeTopology.rsoTopologyLock)
         {
             if (ExchangeTopology.rsoTopology == null)
             {
                 ExchangeTopology.rsoTopology = ExchangeTopology.Discover(ExchangeTopologyScope.ADAndExchangeServerAndSiteTopology);
             }
             return;
         }
     }
     if (ExchangeTopology.rsoTopology.whenCreated.AddMinutes(10.0).CompareTo(DateTime.UtcNow) < 0)
     {
         lock (ExchangeTopology.rsoTopologyLock)
         {
             if (ExchangeTopology.rsoTopology.whenCreated.AddMinutes(10.0).CompareTo(DateTime.UtcNow) < 0)
             {
                 ExchangeTopology exchangeTopology = ExchangeTopology.Discover(ExchangeTopologyScope.ADAndExchangeServerAndSiteTopology);
                 ExchangeTopology.rsoTopology = exchangeTopology;
             }
         }
     }
 }
示例#2
0
 public static ExchangeTopology Discover(ITopologyConfigurationSession session)
 {
     return(ExchangeTopology.Discover(session, ExchangeTopologyScope.Complete));
 }
示例#3
0
 public static ExchangeTopology Discover(ExchangeTopologyScope scope)
 {
     return(ExchangeTopology.Discover(null, scope));
 }
示例#4
0
 public static ExchangeTopology Discover()
 {
     return(ExchangeTopology.Discover(null, ExchangeTopologyScope.Complete));
 }