internal static List <BlobRecipient> MergeRecipientLists(RecipientCollection recipients, List <BlobRecipient> blobRecipientList) { List <BlobRecipient> list = new List <BlobRecipient>(); foreach (Recipient recipient in recipients) { list.Add(new BlobRecipient(recipient)); } foreach (BlobRecipient item in blobRecipientList) { list.Add(item); } return(list); }
private void CopyRecipientData(Item item) { RecipientCollection recipientCollection = null; CoreRecipientCollection recipientCollection2 = item.CoreItem.GetRecipientCollection(true); if (recipientCollection2 != null) { recipientCollection = new RecipientCollection(recipientCollection2); } foreach (Recipient recipient in recipientCollection) { ConversionRecipientEntry conversionRecipientEntry = new ConversionRecipientEntry(recipient.Participant, recipient.RecipientItemType); foreach (PropertyDefinition propertyDefinition in recipient.CoreRecipient.PropertyBag.AllFoundProperties) { StorePropertyDefinition property = (StorePropertyDefinition)propertyDefinition; object obj = recipient.TryGetProperty(property); if (!(obj is PropertyError)) { conversionRecipientEntry.SetProperty(property, obj, false); } } base.AddRecipient(conversionRecipientEntry); } }
internal void CopyRecipientsFrom(RecipientCollection recipientCollection) { base.CoreItem.Recipients.CopyRecipientsFrom(recipientCollection.CoreItem.Recipients); }
public static int GetSMTPAddressesForParticipantsIfNecessary(Participant[] participants, RecipientCollection collection) { int num = 0; Participant.Job job = new Participant.Job(participants.Length); bool flag = false; foreach (Participant participant in participants) { Participant participant2 = (participant.RoutingType == "EX") ? participant : null; if (participant2 != null) { flag = true; num++; } job.Add(new Participant.JobItem(participant2)); } if (!flag) { return(num); } StoreSession session = collection.CoreItem.Session; ADSessionSettings adsessionSettings = Participant.BatchBuilder.GetADSessionSettings(session); Participant.BatchBuilder.Execute(job, new Participant.BatchBuilder[] { Participant.BatchBuilder.RequestAllProperties(), Participant.BatchBuilder.CopyPropertiesFromInput(), Participant.BatchBuilder.GetPropertiesFromAD(null, adsessionSettings, new PropertyDefinition[] { ParticipantSchema.SmtpAddress }) }); for (int j = 0; j < participants.Length; j++) { if (job[j].Result != null && job[j].Error == null) { Participant participant3 = job[j].Result.ToParticipant(); if (participant3.ValidationStatus == ParticipantValidationStatus.NoError) { participants[j] = participant3; } } } return(num); }