示例#1
0
 /// <summary>
 /// Removes the specified request <paramref name="header"/> from the collection.
 /// </summary>
 /// <param name="header">
 /// One of theHttpRequestHeader enum values, represents
 /// the request header to remove.
 /// </param>
 /// <exception cref="ArgumentException">
 /// <paramref name="header"/> is a restricted header.
 /// </exception>
 /// <exception cref="InvalidOperationException">
 /// The current <see cref="WebHeaderCollection"/> instance doesn't allow
 /// the request <paramref name="header"/>.
 /// </exception>
 public void Remove(System.Net.HttpRequestHeader header)
 {
     DoWithCheckingState(RemoveWithoutCheckingName, Convert(header), null, false, false);
 }
 public void Set(System.Net.HttpRequestHeader header, string?value)
 {
 }
示例#3
0
 /// <summary>
 /// Adds the specified request <paramref name="header"/> with
 /// the specified <paramref name="value"/> to the collection.
 /// </summary>
 /// <param name="header">
 /// One of theHttpRequestHeader enum values, represents
 /// the request header to add.
 /// </param>
 /// <param name="value">
 /// A <see cref="string"/> that represents the value of the header to add.
 /// </param>
 /// <exception cref="ArgumentException">
 ///   <para>
 ///   <paramref name="header"/> is a restricted header.
 ///   </para>
 ///   <para>
 ///   -or-
 ///   </para>
 ///   <para>
 ///   <paramref name="value"/> contains invalid characters.
 ///   </para>
 /// </exception>
 /// <exception cref="ArgumentOutOfRangeException">
 /// The length of <paramref name="value"/> is greater than 65,535 characters.
 /// </exception>
 /// <exception cref="InvalidOperationException">
 /// The current <see cref="WebHeaderCollection"/> instance doesn't allow
 /// the request <paramref name="header"/>.
 /// </exception>
 public void Add(System.Net.HttpRequestHeader header, string value)
 {
     DoWithCheckingState(AddWithoutCheckingName, Convert(header), value, false, true);
 }
 public string?this[System.Net.HttpRequestHeader header] {
     get { throw null; } set { }
 }
 public void Remove(System.Net.HttpRequestHeader header)
 {
 }
示例#6
0
 internal static string Convert(System.Net.HttpRequestHeader header)
 {
     return(convert(header.ToString()));
 }
示例#7
0
        /// <summary>
        /// Gets or sets the specified request <paramref name="header"/> in the collection.
        /// </summary>
        /// <value>
        /// A <see cref="string"/> that represents the value of the request <paramref name="header"/>.
        /// </value>
        /// <param name="header">
        /// One of the HttpRequestHeader enum values, represents
        /// the request header to get or set.
        /// </param>
        /// <exception cref="ArgumentException">
        ///   <para>
        ///   <paramref name="header"/> is a restricted header.
        ///   </para>
        ///   <para>
        ///   -or-
        ///   </para>
        ///   <para>
        ///   <paramref name="value"/> contains invalid characters.
        ///   </para>
        /// </exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// The length of <paramref name="value"/> is greater than 65,535 characters.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// The current <see cref="WebHeaderCollection"/> instance doesn't allow
        /// the request <paramref name="header"/>.
        /// </exception>
        public string this[System.Net.HttpRequestHeader header]
        {
            get { return(Get(Convert(header))); }

            set { Add(header, value); }
        }
示例#8
0
 public void Add(System.Net.HttpRequestHeader header, string value)
 {
 }
 public string this[System.Net.HttpRequestHeader header] {
     get { return(default(string)); } set { }
 }
 public string this[System.Net.HttpRequestHeader header] {
     get => throw null; set => throw null;