using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.AspNet.Abstractions
{
///
/// Represents request and response headers
///
public interface IHeaderDictionary : IReadableStringCollection, IDictionary
{
///
/// Get or sets the associated value from the collection as a single string.
///
/// The header name.
/// the associated value from the collection as a single string or null if the key is not present.
new string this[string key] { get; set; }
///
/// Get the associated values from the collection separated into individual values.
/// Quoted values will not be split, and the quotes will be removed.
///
/// The header name.
/// the associated values from the collection separated into individual values, or null if the key is not present.
IList GetCommaSeparatedValues(string key);
///
/// Add a new value. Appends to the header if already present
///
/// The header name.
/// The header value.
void Append(string key, string value);
///
/// Add new values. Each item remains a separate array entry.
///
/// The header name.
/// The header values.
void AppendValues(string key, params string[] values);
///
/// Quotes any values containing comas, and then coma joins all of the values with any existing values.
///
/// The header name.
/// The header values.
void AppendCommaSeparatedValues(string key, params string[] values);
///
/// Sets a specific header value.
///
/// The header name.
/// The header value.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Set", Justification = "Re-evaluate later.")]
void Set(string key, string value);
///
/// Sets the specified header values without modification.
///
/// The header name.
/// The header values.
void SetValues(string key, params string[] values);
///
/// Quotes any values containing comas, and then coma joins all of the values.
///
/// The header name.
/// The header values.
void SetCommaSeparatedValues(string key, params string[] values);
}
}