Click or drag to resize

ImmutableDictionaryTKey, TValue Class

A dictionary that can be modified until IsReadOnly is set to true. Once this occurs, the dictionary itself can no longer be modified. Remember, this does not cause objects contained in this class to be Immutable unless they implement IImmutableObject.
Inheritance Hierarchy
SystemObject
  GSF.ImmutableImmutableObjectBaseImmutableDictionaryTKey, TValue
    GSF.ImmutableImmutableDictionaryTKey, TValue

Namespace: GSF.Immutable
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public sealed class ImmutableDictionary<TKey, TValue> : ImmutableObjectBase<ImmutableDictionary<TKey, TValue>>, 
	IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, 
	IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
View Source

Type Parameters

TKey
TValue

The ImmutableDictionaryTKey, TValue type exposes the following members.

Constructors
 NameDescription
Public methodImmutableDictionaryTKey, TValue Creates a new ImmutableDictionaryTKey, TValue.
Public methodImmutableDictionaryTKey, TValue(DictionaryTKey, TValue) Creates a new ImmutableDictionaryTKey, TValue.
Public methodImmutableDictionaryTKey, TValue(Int32) Creates a new ImmutableDictionaryTKey, TValue.
Top
Properties
 NameDescription
Public propertyCountGets the number of elements contained in the ICollectionT.
Public propertyIsReadOnly Gets/Sets if this class is immutable and thus read only. Once setting to readonly, the class becomes immutable.
(Inherited from ImmutableObjectBaseT)
Public propertyItemGets or sets the element with the specified key.
Public propertyKeysGets an ICollectionT containing the keys of the IDictionaryTKey, TValue.
Public propertyValuesGets an ICollectionT containing the values in the IDictionaryTKey, TValue.
Top
Methods
 NameDescription
Public methodAddAdds an element with the provided key and value to the IDictionaryTKey, TValue.
Public methodClearRemoves all items from the ICollectionT.
Public methodClone Returns a clone of this class. If the class is marked as readonly, it returns the current instance.
(Inherited from ImmutableObjectBaseT)
Public methodCloneEditable Creates a clone of this class that is editable. A clone is always created, even if this class is already editable.
(Inherited from ImmutableObjectBaseT)
Public methodCloneReadonly Makes a readonly clone of the object. If the class is currently marked as readonly, the current instance is returned.
(Inherited from ImmutableObjectBaseT)
Public methodContainsDetermines whether the ICollectionT contains a specific value.
Public methodContainsKeyDetermines whether the IDictionaryTKey, TValue contains an element with the specified key.
Public methodCopyToCopies the elements of the ICollectionT to an Array, starting at a particular Array index.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodRemove(TKey)Removes the element with the specified key from the IDictionaryTKey, TValue.
Public methodRemove(KeyValuePairTKey, TValue)Removes the first occurrence of a specific object from the ICollectionT.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryGetValueGets the value associated with the specified key.
Top
Extension Methods
 NameDescription
Public Extension MethodAllParallelKeyValuePairTKey, TValue Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
(Defined by CollectionExtensions)
Public Extension MethodDistinctByKeyValuePairTKey, TValue, TKey Returns only the elements whose keys are distinct.
(Defined by CollectionExtensions)
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodMajorityKeyValuePairTKey, TValue Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityKeyValuePairTKey, TValue Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityByKeyValuePairTKey, TValue, TKey Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityByKeyValuePairTKey, TValue, TKey Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMaxKeyValuePairTKey, TValueReturns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxKeyValuePairTKey, TValueReturns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxByKeyValuePairTKey, TValue, TKeySelects the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMedianKeyValuePairTKey, TValue Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMiddleKeyValuePairTKey, TValue Gets the middle item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMinKeyValuePairTKey, TValueReturns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinKeyValuePairTKey, TValueReturns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinByKeyValuePairTKey, TValue, TKeySelects the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinorityKeyValuePairTKey, TValue Returns the minority value in the collection, or default type value if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityKeyValuePairTKey, TValue Returns the minority value in the collection, or defaultValue if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityByKeyValuePairTKey, TValue, TKey Returns the minority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityByKeyValuePairTKey, TValue, TKey Returns the minority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Double values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Decimal values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Single values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToPagedListKeyValuePairTKey, TValue Gets a PagedListT to paginate source enumeration for a given page and specified pageSize.
(Defined by CollectionExtensions)
Top
See Also