IStringKeyedDictionaryTValue Interface

Represents an IDictionaryTKey, TValue with string key that can be queried also by StringSegment and ReadOnlySpanT (in .NET Core 2.1/.NET Standard 2.1 and above) instances.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
C#
public interface IStringKeyedDictionary<TValue> : IDictionary<string, TValue>, 
	ICollection<KeyValuePair<string, TValue>>, IEnumerable<KeyValuePair<string, TValue>>, 
	IEnumerable
Implements
ICollectionKeyValuePairString, TValue, IDictionaryString, TValue, IEnumerableKeyValuePairString, TValue, IEnumerable

Type Parameters

TValue
The type of the value.

Properties

ItemReadOnlySpanChar Gets the value associated with the specified key.
ItemStringSegment Gets the value associated with the specified key.

Methods

ContainsKey(ReadOnlySpanChar) Determines whether this instance contains an element with the specified key.
ContainsKey(StringSegment) Determines whether this instance contains an element with the specified key.
GetValueOrDefault(ReadOnlySpanChar) Tries to get the value from the dictionary for the given key.
GetValueOrDefault(String) Tries to get the value from the dictionary for the given key.
GetValueOrDefault(StringSegment) Tries to get the value from the dictionary for the given key.
GetValueOrDefaultTActualValue(ReadOnlySpanChar, TActualValue) Tries to get the typed value from the dictionary for the given key. The defaultValue parameter can have a more specific type than TValue.
GetValueOrDefaultTActualValue(ReadOnlySpanChar, FuncTActualValue) Tries to get the typed value from the dictionary for the given key. The defaultValueFactory can return an instance of a more specific type than TValue.
GetValueOrDefaultTActualValue(String, TActualValue) Tries to get the typed value from the dictionary for the given key. The defaultValue parameter can have a more specific type than TValue.
GetValueOrDefaultTActualValue(String, FuncTActualValue) Tries to get the typed value from the dictionary for the given key. The defaultValueFactory can return an instance of a more specific type than TValue.
GetValueOrDefaultTActualValue(StringSegment, TActualValue) Tries to get the typed value from the dictionary for the given key. The defaultValue parameter can have a more specific type than TValue.
GetValueOrDefaultTActualValue(StringSegment, FuncTActualValue) Tries to get the typed value from the dictionary for the given key. The defaultValueFactory can return an instance of a more specific type than TValue.
TryGetValue(ReadOnlySpanChar, TValue) Tries to get the value associated with the specified key.
TryGetValue(StringSegment, TValue) Tries to get the value associated with the specified key.

Extension Methods

AddRangeKeyValuePairString, TValue Adds a collection to the target ICollectionT.
(Defined by CollectionExtensions)
AsThreadSafeKeyValuePairString, TValue Returns a LockingCollectionT, which provides a thread-safe wrapper for the specified collection. This only means that if the members are accessed through the returned LockingCollectionT, then the inner state of the wrapped collection remains always consistent and not that all of the multi-threading concerns can be ignored.
See the Remarks section of the LockingCollectionT class for details and some examples.
(Defined by CollectionExtensions)
ForEachKeyValuePairString, TValue Similarly to the List<T>.ForEach method, processes an action on each element of an enumerable collection.
(Defined by EnumerableExtensions)
GetRandomElementKeyValuePairString, TValue Gets a random element from the enumerable source using a new FastRandom instance.
(Defined by EnumerableExtensions)
GetRandomElementKeyValuePairString, TValue Gets a random element from the enumerable source using a specified Random instance.
(Defined by EnumerableExtensions)
IndexOf Searches for an element in the source enumeration where the specified predicate returns .
(Defined by EnumerableExtensions)
IndexOf Searches for an element in the source enumeration.
(Defined by EnumerableExtensions)
IndexOfKeyValuePairString, TValue Searches for an element in the source enumeration where the specified predicate returns .
(Defined by EnumerableExtensions)
IndexOfKeyValuePairString, TValue Searches for an element in the source enumeration.
(Defined by EnumerableExtensions)
IsNullOrEmpty Determines whether the specified source is or empty (has no elements).
(Defined by EnumerableExtensions)
IsNullOrEmptyKeyValuePairString, TValue Determines whether the specified source is or empty (has no elements).
(Defined by EnumerableExtensions)
JoinKeyValuePairString, TValue Concatenates the items of the source collection into a new string instance using the specified separator between the items.
(Defined by EnumerableExtensions)
JoinKeyValuePairString, TValue Concatenates the items of the source collection into a new string instance using the specified separator between the items.
(Defined by EnumerableExtensions)
ShuffleKeyValuePairString, TValue Shuffles an enumerable source (randomizes its elements) using a new FastRandom instance.
(Defined by EnumerableExtensions)
ShuffleKeyValuePairString, TValue Shuffles an enumerable source (randomizes its elements) using the provided seed with a new FastRandom instance.
(Defined by EnumerableExtensions)
ShuffleKeyValuePairString, TValue Shuffles an enumerable source (randomizes its elements) using the provided seed with a new FastRandom instance.
(Defined by EnumerableExtensions)
ShuffleKeyValuePairString, TValue Shuffles an enumerable source (randomizes its elements) using a specified Random instance.
(Defined by EnumerableExtensions)
ToCircularListKeyValuePairString, TValue Creates a CircularListT from an IEnumerableT.
(Defined by EnumerableExtensions)
ToStringKeyedDictionaryKeyValuePairString, TValue Creates a StringKeyedDictionaryTValue from an IEnumerableT instance using the specified keySelector delegate and a comparer.
(Defined by EnumerableExtensions)
ToStringKeyedDictionaryKeyValuePairString, TValue, TValue Creates a StringKeyedDictionaryTValue from an IEnumerableT instance using the specified key and value selector delegates and a comparer.
(Defined by EnumerableExtensions)
TryAdd Tries to add the specified item to the collection.
(Defined by EnumerableExtensions)
TryAddKeyValuePairString, TValue Tries to add the specified item to the collection.
(Defined by EnumerableExtensions)
TryAddRange Tries to add the specified collection to the target collection.
(Defined by EnumerableExtensions)
TryAddRangeKeyValuePairString, TValue Tries to add the specified collection to the target collection.
(Defined by EnumerableExtensions)
TryClear Tries to remove all elements from the collection.
(Defined by EnumerableExtensions)
TryClearKeyValuePairString, TValue Tries to remove all elements from the collection.
(Defined by EnumerableExtensions)
TryGetCount Tries to get the number of elements in the source enumeration without enumerating it.
(Defined by EnumerableExtensions)
TryGetCountKeyValuePairString, TValue Tries to get the number of elements in the source enumeration without enumerating it.
(Defined by EnumerableExtensions)
TryGetElementAt Tries to get an item at the specified index in the collection.
(Defined by EnumerableExtensions)
TryGetElementAtKeyValuePairString, TValue Tries to get an item at the specified index in the collection.
(Defined by EnumerableExtensions)
TryInsert Tries to insert the specified item at the specified index to the collection.
(Defined by EnumerableExtensions)
TryInsertKeyValuePairString, TValue Tries to insert the specified item at the specified index to the collection.
(Defined by EnumerableExtensions)
TryInsertRange Tries to insert the specified collection into the target collection.
(Defined by EnumerableExtensions)
TryInsertRangeKeyValuePairString, TValue Tries to insert the specified collection into the target collection.
(Defined by EnumerableExtensions)
TryRemove Tries to remove the specified item from to the collection.
(Defined by EnumerableExtensions)
TryRemoveKeyValuePairString, TValue Tries to remove the specified item from to the collection.
(Defined by EnumerableExtensions)
TryRemoveAt Tries to remove an item at the specified index from the collection.
(Defined by EnumerableExtensions)
TryRemoveAtKeyValuePairString, TValue Tries to remove an item at the specified index from the collection.
(Defined by EnumerableExtensions)
TryRemoveRange Tries to remove count amount of items from the specified collection at the specified index.
(Defined by EnumerableExtensions)
TryRemoveRangeKeyValuePairString, TValue Tries to remove count amount of items from the specified collection at the specified index.
(Defined by EnumerableExtensions)
TryReplaceRange Tries to remove count amount of items from the target at the specified index, and to insert the specified collection at the same position. The number of elements in collection can be different from the amount of removed items.
(Defined by EnumerableExtensions)
TryReplaceRangeKeyValuePairString, TValue Tries to remove count amount of items from the target at the specified index, and to insert the specified collection at the same position. The number of elements in collection can be different from the amount of removed items.
(Defined by EnumerableExtensions)
TrySetElementAt Tries to set the specified item at the specified index in the collection.
(Defined by EnumerableExtensions)
TrySetElementAtKeyValuePairString, TValue Tries to set the specified item at the specified index in the collection.
(Defined by EnumerableExtensions)

See Also