Class QueryableDictionaryBase<TKey, TValue>
Base class for queryable dictionaries.
Inheritance
Implements
Namespace: System.Linq
Assembly: Reaqtor.Shared.Core.dll
Syntax
public abstract class QueryableDictionaryBase<TKey, TValue> : Object, IQueryableDictionary<TKey, TValue>, IQueryable<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IQueryable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>
Type Parameters
Name | Description |
---|---|
TKey | Type of the keys in the dictionary. |
TValue | Type of the values in the dictionary. |
Constructors
QueryableDictionaryBase()
Declaration
protected QueryableDictionaryBase()
Properties
Count
Gets the number of entries in the dictionary.
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ElementType
Gets the element type of entires in the dictionary.
Declaration
public virtual Type ElementType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Expression
Gets the expression representing the dictionary.
Declaration
public abstract Expression Expression { get; }
Property Value
Type | Description |
---|---|
System.Linq.Expressions.Expression |
Item[TKey]
Retrieves the dictionary entry with the given key from the dictionary.
Declaration
public virtual TValue this[TKey key] { get; }
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key to look up in the dictionary. |
Property Value
Type | Description |
---|---|
TValue | Value for the specified key, if found. If no entry with the specified key is found, a KeyNotFoundException is thrown. |
Exceptions
Type | Condition |
---|---|
System.Collections.Generic.KeyNotFoundException | Thrown if no entry with the specified key is found. |
Keys
Gets the keys in the dictionary.
Declaration
public IQueryable<TKey> Keys { get; }
Property Value
Type | Description |
---|---|
System.Linq.IQueryable<TKey> |
Provider
Gets the query provider used to build queries over the dictionary.
Declaration
public abstract IQueryProvider Provider { get; }
Property Value
Type | Description |
---|---|
System.Linq.IQueryProvider |
Values
Gets the values in the dictionary.
Declaration
public IQueryable<TValue> Values { get; }
Property Value
Type | Description |
---|---|
System.Linq.IQueryable<TValue> |
Methods
ContainsKey(TKey)
Checks whether the dictionary contains an entry for the given key.
Declaration
public virtual bool ContainsKey(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key to look up in the dictionary. |
Returns
Type | Description |
---|---|
System.Boolean | true if the dictionary contains an entry with the specified key; otherwise, false. |
GetEnumerator()
Gets an enumerator to enumerate over the entries in the dictionary.
Declaration
public abstract IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> | Enumerator to enumerate over the entries in the dictionary. |
TryGetValue(TKey, out TValue)
Tries to obtain the value for the specified key.
Declaration
public virtual bool TryGetValue(TKey key, out TValue value)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key to look up in the dictionary. |
TValue | value | Value for the specified key, if found. |
Returns
Type | Description |
---|---|
System.Boolean | true if an entry is found; otherwise, false. |