protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { base.InternalSetValue(propertyBag, value); Participant participant = (Participant)value; ParticipantEntryId participantEntryId = ParticipantEntryId.FromParticipant(participant, ParticipantEntryIdConsumer.RecipientTablePrimary); if (participantEntryId != null) { propertyBag.SetValueWithFixup(InternalSchema.EntryId, participantEntryId.ToByteArray()); } else { propertyBag.Delete(InternalSchema.EntryId); } RecipientDisplayType? valueAsNullable = participant.GetValueAsNullable <RecipientDisplayType>(ParticipantSchema.DisplayTypeEx); LegacyRecipientDisplayType?valueAsNullable2 = participant.GetValueAsNullable <LegacyRecipientDisplayType>(ParticipantSchema.DisplayType); if (participant.RoutingType != null) { propertyBag.Update(InternalSchema.TransmitableDisplayName, participant.DisplayName); if (valueAsNullable2 == null) { valueAsNullable2 = new LegacyRecipientDisplayType?(LegacyRecipientDisplayType.MailUser); } } else { propertyBag.Delete(InternalSchema.TransmitableDisplayName); } AtomicStorePropertyDefinition displayTypeExInternal = InternalSchema.DisplayTypeExInternal; RecipientDisplayType? recipientDisplayType = valueAsNullable; propertyBag.Update(displayTypeExInternal, (recipientDisplayType != null) ? new int?((int)recipientDisplayType.GetValueOrDefault()) : null); AtomicStorePropertyDefinition displayType = InternalSchema.DisplayType; LegacyRecipientDisplayType? legacyRecipientDisplayType = valueAsNullable2; propertyBag.Update(displayType, (legacyRecipientDisplayType != null) ? new int?((int)legacyRecipientDisplayType.GetValueOrDefault()) : null); if (valueAsNullable2 != null) { if (valueAsNullable2 == LegacyRecipientDisplayType.DistributionList || valueAsNullable2 == LegacyRecipientDisplayType.PersonalDistributionList) { propertyBag.SetValueWithFixup(InternalSchema.ObjectType, 8); } else { propertyBag.SetValueWithFixup(InternalSchema.ObjectType, 6); } } else { propertyBag.Delete(InternalSchema.ObjectType); } propertyBag.SetValueWithFixup(InternalSchema.SendRichInfo, participant.GetValueOrDefault <bool>(ParticipantSchema.SendRichInfo)); propertyBag.Update(InternalSchema.SendInternetEncoding, participant.GetValueAsNullable <int>(ParticipantSchema.SendInternetEncoding)); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { Participant participant = (Participant)value; ParticipantEntryId participantEntryId = ParticipantEntryId.FromParticipant(participant, this.entryIdConsumer); propertyBag.Update(this.displayNamePropDef, participant.DisplayName); propertyBag.Update(this.emailAddressPropDef, participant.EmailAddress); propertyBag.Update(this.routingTypePropDef, participant.RoutingType); propertyBag.Update(this.entryIdPropDef, (participantEntryId != null) ? participantEntryId.ToByteArray() : null); if (this.smtpAddressPropDef != null) { propertyBag.Update(this.smtpAddressPropDef, participant.TryGetProperty(ParticipantSchema.SmtpAddress)); } if (this.sipUriPropDef != null) { propertyBag.Update(this.sipUriPropDef, participant.TryGetProperty(ParticipantSchema.SipUri)); } if (this.sidPropDef != null) { propertyBag.Update(this.sidPropDef, participant.TryGetProperty(ParticipantSchema.ParticipantSID)); } if (this.guidPropDef != null) { propertyBag.Update(this.guidPropDef, participant.TryGetProperty(ParticipantSchema.ParticipantGuid)); } }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { base.InternalSetValue(propertyBag, value); Participant participant = (Participant)value; bool? valueAsNullable = participant.GetValueAsNullable <bool>(ParticipantSchema.SendRichInfo); if (valueAsNullable != null) { propertyBag.Update(InternalSchema.SendRichInfo, valueAsNullable.Value); } }