// Token: 0x06000755 RID: 1877 RVA: 0x0002ABFC File Offset: 0x00028DFC private static void ApplyManualOverrides(Dictionary <string, ProxyDestination> proxyDestinations, string manualOverrides) { Regex regex = new Regex("^\\+(.+)=(.+):(\\d+)"); Regex regex2 = new Regex("^\\-(.+)"); foreach (string input in manualOverrides.Split(new char[] { ';' })) { Match match = regex.Match(input); if (match.Success) { string value = match.Groups[1].Value; string value2 = match.Groups[2].Value; int port; if (int.TryParse(match.Groups[3].Value, out port)) { proxyDestinations.Add(value, CoexistenceRpcHttpProxyRules.CreateFixedDestination(Server.E15MinVersion, value2, port)); } } Match match2 = regex2.Match(input); if (match2.Success) { string value3 = match2.Groups[1].Value; proxyDestinations.Remove(value3); } } }
// Token: 0x06000758 RID: 1880 RVA: 0x0002AD0C File Offset: 0x00028F0C private void RefreshServerList(object stateInfo) { if (this.shutdown) { return; } ADSite[] adsites = this.directory.GetADSites(); ClientAccessArray[] clientAccessArrays = this.directory.GetClientAccessArrays(); Server[] servers = this.directory.GetServers(); if (adsites != null && servers != null) { Dictionary <string, ProxyDestination> dictionary = new Dictionary <string, ProxyDestination>(StringComparer.OrdinalIgnoreCase); foreach (Server server5 in from s in servers where s.IsE15OrLater && s.IsMailboxServer select s) { CoexistenceRpcHttpProxyRules.AddTwoMapsOfDestinations(dictionary, server5, CoexistenceRpcHttpProxyRules.CreateFixedDestination(Server.E15MinVersion, server5.Fqdn, 444)); } ADSite[] array = adsites; for (int i = 0; i < array.Length; i++) { ADSite site = array[i]; IEnumerable <Server> source = from s in servers where s.ServerSite != null && s.ServerSite.Name == site.Name select s; IEnumerable <Server> enumerable = from s in source where s.IsE14OrLater && !s.IsE15OrLater && s.IsClientAccessServer select s; IEnumerable <Server> source2 = from s in enumerable where !(bool)s[ActiveDirectoryServerSchema.IsOutOfService] select s; ProxyDestination proxyDestination = null; if (source2.Count <Server>() > 0) { proxyDestination = new ProxyDestination(Server.E14MinVersion, 443, (from server in enumerable select server.Fqdn).OrderBy((string str) => str, StringComparer.OrdinalIgnoreCase).ToArray <string>(), (from server in source2 select server.Fqdn).OrderBy((string str) => str, StringComparer.OrdinalIgnoreCase).ToArray <string>()); } foreach (Server server2 in enumerable) { CoexistenceRpcHttpProxyRules.AddTwoMapsOfDestinations(dictionary, server2, CoexistenceRpcHttpProxyRules.CreateFixedDestination(Server.E14MinVersion, server2.Fqdn, 443)); } if (proxyDestination != null) { foreach (Server server3 in from s in source where s.IsE14OrLater && !s.IsE15OrLater && !s.IsClientAccessServer && s.IsMailboxServer select s) { CoexistenceRpcHttpProxyRules.AddTwoMapsOfDestinations(dictionary, server3, proxyDestination); } if (clientAccessArrays != null && clientAccessArrays.Count <ClientAccessArray>() > 0) { IEnumerable <ClientAccessArray> source3 = clientAccessArrays; Func <ClientAccessArray, bool> predicate; Func <ClientAccessArray, bool> < > 9__9; if ((predicate = < > 9__9) == null) { predicate = (< > 9__9 = ((ClientAccessArray arr) => arr.SiteName == site.Name)); } foreach (ClientAccessArray clientAccessArray in source3.Where(predicate)) { dictionary[clientAccessArray.Fqdn] = proxyDestination; } } } IEnumerable <Server> source4 = from s in source where !s.IsE14OrLater && s.IsExchange2007OrLater && s.IsClientAccessServer select s; ProxyDestination proxyDestination2 = null; if (source4.Count <Server>() > 0) { string[] array2 = (from server in source4 select server.Fqdn).OrderBy((string str) => str, StringComparer.OrdinalIgnoreCase).ToArray <string>(); proxyDestination2 = new ProxyDestination(Server.E2007MinVersion, 443, array2, array2); } else if (proxyDestination != null) { proxyDestination2 = proxyDestination; } if (proxyDestination2 != null) { foreach (Server server4 in from s in source where s.IsExchange2007OrLater && !s.IsE14OrLater && s.IsMailboxServer select s) { CoexistenceRpcHttpProxyRules.AddTwoMapsOfDestinations(dictionary, server4, proxyDestination2); } } } string text = WebConfigurationManager.AppSettings["OverrideProxyingRules"]; if (!string.IsNullOrEmpty(text)) { CoexistenceRpcHttpProxyRules.ApplyManualOverrides(dictionary, text); } this.proxyDestinations = dictionary; } if (this.refreshTimer != null) { this.refreshTimer.Change((int)CoexistenceRpcHttpProxyRules.TopologyRefreshInterval.TotalMilliseconds, -1); return; } this.refreshTimer = new Timer(new TimerCallback(this.RefreshServerList), null, (int)CoexistenceRpcHttpProxyRules.TopologyRefreshInterval.TotalMilliseconds, -1); }