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