Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="part"></param>
        private void UpdatePartConent(System.IO.StreamReader reader, ref Part part)
        {
            part.Content = new PartContent();
            string line = ReadLine(reader, ref part);

            part.Content.Location = PartContent.GetContentValue(line);
            if (!string.IsNullOrEmpty(line))
            {
                if (line.EndsWith(MhtHtml) && !line.EndsWith(MhtHeaderFile))
                {
                    part.Type = PartType.MhtHtml;
                }
                else if (line.EndsWith(MhtImage))
                {
                    part.Type = PartType.MhtImage;
                }
                else if (line.EndsWith(MhtFileList))
                {
                    part.Type = PartType.MhtFileList;
                }
            }

            line = ReadLine(reader, ref part);
            part.Content.TransferEncoding = PartContent.GetContentValue(line);

            line = ReadLine(reader, ref part);
            part.Content.Type = PartContent.GetContentValue(line);
        }
Example #2
0
 public Part()
 {
     Index   = 0;
     Lines   = new List <string>();
     Content = new PartContent();
     Type    = PartType.None;
 }