コード例 #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 = m_pHeaderFields[i];
         if (h.Name.ToLower() == fieldName.ToLower())
         {
             m_pHeaderFields.Remove(h);
             i--;
         }
     }
 }
コード例 #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 = GetFirst(fieldName);

            if (h != null)
            {
                h.Value = value;
            }
            else
            {
                Add(fieldName, value);
            }
        }
コード例 #3
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);
 }
コード例 #4
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);
 }
コード例 #5
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);
 }
コード例 #6
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);
 }
コード例 #7
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));
 }
コード例 #8
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);
 }