IStringKeyedReadOnlyDictionaryTValue Interface

Represents an IReadOnlyDictionaryTKey, 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.1.0
C#
public interface IStringKeyedReadOnlyDictionary<TValue> : IReadOnlyDictionary<string, TValue>, 
	IEnumerable<KeyValuePair<string, TValue>>, IEnumerable, IReadOnlyCollection<KeyValuePair<string, TValue>>
Implements
IEnumerableKeyValuePairString, TValue, IReadOnlyCollectionKeyValuePairString, TValue, IReadOnlyDictionaryString, TValue, IEnumerable

Type Parameters

TValue
The type of the value.

Remarks

  Note

This type is not available in .NET 4.0 and lover versions.

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

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