public static IEnumerable <string> BucketizeConnector(TenantInboundConnector connector) { if (connector == null) { throw new ArgumentNullException("connector"); } if (connector.SenderIPAddresses != null) { foreach (string ipKey in TenantInboundConnectorBucket.FindAllVariationsOfKeysBasedOnSenderIPAddresses(connector.SenderIPAddresses)) { yield return(ipKey); } } if (connector.TlsSenderCertificateName != null) { SmtpDomainWithSubdomains domain = connector.TlsSenderCertificateName.TlsCertificateName as SmtpDomainWithSubdomains; if (domain != null) { yield return(domain.Address); } else { yield return(connector.TlsSenderCertificateName.ToString()); } } yield break; }
internal void RemoveEntriesFromBucket(IEnumerable <TenantInboundConnector> entriesToRemove) { foreach (TenantInboundConnector connector in entriesToRemove) { string primaryKeyForTenantInboundConnector = TenantInboundConnectorBucket.GetPrimaryKeyForTenantInboundConnector(connector); this.TenantInboundConnectors.Remove(primaryKeyForTenantInboundConnector); this.UpdateWhenChanged(connector); } }
internal void AddEntriesToBucket(IEnumerable <TenantInboundConnector> entriesToAdd) { foreach (TenantInboundConnector tenantInboundConnector in entriesToAdd) { string primaryKeyForTenantInboundConnector = TenantInboundConnectorBucket.GetPrimaryKeyForTenantInboundConnector(tenantInboundConnector); this.TenantInboundConnectors[primaryKeyForTenantInboundConnector] = tenantInboundConnector; this.UpdateWhenChanged(tenantInboundConnector); } }