internal static IEnumerable <TenantInboundConnector> FindInboundConnectorsByOutboundIp(IConfigDataProvider dataProvider, string ipAddress, bool enabledOnly) { if (string.IsNullOrEmpty(ipAddress)) { return(GlobalConfigSession.emptyInboundConnectorArray); } return(GlobalConfigSession.GetInboundConnectors(dataProvider, TenantInboundConnectorSchema.RemoteIPRanges, new string[] { ipAddress }, enabledOnly).ToArray <TenantInboundConnector>()); }
internal static IEnumerable <TenantInboundConnector> FindInboundConnectorsByCertificate(IConfigDataProvider dataProvider, IEnumerable <string> certificateFqdns, bool enabledOnly) { if (certificateFqdns == null || !certificateFqdns.Any <string>()) { return(GlobalConfigSession.emptyInboundConnectorArray); } HashSet <string> hashSet = null; try { hashSet = GlobalConfigSession.GetSearchableCertificates(certificateFqdns); } catch (Exception ex) { if (RetryHelper.IsSystemFatal(ex)) { throw; } } return(GlobalConfigSession.GetInboundConnectors(dataProvider, TenantInboundConnectorSchema.TlsSenderCertificateName, (hashSet != null && hashSet.Any <string>()) ? hashSet : certificateFqdns, enabledOnly).ToArray <TenantInboundConnector>()); }