Exemple #1
0
        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);
                }
            }
        }
        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);
                }
            }
        }