Exemple #1
0
        }                                                                       //todo: this is supposed to be an override.

        // Exceptions:
        //   System.InvalidOperationException:
        //     This System.Net.WebHeaderCollection instance does not allow instances of
        //     System.Net.HttpRequestHeader.
        /// <summary>
        /// Gets or sets the specified request header.
        /// </summary>
        /// <param name="header">The request header value.</param>
        /// <returns>A System.String instance containing the specified header value.</returns>
        public string this[HttpRequestHeader header] {
            get
            {
                return(_headers[CSharpHeaderToHtmlHeaderConverter.Convert(header)]);
            }
            set
            {
                _headers[CSharpHeaderToHtmlHeaderConverter.Convert(header)] = value;
            }
        }
Exemple #2
0
 // Exceptions:
 //   System.InvalidOperationException:
 //     This System.Net.WebHeaderCollection instance does not allow instances of
 //     System.Net.HttpResponseHeader.
 /// <summary>
 /// Removes the specified header from the collection.
 /// </summary>
 /// <param name="header">The System.Net.HttpResponseHeader instance to remove from the collection.</param>
 public void Remove(HttpResponseHeader header)
 {
     Remove(CSharpHeaderToHtmlHeaderConverter.Convert(header));
 }
Exemple #3
0
 // Exceptions:
 //   System.ArgumentOutOfRangeException:
 //     The length of value is greater than 65535.
 //
 //   System.InvalidOperationException:
 //     This System.Net.WebHeaderCollection instance does not allow instances of
 //     System.Net.HttpResponseHeader.
 /// <summary>
 /// Inserts the specified header with the specified value into the collection.
 /// </summary>
 /// <param name="header">The header to add to the collection.</param>
 /// <param name="value">The content of the header.</param>
 public void Add(HttpResponseHeader header, string value)
 {
     Add(CSharpHeaderToHtmlHeaderConverter.Convert(header), value);
 }