Epiforge.Extensions.Collections 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Epiforge.Extensions.Collections --version 1.1.0
NuGet\Install-Package Epiforge.Extensions.Collections -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Epiforge.Extensions.Collections" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Epiforge.Extensions.Collections --version 1.1.0
#r "nuget: Epiforge.Extensions.Collections, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Epiforge.Extensions.Collections as a Cake Addin
#addin nuget:?package=Epiforge.Extensions.Collections&version=1.1.0

// Install Epiforge.Extensions.Collections as a Cake Tool
#tool nuget:?package=Epiforge.Extensions.Collections&version=1.1.0

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 predicate
    • FindLastIndex - Finds the index of the last element in the source that satisfies the specified predicate
    • FindIndicies - Finds the indicies of the elements in the source that satisfy the specified predicate
    • IndexOf - Finds the first index of the specified item in the source
    • LastIndexOf - Finds the last index of the specified item in the source
    • IndiciesOf - Finds the indicies of the specified item in the source
  • DictionaryExtensions, providing:
    • GetOrAdd - Adds a key/value pair to the specified IDictionary or IDictionary<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 specified IDictionary or IDictionary<TKey, TValue>

Generic

  • ReadOnlyDictionary<TKey, TValue> is a read-only wrapper for any classes implementing IReadOnlyDictionary<TKey, TValue>
  • ReadOnlyRangeDictionary<TKey, TValue> is a read-only wrapper for any classes implementing IRangeDictionary<TKey, TValue>
  • ReadOnlyConcurrentDictionary<TKey, TValue> is a read-only wrapper for ObservableConcurrentDictionary<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's Dictionary<TKey, TValue>, SortedDictionary<TKey, TValue>, and ConcurrentDictionary<TKey, TValue>, respectively, that implement the also included IRangeDictionary<TKey, TValue> and INotifyDictionaryChanged<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's ObservableCollection<T> which implements:
    • AddRange - Adds objects to the end of the collection
    • GetAndRemoveAll - Removes all object from the collection that satisfy a predicate
    • GetAndRemoveAt - Gets the element at the specified index and removes it from the collection
    • GetRange - Gets the elements in the range starting at the specified index and of the specified length
    • InsertRange - Inserts elements into the collection at the specified index
    • MoveRange - Moves the items at the specified index to a new location in the collection
    • RemoveAll - Removes all object from the collection that satisfy a predicate
    • RemoveRange - Removes the specified items from the collection or removes the specified range of items from the collection
    • ReplaceAll - Replace all items in the collection with the items in the specified collection
    • ReplaceRange - Replaces the specified range of items from the collection with the items in the specified collection
    • Reset - Resets the collection with the specified collection of items
  • ReadOnlyObservableRangeDictionary<TKey, TValue> is a read-only wrapper for any classes implementing IObservableRangeDictionary<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> and NullableKeySortedDictionary<TKey, TValue> are very slim implementations of IDictionary<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's HashSet<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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last updated
1.5.0 187 8/24/2023
1.4.0 151 8/24/2023
1.3.2 338 8/15/2023
1.3.1 255 8/13/2023
1.2.3 118 8/12/2023
1.2.1 138 8/10/2023
1.1.0 157 8/8/2023
1.0.0 139 6/23/2023

We added the ReversedComparer type. This type is a comparer that reverses the result of another comparer. This is useful when you want to sort a list in the opposite order of the default sort order.