private void UpdateContactsRemoved(DistributionListMember member) { if (member.IsDistributionList() != true) { StoreParticipantOrigin storeParticipantOrigin = member.Participant.Origin as StoreParticipantOrigin; if (storeParticipantOrigin != null) { if (this.contactsRemoved == null) { this.contactsRemoved = new List <StoreObjectId>(); } this.contactsRemoved.Add(storeParticipantOrigin.OriginItemId); } } }
internal static StoreParticipantEntryId TryFromParticipant(Participant participant, ParticipantEntryIdConsumer consumer) { if ((consumer & ParticipantEntryIdConsumer.SupportsStoreParticipantEntryId) != ParticipantEntryIdConsumer.SupportsNone || (participant.RoutingType == "MAPIPDL" && (consumer & ParticipantEntryIdConsumer.SupportsStoreParticipantEntryIdForPDLs) != ParticipantEntryIdConsumer.SupportsNone)) { StoreParticipantOrigin storeParticipantOrigin = participant.Origin as StoreParticipantOrigin; if (storeParticipantOrigin != null) { return(new StoreParticipantEntryId(storeParticipantOrigin.OriginItemId, participant.RoutingType == "MAPIPDL", storeParticipantOrigin.EmailAddressIndex, (consumer & ParticipantEntryIdConsumer.SupportsWindowsAddressBookEnvelope) != ParticipantEntryIdConsumer.SupportsNone)); } if (participant.RoutingType == "MAPIPDL") { ExTraceGlobals.StorageTracer.TraceDebug <Participant>((long)participant.GetHashCode(), "Cannot create an entry id: ContactDL should have StoreParticipantOrigin: {0}", participant); } } return(null); }
private IList <StoreObjectId> FindContacts() { List <StoreObjectId> list = new List <StoreObjectId>(); foreach (DistributionListMember distributionListMember in this) { if (!(distributionListMember.Participant == null) && distributionListMember.IsDistributionList() != true) { StoreParticipantOrigin storeParticipantOrigin = distributionListMember.Participant.Origin as StoreParticipantOrigin; if (storeParticipantOrigin != null) { list.Add(storeParticipantOrigin.OriginItemId); } } } return(list); }