示例#1
0
        /// <summary>
        ///     Writes all <see cref="Property">properties</see> either as a <see cref="CFStream"/> or as a collection in
        ///     a <see cref="PropertyTags.PropertiesStreamName"/> stream, this depends on the <see cref="PropertyType"/>
        /// </summary>
        /// <remarks>
        ///     See the <see cref="Properties"/> class it's <see cref="Properties.WriteProperties"/> method for the logic
        ///     that is used to determine this
        /// </remarks>
        /// <param name="propertiesStream">The <see cref="TopLevelProperties"/></param>
        internal void WriteProperties(TopLevelProperties propertiesStream)
        {
            propertiesStream.AddProperty(PropertyTags.PR_RCVD_REPRESENTING_EMAIL_ADDRESS_W, Email);
            propertiesStream.AddProperty(PropertyTags.PR_RCVD_REPRESENTING_NAME_W, DisplayName);
            propertiesStream.AddProperty(PropertyTags.PR_RcvdRepresentingSimpleDispName_W, DisplayName);
            propertiesStream.AddProperty(PropertyTags.PR_RCVD_REPRESENTING_ADDRTYPE_W, AddressTypeString);

            var entryId = new OneOffEntryId(Email,
                                            DisplayName,
                                            AddressType,
                                            MessageFormat.TextAndHtml,
                                            false);

            propertiesStream.AddProperty(PropertyTags.PR_RCVD_REPRESENTING_ENTRYID, entryId.ToByteArray());
        }
示例#2
0
        /// <summary>
        ///     Writes all <see cref="Property">properties</see> either as a <see cref="CFStream"/> or as a collection in
        ///     a <see cref="PropertyTags.PropertiesStreamName"/> stream, this depends on the <see cref="PropertyType"/>
        /// </summary>
        /// <remarks>
        ///     See the <see cref="Properties"/> class it's <see cref="Properties.WriteProperties"/> method for the logic
        ///     that is used to determine this
        /// </remarks>
        /// <param name="propertiesStream">The <see cref="TopLevelProperties"/></param>
        internal void WriteProperties(TopLevelProperties propertiesStream)
        {
            if (_senderIsCreator)
            {
                propertiesStream.AddProperty(PropertyTags.PR_CreatorEmailAddr_W, Email);
                propertiesStream.AddProperty(PropertyTags.PR_CreatorSimpleDispName_W, DisplayName);
                propertiesStream.AddProperty(PropertyTags.PR_CreatorAddrType_W, AddressTypeString);
            }

            var senderEntryId = new OneOffEntryId(Email,
                                                  DisplayName,
                                                  AddressType,
                                                  _messageFormat,
                                                  _canLookupEmailAddress);

            propertiesStream.AddProperty(PropertyTags.PR_SENDER_ENTRYID, senderEntryId.ToByteArray());

            propertiesStream.AddProperty(PropertyTags.PR_SENDER_EMAIL_ADDRESS_W, Email);
            propertiesStream.AddProperty(PropertyTags.PR_SENDER_NAME_W, DisplayName);
            propertiesStream.AddProperty(PropertyTags.PR_SENDER_ADDRTYPE_W, AddressTypeString);
        }