IQueryCollection Interface¶
Represents the HttpRequest query string collection
- Namespace
Microsoft.AspNetCore.Http
- Assemblies
- Microsoft.AspNetCore.Http.Features
Syntax¶
public interface IQueryCollection : IEnumerable<KeyValuePair<string, StringValues>>, IEnumerable
-
interface
Microsoft.AspNetCore.Http.
IQueryCollection
Methods¶
-
ContainsKey
(System.String)¶ - Determines whether the
Microsoft.AspNetCore.Http.IQueryCollection
contains an element with the specified key.Arguments: key (System.String) – The key to locate in the Microsoft.AspNetCore.Http.IQueryCollection
.Return type: System.Boolean Returns: true if the Microsoft.AspNetCore.Http.IQueryCollection
contains an element with the key; otherwise, false.bool ContainsKey(string key)
-
TryGetValue
(System.String, out Microsoft.Extensions.Primitives.StringValues)¶ - Gets the value associated with the specified key.
Arguments: - key (System.String) – The key of the value to get.
- value (Microsoft.Extensions.Primitives.StringValues) – 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.
Return type: System.Boolean
Returns: - true if the object that implements
Microsoft.AspNetCore.Http.IQueryCollection
contains an element with the specified key; otherwise, false.
bool TryGetValue(string key, out StringValues value)
-
Properties¶
-
Microsoft.AspNetCore.Http.IQueryCollection.
Count
¶ - Gets the number of elements contained in the
Microsoft.AspNetCore.Http.IQueryCollection
.Return type: System.Int32 Returns: The number of elements contained in the Microsoft.AspNetCore.Http.IQueryCollection
.int Count { get; }
-
Microsoft.AspNetCore.Http.IQueryCollection.
Item[System.String]
¶ - Gets the value with the specified key.
Arguments: key (System.String) – The key of the value to get. Return type: Microsoft.Extensions.Primitives.StringValues Returns: The element with the specified key, or <code>StringValues.Empty</code> if the key is not present. StringValues this[string key] { get; }
-
Microsoft.AspNetCore.Http.IQueryCollection.
Keys
¶ - Gets an
System.Collections.Generic.ICollection`1
containing the keys of theMicrosoft.AspNetCore.Http.IQueryCollection
.Return type: System.Collections.Generic.ICollection<System.String> Returns: An System.Collections.Generic.ICollection`1
containing the keys of the object that implementsMicrosoft.AspNetCore.Http.IQueryCollection
.ICollection<string> Keys { get; }
-