Mime entity collection.
Inheritance: IEnumerable
Ejemplo n.º 1
0
        /// <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);
                    }
                }
            }
        }
Ejemplo n.º 2
0
		/// <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);
					}
				}
			}
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Default constructor.
		/// </summary>
		public MimeEntity()
		{
			m_pHeader = new HeaderFieldCollection();
			m_pChildEntities = new MimeEntityCollection(this);
			m_pHeaderFieldCache = new Hashtable();            
		}
Ejemplo n.º 4
0
        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;
        }