private void UpdateParticipantsOnCalendarItem(CalendarItemBase calendarItem, bool isReadOnlyItem) { this.CheckDisposed("ProcessParticipants"); base.LocationIdentifierHelperInstance.SetLocationIdentifier(62325U, LastChangeAction.ProcessParticipants); IAttendeeCollection attendeeCollection = calendarItem.AttendeeCollection; calendarItem.LocationIdentifierHelperInstance.SetLocationIdentifier(37749U); attendeeCollection.Clear(); bool flag = false; if (base.From != null) { calendarItem.LocationIdentifierHelperInstance.SetLocationIdentifier(54133U); attendeeCollection.Add(base.From, AttendeeType.Required, null, null, false).RecipientFlags = (RecipientFlags.Sendable | RecipientFlags.Organizer); flag = true; } List <BlobRecipient> list = this.GetUnsendableRecipients(); if (!isReadOnlyItem) { this.SetUnsendableRecipients(list); } list = MeetingRequest.MergeRecipientLists(base.Recipients, list); Participant participant = null; if (base.IsDelegated()) { participant = (Participant)base.TryGetProperty(InternalSchema.ReceivedBy); } foreach (BlobRecipient blobRecipient in list) { RecipientFlags valueOrDefault = blobRecipient.GetValueOrDefault <RecipientFlags>(InternalSchema.RecipientFlags); bool flag2 = (valueOrDefault & RecipientFlags.Organizer) == RecipientFlags.Organizer; if (flag2) { if (flag) { continue; } flag = true; } if (!blobRecipient.Participant.AreAddressesEqual(base.From)) { RecipientItemType type = MapiUtil.MapiRecipientTypeToRecipientItemType(blobRecipient.GetValueOrDefault <RecipientType>(InternalSchema.RecipientType, RecipientType.To)); AttendeeType attendeeType = Attendee.RecipientItemTypeToAttendeeType(type); Participant participant2 = blobRecipient.Participant; if (participant != null && Participant.HasSameEmail(participant2, participant, base.MailboxSession, true)) { calendarItem.LocationIdentifierHelperInstance.SetLocationIdentifier(41845U); attendeeCollection.Add(base.ReceivedRepresenting, attendeeType, null, null, false); participant = null; } else { calendarItem.LocationIdentifierHelperInstance.SetLocationIdentifier(58229U); attendeeCollection.Add(participant2, attendeeType, null, null, false); } } } }
private void WriteRecipient(ConversionRecipientEntry recipient) { if (recipient.Participant == null) { return; } RecipientItemType recipientItemType = recipient.RecipientItemType; if (!ConvertUtils.IsRecipientTransmittable(recipientItemType) && this.tnefType != TnefType.SummaryTnef) { return; } this.tnefWriter.StartRow(); this.tnefWriter.WriteProperty(TnefPropertyTag.RecipientType, (int)MapiUtil.RecipientItemTypeToMapiRecipientType(recipientItemType, false)); Participant participant = recipient.Participant; this.tnefWriter.WriteProperty(TnefPropertyTag.DisplayNameW, participant.DisplayName ?? string.Empty); this.tnefWriter.WriteProperty(TnefPropertyTag.EmailAddressW, participant.EmailAddress ?? string.Empty); this.tnefWriter.WriteProperty(TnefPropertyTag.AddrtypeW, participant.RoutingType ?? string.Empty); foreach (NativeStorePropertyDefinition nativeStorePropertyDefinition in recipient.AllNativeProperties) { if (nativeStorePropertyDefinition != null && nativeStorePropertyDefinition != InternalSchema.RecipientType && nativeStorePropertyDefinition != InternalSchema.DisplayName && nativeStorePropertyDefinition != InternalSchema.EmailAddress && nativeStorePropertyDefinition != InternalSchema.AddrType && this.propertyChecker.IsRecipientPropertyWritable(nativeStorePropertyDefinition)) { this.WriteRecipientProperty(recipient, nativeStorePropertyDefinition); } } }
internal void SetProperty(StorePropertyDefinition property, object value, bool resetOldValue) { if (property.Equals(InternalSchema.RowId)) { return; } if (property.Equals(InternalSchema.RecipientType)) { this.recipientItemType = MapiUtil.MapiRecipientTypeToRecipientItemType((RecipientType)((int)value)); return; } if (resetOldValue || !this.IsPropertySetOrDeleted(property)) { this.propertyValues[property] = value; } this.cachedParticipant = null; }
private void WriteRecipient(ConversionRecipientEntry recipient, int recipientIndex) { if (recipient.Participant == null) { return; } this.PropertyWriter.StartRecipient(); this.writer.WriteProperty(TnefPropertyTag.Rowid, recipientIndex); RecipientItemType recipientItemType = recipient.RecipientItemType; this.writer.WriteProperty(TnefPropertyTag.RecipientType, (int)MapiUtil.RecipientItemTypeToMapiRecipientType(recipientItemType, false)); foreach (NativeStorePropertyDefinition nativeStorePropertyDefinition in recipient.AllNativeProperties) { if (nativeStorePropertyDefinition != null && !OutboundMsgConverter.recipientExcludedPropertySet.Contains(nativeStorePropertyDefinition)) { this.WriteRecipientProperty(recipient, nativeStorePropertyDefinition); } } }