/// <summary>Formats an array of header elements.</summary> /// <remarks>Formats an array of header elements.</remarks> /// <param name="elems">the header elements to format</param> /// <param name="quote"> /// <code>true</code> to always format with quoted values, /// <code>false</code> to use quotes only when necessary /// </param> /// <param name="formatter"> /// the formatter to use, or <code>null</code> /// for the /// <see cref="Instance">default</see> /// </param> /// <returns>the formatted header elements</returns> public static string FormatElements(HeaderElement[] elems, bool quote, HeaderValueFormatter formatter) { return((formatter != null ? formatter : Org.Apache.Http.Message.BasicHeaderValueFormatter .Instance).FormatElements(null, elems, quote).ToString()); }
/// <summary>Formats a name-value pair.</summary> /// <remarks>Formats a name-value pair.</remarks> /// <param name="nvp">the name-value pair to format</param> /// <param name="quote"> /// <code>true</code> to always format with a quoted value, /// <code>false</code> to use quotes only when necessary /// </param> /// <param name="formatter"> /// the formatter to use, or <code>null</code> /// for the /// <see cref="Instance">default</see> /// </param> /// <returns>the formatted name-value pair</returns> public static string FormatNameValuePair(NameValuePair nvp, bool quote, HeaderValueFormatter formatter) { return((formatter != null ? formatter : Org.Apache.Http.Message.BasicHeaderValueFormatter .Instance).FormatNameValuePair(null, nvp, quote).ToString()); }