Ejemplo n.º 1
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="headerField">Source header field.</param>
        public ParametizedHeaderField(HeaderField headerField)
        {
            m_pHeaderField = headerField;

            m_pParameters = new HeaderFieldParameterCollection(this);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds specified header field to the end of the collection.
 /// </summary>
 /// <param name="headerField">Header field.</param>
 public void Add(HeaderField headerField)
 {
     m_pHeaderFields.Add(headerField);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets header fields with specified name, returns null if specified field doesn't exist.
        /// </summary>
        /// <param name="fieldName">Header field name.</param>
        /// <returns></returns>
        public HeaderField[] Get(string fieldName)
        {
            ArrayList fields = new ArrayList();
            foreach(HeaderField h in m_pHeaderFields){
                if(h.Name.ToLower() == fieldName.ToLower()){
                    fields.Add(h);
                }
            }

            if(fields.Count > 0){
                HeaderField[] retVal = new HeaderField[fields.Count];
                fields.CopyTo(retVal);

                return retVal;
            }
            else{
                return null;
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Removes specified header field from the collection.
 /// </summary>
 /// <param name="field">Header field to remove.</param>
 public void Remove(HeaderField field)
 {
     m_pHeaderFields.Remove(field);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets if collection contains specified header field.
 /// </summary>
 /// <param name="headerField">Header field.</param>
 /// <returns></returns>
 public bool Contains(HeaderField headerField)
 {
     return m_pHeaderFields.Contains(headerField);
 }