Beispiel #1
0
 /// <summary>
 /// Removes all header fields with specified name from the collection.
 /// </summary>
 /// <param name="fieldName">Header field name.</param>
 public void RemoveAll(string fieldName)
 {
     for (int i = 0; i < m_pHeaderFields.Count; i++)
     {
         SIP_HeaderField h = (SIP_HeaderField)m_pHeaderFields[i];
         if (h.Name.ToLower() == fieldName.ToLower())
         {
             m_pHeaderFields.Remove(h);
             i--;
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// Sets specified header field value. If header field existst, first found value is set.
        /// If field doesn't exist, it will be added.
        /// </summary>
        /// <param name="fieldName">Header field name.</param>
        /// <param name="value">Header field value.</param>
        public void Set(string fieldName, string value)
        {
            SIP_HeaderField h = this.GetFirst(fieldName);

            if (h != null)
            {
                h.Value = value;
            }
            else
            {
                this.Add(GetheaderField(fieldName, value));
            }
        }
Beispiel #3
0
 /// <summary>
 /// Removes specified header field from the collection.
 /// </summary>
 /// <param name="field">Header field to remove.</param>
 public void Remove(SIP_HeaderField field)
 {
     m_pHeaderFields.Remove(field);
 }
Beispiel #4
0
 /// <summary>
 /// Adds specified header field to the end of the collection.
 /// </summary>
 /// <param name="headerField">Header field.</param>
 public void Add(SIP_HeaderField headerField)
 {
     m_pHeaderFields.Add(headerField);
 }
Beispiel #5
0
 /// <summary>
 /// Gets if collection contains specified header field.
 /// </summary>
 /// <param name="headerField">Header field.</param>
 /// <returns></returns>
 public bool Contains(SIP_HeaderField headerField)
 {
     return(m_pHeaderFields.Contains(headerField));
 }
 /// <summary>
 /// Adds specified heade field to the end of the collection.
 /// </summary>
 /// <param name="headerField">Header field.</param>
 public void Add(SIP_HeaderField headerField)
 {
     m_pHeaderFields.Add(headerField);
 }
 /// <summary>
 /// Removes specified header field from the collection.
 /// </summary>
 /// <param name="field">Header field to remove.</param>
 public void Remove(SIP_HeaderField field)
 {
     m_pHeaderFields.Remove(field);
 }
 /// <summary>
 /// Gets if collection contains specified header field.
 /// </summary>
 /// <param name="headerField">Header field.</param>
 /// <returns></returns>
 public bool Contains(SIP_HeaderField headerField)
 {
     return m_pHeaderFields.Contains(headerField);
 }