RouteValueDictionary Class¶
An System.Collections.Generic.IDictionary`2
type for route values.
- Namespace
Microsoft.AspNetCore.Routing
- Assemblies
- Microsoft.AspNetCore.Routing.Abstractions
Syntax¶
public class RouteValueDictionary : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
-
class
Microsoft.AspNetCore.Routing.
RouteValueDictionary
Constructors¶
-
RouteValueDictionary
()¶ Creates an empty
Microsoft.AspNetCore.Routing.RouteValueDictionary
.public RouteValueDictionary()
-
RouteValueDictionary
(System.Object) Creates a
Microsoft.AspNetCore.Routing.RouteValueDictionary
initialized with the specified <em>values</em>.Arguments: values (System.Object) – An object to initialize the dictionary. The value can be of type System.Collections.Generic.IDictionary`2
orSystem.Collections.Generic.IReadOnlyDictionary`2
or an object with public properties as key-value pairs.public RouteValueDictionary(object values)
-
Methods¶
-
Add
(System.String, System.Object)¶ public void Add(string key, object value)
-
Clear
()¶ public void Clear()
-
ContainsKey
(System.String)¶ Return type: System.Boolean public bool ContainsKey(string key)
-
GetEnumerator
()¶ Return type: Microsoft.AspNetCore.Routing.RouteValueDictionary.Enumerator public RouteValueDictionary.Enumerator GetEnumerator()
-
Remove
(System.String)¶ Return type: System.Boolean public bool Remove(string key)
-
Add
(System.Collections.Generic.KeyValuePair<System.String, System.Object>) void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
-
Contains
(System.Collections.Generic.KeyValuePair<System.String, System.Object>)¶ Return type: System.Boolean bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
-
CopyTo
(System.Collections.Generic.KeyValuePair<System.String, System.Object>[], System.Int32)¶ void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
-
Remove
(System.Collections.Generic.KeyValuePair<System.String, System.Object>) Return type: System.Boolean bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
-
GetEnumerator
() Return type: System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String>> IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
-
GetEnumerator
() Return type: System.Collections.IEnumerator IEnumerator IEnumerable.GetEnumerator()
-
TryGetValue
(System.String, out System.Object)¶ Return type: System.Boolean public bool TryGetValue(string key, out object value)
-
Properties¶
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Comparer
¶ Gets the comparer for this dictionary.
Return type: System.Collections.Generic.IEqualityComparer<System.String> public IEqualityComparer<string> Comparer { get; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Count
¶ Return type: System.Int32 public int Count { get; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Item[System.String]
¶ Return type: System.Object public object this[string key] { get; set; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Keys
¶ Return type: System.Collections.Generic.ICollection<System.String> public ICollection<string> Keys { get; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
IsReadOnly
¶ Return type: System.Boolean bool ICollection<KeyValuePair<string, object>>.IsReadOnly { get; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Keys
Return type: System.Collections.Generic.IEnumerable<System.String> IEnumerable<string> IReadOnlyDictionary<string, object>.Keys { get; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Values
¶ Return type: System.Collections.Generic.IEnumerable<System.Object> IEnumerable<object> IReadOnlyDictionary<string, object>.Values { get; }
-
Microsoft.AspNetCore.Routing.RouteValueDictionary.
Values
Return type: System.Collections.Generic.ICollection<System.Object> public ICollection<object> Values { get; }
-