private static Dictionary <string, ADRecipient> FindByParticipantLegacyExchangeDNs(IEnumerator <Participant> recipients, UserContext userContext) { List <string> list = new List <string>(); while (recipients.MoveNext()) { Participant participant = recipients.Current; if (participant.RoutingType == "EX" && !string.IsNullOrEmpty(participant.EmailAddress)) { list.Add(participant.EmailAddress.ToLowerInvariant()); } } return(AdRecipientBatchQuery.FindByLegacyExchangeDNs(list.ToArray(), userContext)); }
public AdRecipientBatchQuery(UserContext userContext, params string[] legacyDNs) { this.legacyExchangeDNToRecipientDictionary = AdRecipientBatchQuery.FindByLegacyExchangeDNs(legacyDNs, userContext); }
public AdRecipientBatchQuery(IEnumerator <Participant> recipients, UserContext userContext) { this.legacyExchangeDNToRecipientDictionary = AdRecipientBatchQuery.FindByParticipantLegacyExchangeDNs(recipients, userContext); }