// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNetCore.Http
{
///
/// Represents the HttpRequest query string collection
///
public interface IQueryCollection : IEnumerable>
{
///
/// Gets the number of elements contained in the .
///
///
/// The number of elements contained in the .
///
int Count { get; }
///
/// Gets an containing the keys of the
/// .
///
///
/// An containing the keys of the object
/// that implements .
///
ICollection Keys { get; }
///
/// Determines whether the contains an element
/// with the specified key.
///
///
/// The key to locate in the .
///
///
/// true if the contains an element with
/// the key; otherwise, false.
///
///
/// key is null.
///
bool ContainsKey(string key);
///
/// Gets the value associated with the specified key.
///
///
/// The key of the value to get.
///
///
/// The key of the value to get.
/// When this method returns, the value associated with the specified key, if the
/// key is found; otherwise, the default value for the type of the value parameter.
/// This parameter is passed uninitialized.
///
///
/// true if the object that implements contains
/// an element with the specified key; otherwise, false.
///
///
/// key is null.
///
bool TryGetValue(string key, out StringValues value);
///
/// Gets the value with the specified key.
///
///
/// The key of the value to get.
///
///
/// The element with the specified key, or StringValues.Empty if the key is not present.
///
///
/// key is null.
///
///
/// has a different indexer contract than
/// , as it will return StringValues.Empty for missing entries
/// rather than throwing an Exception.
///
StringValues this[string key] { get; }
}
}