Semantica.Lib.Collections
8.1.0-beta
dotnet add package Semantica.Lib.Collections --version 8.1.0-beta
NuGet\Install-Package Semantica.Lib.Collections -Version 8.1.0-beta
<PackageReference Include="Semantica.Lib.Collections" Version="8.1.0-beta" />
<PackageVersion Include="Semantica.Lib.Collections" Version="8.1.0-beta" />
<PackageReference Include="Semantica.Lib.Collections" />
paket add Semantica.Lib.Collections --version 8.1.0-beta
#r "nuget: Semantica.Lib.Collections, 8.1.0-beta"
#:package Semantica.Lib.Collections@8.1.0-beta
#addin nuget:?package=Semantica.Lib.Collections&version=8.1.0-beta&prerelease
#tool nuget:?package=Semantica.Lib.Collections&version=8.1.0-beta&prerelease
Semantica.Lib.Collections
This package is part of the core packages of Semantica.Lib.
Summary
A library that provides a number of collection types that can help with either more readable/elegant syntax, or improved performance compared to native collection types.
Dependencies
- Semantica.Lib.Checks
- Semantica.Lib.Linq
- Semantica.Lib.Patterns
Documentation generated from the XMLDoc:
<a name='assembly'></a>
Lib.Collections
Contents
<a name='T-Semantica-Collections-ArrayDictionary`2'></a>
ArrayDictionary`2 type
Namespace
Semantica.Collections
Summary
Simple implementation for IReadOnlyDictionary that's cheap to create but more expensive to query. Does not enforce uniqueness of keys. In case of multiple equal keys, the value belonging to the first instance of the key is returned. Use for cases where the dictionary interface is convenient for the code, but building a hash-based dictionary would be overkill. Use when individual items are not retrieved more then a couple of times.
Generic Types
Name | Description |
---|---|
TKey | Type of key |
TValue | Type of values |
Remarks
Most of the IDictionary methods are intentionally unimplemented or delegated. If the Dictionary functionality is needed, a regular Dictionary can be used. This exist, for example, to enumerate over KeyValuePairs or lookup each item once in small lists.
<a name='P-Semantica-Collections-ArrayDictionary2-System#Collections#Generic#IDictionary{TKey,TValue}#Item-
0-'></a>
System#Collections#Generic#IDictionary{TKey,TValue}#Item property
Exceptions
Name | Description |
---|---|
System.NotImplementedException | The set is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='M-Semantica-Collections-ArrayDictionary2-Add-System-Collections-Generic-KeyValuePair{
0,`1}-'></a>
Add() method
Parameters
This method has no parameters.
Exceptions
Name | Description |
---|---|
System.NotImplementedException | This IDictionary method is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='M-Semantica-Collections-ArrayDictionary2-Add-
0,`1-'></a>
Add() method
Parameters
This method has no parameters.
Exceptions
Name | Description |
---|---|
System.NotImplementedException | This IDictionary method is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='M-Semantica-Collections-ArrayDictionary`2-Clear'></a>
Clear() method
Parameters
This method has no parameters.
Exceptions
Name | Description |
---|---|
System.NotImplementedException | This IDictionary method is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='M-Semantica-Collections-ArrayDictionary2-Contains-System-Collections-Generic-KeyValuePair{
0,`1}-'></a>
Contains() method
Parameters
This method has no parameters.
Exceptions
Name | Description |
---|---|
System.NotImplementedException | This IDictionary method is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='M-Semantica-Collections-ArrayDictionary2-Remove-System-Collections-Generic-KeyValuePair{
0,`1}-'></a>
Remove() method
Parameters
This method has no parameters.
Exceptions
Name | Description |
---|---|
System.NotImplementedException | This IDictionary method is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='M-Semantica-Collections-ArrayDictionary2-Remove-
0-'></a>
Remove() method
Parameters
This method has no parameters.
Exceptions
Name | Description |
---|---|
System.NotImplementedException | This IDictionary method is intentionally unimplemented. |
Remarks
If the Dictionary functionality is needed, a regular Dictionary can be used.
<a name='T-Semantica-Collections-CollectionExtensions'></a>
CollectionExtensions type
Namespace
Semantica.Collections
<a name='M-Semantica-Collections-CollectionExtensions-ToArrayDictionary2-System-Collections-Generic-IEnumerable{
1},System-Func{1,
0}-'></a>
ToArrayDictionary``2(enumerable,keyFunc) method
Summary
Zet de enumerable om in een ArrayDictionary`2. Duplicate keys worden niet verworpen, en niet geretourneerd.
Returns
An ArrayDictionary implementation of an IReadOnlyDictionary
Parameters
Name | Type | Description |
---|---|---|
enumerable | System.Collections.Generic.IEnumerable{``1} | An enumerable of type TValue |
keyFunc | System.Func{``1,``0} | Function that can retrieve a TKey from an |
TValue |
Generic Types
Name | Description |
---|---|
TKey | The type of the dictionary's keys. |
TValue | The type of the dictionary's values. The generic type of the elements of the enumerable. |
<a name='M-Semantica-Collections-CollectionExtensions-ToArrayDictionary3-System-Collections-Generic-IEnumerable{
0},System-Func{0,
1},System-Func{0,
2}-'></a>
ToArrayDictionary``3(enumerable,keyFunc,valueFunc) method
Summary
Zet de enumerable om in een ArrayDictionaryArrayDictionary`2 Duplicate keys worden niet verworpen, en niet geretourneerd.
Returns
An ArrayDictionary implementation of an IReadOnlyDictionary
Parameters
Name | Type | Description |
---|---|---|
enumerable | System.Collections.Generic.IEnumerable{``0} | An enumerable of type TIn TIn |
keyFunc | System.Func{``0,``1} | Function that can retrieve a TKey from an |
TIn |
||
valueFunc | System.Func{``0,``2} | Function that can retrieve a TValue from an |
TIn |
Generic Types
Name | Description |
---|---|
TIn | The generic type of the elements of the enumerable. |
TKey | The type of the dictionary's keys. |
TValue | The type of the dictionary's values. |
<a name='T-Semantica-Collections-IRetrievalCollection`1'></a>
IRetrievalCollection`1 type
Namespace
Semantica.Collections
Summary
Low overhead data structure to pour a collection of items in, in order to find and retrieve each item at most once.
<a name='M-Semantica-Collections-IRetrievalCollection1-Retrieve-System-Func{
0,System-Boolean}-'></a>
Retrieve(predicate) method
Summary
Finds elements that match the predicate, and removes them from the collection as it returns them. Elements are not removed until they are enumerated over.
Returns
An enumerable of matching elements, or an emty enumeration if no matching elements are found.
Parameters
Name | Type | Description |
---|---|---|
predicate | System.Func{`0,System.Boolean} | Predicate to check the elements with. |
<a name='M-Semantica-Collections-IRetrievalCollection1-RetrieveFirstOrDefault-System-Func{
0,System-Boolean}-'></a>
RetrieveFirstOrDefault(predicate) method
Summary
Finds the first element that matches the predicate, returns it, and removes it from the collection
Returns
The found item or default
Parameters
Name | Type | Description |
---|---|---|
predicate | System.Func{`0,System.Boolean} | Predicate to check the elements with. |
<a name='T-Semantica-Collections-RetrievalCollection`1'></a>
RetrievalCollection`1 type
Namespace
Semantica.Collections
Summary
Inherit from parent.
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 was computed. 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 was computed. 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. |
-
net6.0
- Semantica.Lib.Checks (>= 8.1.0)
- Semantica.Lib.Linq (>= 8.1.0)
- Semantica.Lib.Patterns (>= 8.1.0)
-
net7.0
- Semantica.Lib.Checks (>= 8.1.0)
- Semantica.Lib.Linq (>= 8.1.0)
- Semantica.Lib.Patterns (>= 8.1.0)
-
net8.0
- Semantica.Lib.Checks (>= 8.1.0)
- Semantica.Lib.Linq (>= 8.1.0)
- Semantica.Lib.Patterns (>= 8.1.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Semantica.Lib.Collections:
Package | Downloads |
---|---|
Semantica.Lib.Package.Core
Combines all primary Semantica.Lib.Core packages in a single package. Check the ReadMe of each package for further elaboration on package contents. |
|
Semantica.Lib.Trees
A library that provides types that can be used to represent trees, tree nodes and tree paths, as well as extensions and helpers for these types. The interfaces for both the nodes and collections of nodes are all simplified. Helpers include builders, tree->tree converters, and write only json converters. |
|
Semantica.Lib.Types
A library that provides several value types and extensions for those types. This includes but is not limited to DateSpan, EmailAddress, Hash, Link, RouteValues. These simple stucts can make your models and method signatures more readable/expressive, and be useful to write extensions. Includes Converters.TypeConverterRestistrations, a helper that can dynamically add typeconverter attributes to types, eliminating the requirement to have your typeconverter classes in the same project as the types they can convert, acting on the IRunTimeTypeConverter interface. Provides types and helpers for code keys, a compact, human-readable encoding of integers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
8.1.0-beta | 129 | 5/30/2025 |
8.0.7-beta | 168 | 9/6/2024 |
8.0.6-beta | 755 | 7/10/2024 |
8.0.5-beta | 201 | 7/4/2024 |
8.0.4-beta | 159 | 7/2/2024 |
8.0.3-beta | 139 | 6/14/2024 |
8.0.2-beta | 212 | 6/4/2024 |
8.0.1-beta | 141 | 6/4/2024 |
8.0.0-beta | 158 | 6/4/2024 |
6.6.1-beta | 226 | 4/5/2024 |
6.6.0-beta | 266 | 3/5/2024 |
6.5.5-alpha2 | 103 | 3/4/2024 |
6.5.5-alpha | 84 | 3/4/2024 |
6.5.4-beta | 125 | 2/29/2024 |
6.5.3-beta | 535 | 10/5/2023 |
6.5.2-beta | 122 | 10/5/2023 |
6.5.1-beta | 193 | 9/29/2023 |
6.5.0-beta | 131 | 9/22/2023 |
6.4.0-beta | 439 | 7/11/2023 |
6.3.0-beta | 155 | 6/15/2023 |
6.2.5-beta | 233 | 3/14/2023 |
6.2.4-beta | 607 | 10/12/2022 |
6.2.3-beta | 303 | 9/1/2022 |
6.2.1-beta | 205 | 8/25/2022 |