Epiforge.Extensions.Collections
2.1.1
dotnet add package Epiforge.Extensions.Collections --version 2.1.1
NuGet\Install-Package Epiforge.Extensions.Collections -Version 2.1.1
<PackageReference Include="Epiforge.Extensions.Collections" Version="2.1.1" />
<PackageVersion Include="Epiforge.Extensions.Collections" Version="2.1.1" />
<PackageReference Include="Epiforge.Extensions.Collections" />
paket add Epiforge.Extensions.Collections --version 2.1.1
#r "nuget: Epiforge.Extensions.Collections, 2.1.1"
#:package Epiforge.Extensions.Collections@2.1.1
#addin nuget:?package=Epiforge.Extensions.Collections&version=2.1.1
#tool nuget:?package=Epiforge.Extensions.Collections&version=2.1.1
This library provides a number of extension methods for collections and dictionaries:
EnumerableExtensions, providing:FindIndex- Finds the index of the first element in the source that satisfies the specified predicateFindLastIndex- Finds the index of the last element in the source that satisfies the specified predicateFindIndicies- Finds the indicies of the elements in the source that satisfy the specified predicateIndexOf- Finds the first index of the specified item in the sourceLastIndexOf- Finds the last index of the specified item in the sourceIndiciesOf- Finds the indicies of the specified item in the source
DictionaryExtensions, providing:GetOrAdd- Adds a key/value pair to the specifiedIDictionaryorIDictionary<TKey, TValue>by using the specified function if the key does not already exist (returns the new value, or the existing value if the key exists)TryRemove- Attempts to remove and return the value that has the specified key from the specifiedIDictionaryorIDictionary<TKey, TValue>
Generic
ReadOnlyDictionary<TKey, TValue>is a read-only wrapper for any classes implementingIReadOnlyDictionary<TKey, TValue>ReadOnlyRangeDictionary<TKey, TValue>is a read-only wrapper for any classes implementingIRangeDictionary<TKey, TValue>ReadOnlyConcurrentDictionary<TKey, TValue>is a read-only wrapper forObservableConcurrentDictionary<TKey, TValue>ReversedComparer<T>is a comparer that reverses the comparison of another comparer (this is useful when you want to sort a list in the opposite order of the default sort order)
ObjectModel
ObservableDictionary<TKey, TValue>,ObservableSortedDictionary<TKey, TValue>,ObservableConcurrentDictionary<TKey, TValue>are counterparts to the BCL'sDictionary<TKey, TValue>,SortedDictionary<TKey, TValue>, andConcurrentDictionary<TKey, TValue>, respectively, that implement the also includedIRangeDictionary<TKey, TValue>andINotifyDictionaryChanged<TKey, TValue>. Ever want to add multiple items to a dictionary at once... or keep an eye on what's being done to it? Now you can.RangeObservableCollection<T>is a counterpart to the BCL'sObservableCollection<T>which implements:AddRange- Adds objects to the end of the collectionGetAndRemoveAll- Removes all object from the collection that satisfy a predicateGetAndRemoveAt- Gets the element at the specified index and removes it from the collectionGetRange- Gets the elements in the range starting at the specified index and of the specified lengthInsertRange- Inserts elements into the collection at the specified indexMoveRange- Moves the items at the specified index to a new location in the collectionRemoveAll- Removes all object from the collection that satisfy a predicateRemoveRange- Removes the specified items from the collection or removes the specified range of items from the collectionReplaceAll- Replace all items in the collection with the items in the specified collectionReplaceRange- Replaces the specified range of items from the collection with the items in the specified collectionReset- Resets the collection with the specified collection of items
ReadOnlyObservableRangeDictionary<TKey, TValue>is a read-only wrapper for any classes implementingIObservableRangeDictionary<TKey, TValue>.ReadOnlyObservableRangeCollection<T>is a read-only wrapper for any classes implementingIObservableRangeCollection<TKey, TValue>.
Specialized
EquatableList<T>is an immutable list of items which may be compared with other instances of the same type and produces a hash code based on the permutation of its contents.NullableKeyDictionary<TKey, TValue>andNullableKeySortedDictionary<TKey, TValue>are very slim implementations ofIDictionary<TKey, TValue>that allow a single null key (useful for some edge cases in which a null key is simply going to happen and you need to be able to deal with it; otherwise, use other dictionary classes).OrderedHashSet<T>is a counterpart to the BCL'sHashSet<T>that maintains the order of the elements in the set. All operations are still O(1), just like the original, but if you enumerate over it you will get elements in the exact order they were added. There are also methods for manipulating the order.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Epiforge.Extensions.Components (>= 3.0.0)
- NSubstitute (>= 5.3.0)
-
net6.0
- Epiforge.Extensions.Components (>= 3.0.0)
- NSubstitute (>= 5.3.0)
- System.Collections.Immutable (>= 8.0.0)
-
net7.0
- Epiforge.Extensions.Components (>= 3.0.0)
- NSubstitute (>= 5.3.0)
- System.Collections.Immutable (>= 8.0.0)
-
net8.0
- Epiforge.Extensions.Components (>= 3.0.0)
- NSubstitute (>= 5.3.0)
-
net9.0
- Epiforge.Extensions.Components (>= 3.0.0)
- NSubstitute (>= 5.3.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Epiforge.Extensions.Collections:
| Package | Downloads |
|---|---|
|
Epiforge.Extensions.Expressions
This package assists in operating with expressions. |
|
|
Epiforge.Extensions.Frameworks.WPF
This package assists in developing WPF-based applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Unnecessary allocations and raised events were removed. TryRemove on non-generic dictionaries actually removes keys. Corrected a mutation defect in ObservableDictionary when using the non-generic interface. Read-only observable collections/dictionaries are now disposable to make them unwire from their underlying data structures. Nullable key dictionaries now copy null key pairs to the caller's specified index.