/// <summary> /// Copies header fields parameters to new array. /// </summary> /// <returns>Returns header fields parameters array.</returns> public MIME_h_Parameter[] ToArray() { MIME_h_Parameter[] retVal = new MIME_h_Parameter[m_pParameters.Count]; m_pParameters.Values.CopyTo(retVal, 0); return(retVal); }
/// <summary> /// Gets or sets specified header field parameter value. Value null means not specified. /// </summary> /// <param name="name">Header field name.</param> /// <returns>Returns specified header field value or null if specified parameter doesn't exist.</returns> /// <exception cref="ArgumentNullException">Is raised when <b>name</b> is null reference.</exception> public string this[string name] { get { if (name == null) { throw new ArgumentNullException("name"); } MIME_h_Parameter retVal = null; if (m_pParameters.TryGetValue(name, out retVal)) { return(retVal.Value); } else { return(null); } } set { if (name == null) { throw new ArgumentNullException("name"); } MIME_h_Parameter retVal = null; if (m_pParameters.TryGetValue(name, out retVal)) { retVal.Value = value; } else { m_pParameters.Add(name, new MIME_h_Parameter(name, value)); } } }
/// <summary> /// Copies header fields parameters to new array. /// </summary> /// <returns>Returns header fields parameters array.</returns> public MIME_h_Parameter[] ToArray() { MIME_h_Parameter[] retVal = new MIME_h_Parameter[m_pParameters.Count]; m_pParameters.Values.CopyTo(retVal,0); return retVal; }