public string this[System.Net.HttpResponseHeader header] { get { throw null; } set { } }
internal static string Convert(System.Net.HttpResponseHeader header) { return(Convert(header.ToString())); }
/// <summary> /// Adds the specified response <paramref name="header"/> with /// the specified <paramref name="value"/> to the collection. /// </summary> /// <param name="header"> /// One of the <see cref="System.Net.HttpResponseHeader"/> enum values, represents /// the response 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 response <paramref name="header"/>. /// </exception> public void Add(System.Net.HttpResponseHeader header, string value) { DoWithCheckingState(AddWithoutCheckingName, Convert(header), value, true, true); }
/// <summary> /// Removes the specified response <paramref name="header"/> from the collection. /// </summary> /// <param name="header"> /// One of the <see cref="System.Net.HttpResponseHeader"/> enum values, represents /// the response 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 response <paramref name="header"/>. /// </exception> public void Remove(System.Net.HttpResponseHeader header) { DoWithCheckingState(RemoveWithoutCheckingName, Convert(header), null, true, false); }
/// <summary> /// Gets or sets the specified response <paramref name="header"/> in the collection. /// </summary> /// <value> /// A <see cref="string"/> that represents the value of the response <paramref name="header"/>. /// </value> /// <param name="header"> /// One of the HttpResponseHeader enum values, represents /// the response 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 response <paramref name="header"/>. /// </exception> public string this[System.Net.HttpResponseHeader header] { get { return(Get(Convert(header))); } set { Add(header, value); } }
public void Set(System.Net.HttpResponseHeader header, string?value) { }
public void Remove(System.Net.HttpResponseHeader header) { }
public string this[System.Net.HttpResponseHeader header] { get { return(default(string)); } set { } }
public void Add(System.Net.HttpResponseHeader header, string value) { }
public void SetHeader(System.Net.HttpResponseHeader header, string value) => _headers.Add((HttpResponseHeader)header, value);