/// <summary> /// Gets mime entities, including nested entries. /// </summary> /// <param name="entities"></param> /// <param name="allEntries"></param> private void GetEntities(MimeEntityCollection entities, List <MimeEntity> allEntries) { if (entities != null) { foreach (MimeEntity ent in entities) { allEntries.Add(ent); // Add child entities, if any if (ent.ChildEntities.Count > 0) { GetEntities(ent.ChildEntities, allEntries); } } } }
/// <summary> /// Gets mime entities, including nested entries. /// </summary> /// <param name="entities"></param> /// <param name="allEntries"></param> private void GetEntities(MimeEntityCollection entities,List<MimeEntity> allEntries) { if(entities != null){ foreach(MimeEntity ent in entities){ allEntries.Add(ent); // Add child entities, if any if(ent.ChildEntities.Count > 0){ GetEntities(ent.ChildEntities,allEntries); } } } }
/// <summary> /// Default constructor. /// </summary> public MimeEntity() { m_pHeader = new HeaderFieldCollection(); m_pChildEntities = new MimeEntityCollection(this); m_pHeaderFieldCache = new Hashtable(); }
private static string ConstructParts(MimeEntityCollection entries,bool bodystructure) { string str = ""; foreach(MimeEntity ent in entries){ // multipart if(ent.ChildEntities.Count > 0){ str += ConstructMultiPart(ent,bodystructure); } // non-multipart else{ str += ConstructSinglePart(ent,bodystructure); } } return str; }