System.Collections.Immutable 10.0.0-preview.2.25163.2
About
This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. Like strings, any methods that perform modifications will not change the existing instance but instead return a new instance. For efficiency reasons, the implementation uses a sharing mechanism to ensure that newly created instances share as much data as possible with the previous instance while ensuring that operations have a predictable time complexity.
The System.Collections.Immutable library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks.
How to Use
using System.Collections.Immutable;
// Create immutable set of strings
ImmutableHashSet<string> colors = ImmutableHashSet.Create("Red", "Green", "Blue");
// Create a new set by adding and removing items from the original set
ImmutableHashSet<string> colorsModified = colors.Remove("Red").Add("Orange");
foreach (string s in colorsModified)
{
Console.WriteLine(s);
}
/* Example output:
Blue
Green
Orange
*/
Main Types
The main types provided by this library are:
System.Collections.Immutable.ImmutableArraySystem.Collections.Immutable.ImmutableArray<T>System.Collections.Immutable.ImmutableDictionarySystem.Collections.Immutable.ImmutableDictionary<TKey,TValue>System.Collections.Immutable.ImmutableHashSetSystem.Collections.Immutable.ImmutableHashSet<T>System.Collections.Immutable.ImmutableListSystem.Collections.Immutable.ImmutableList<T>System.Collections.Immutable.ImmutableQueueSystem.Collections.Immutable.ImmutableQueue<T>System.Collections.Immutable.ImmutableSortedDictionarySystem.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>System.Collections.Immutable.ImmutableSortedSetSystem.Collections.Immutable.ImmutableSortedSet<T>System.Collections.Immutable.ImmutableStackSystem.Collections.Immutable.ImmutableStack<T>System.Collections.Frozen.FrozenDictionarySystem.Collections.Frozen.FrozenDictionary<TKey, TValue>System.Collections.Frozen.FrozenSetSystem.Collections.Frozen.FrozenSet<T>
Additional Documentation
Feedback & Contributing
System.Collections.Immutable is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on System.Collections.Immutable.
| Packages | Downloads |
|---|---|
|
DevExpress.Reporting.Core
This package implements core functionality for DevExpress XtraReports Suite.
|
82 |
|
FirebaseAdmin
Firebase Admin SDK enables server-side .NET developers to integrate Firebase into their
services and applications.
|
40 |
|
Microsoft.CodeAnalysis.Common
A shared package used by the Microsoft .NET Compiler Platform ("Roslyn"). Do not install this package manually, it will be added as a prerequisite by other packages that require it.
This package was built from the source at https://github.com/dotnet/roslyn/commit/57c813192bd494bb15aaa841f415f28f50438e19
|
38 |
|
System.Reflection.Metadata
This packages provides a low-level .NET (ECMA-335) metadata reader. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers.
Commonly Used Types:
System.Reflection.Metadata.MetadataReader
System.Reflection.PortableExecutable.PEReader
|
36 |
|
System.Reflection.Metadata
This package provides a low-level .NET (ECMA-335) metadata reader and writer. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers. The metadata format is defined by the ECMA-335 - Common Language Infrastructure (CLI) specification.
The System.Reflection.Metadata library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks.
|
36 |
|
System.Reflection.Metadata
This packages provides a low-level .NET (ECMA-335) metadata reader and writer. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers.
Commonly Used Types:
System.Reflection.Metadata.MetadataReader
System.Reflection.PortableExecutable.PEReader
System.Reflection.Metadata.Ecma335.MetadataBuilder
System.Reflection.PortableExecutable.PEBuilder
System.Reflection.PortableExecutable.ManagedPEBuilder
When using NuGet 3.x this package requires at least version 3.4.
|
35 |
|
Microsoft.CodeAnalysis.Common
A shared package used by the Microsoft .NET Compiler Platform ("Roslyn").
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/df45061e218c9b5813c5531bc06fb238a23e30f6.
|
34 |
|
Microsoft.CodeAnalysis.Common
A shared package used by the Microsoft .NET Compiler Platform ("Roslyn").
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/e091728607ca0fc9efca55ccfb3e59259c6b5a0a.
|
25 |
|
System.Reflection.Metadata
This packages provides a low-level .NET (ECMA-335) metadata reader and writer. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers.
Commonly Used Types:
System.Reflection.Metadata.MetadataReader
System.Reflection.PortableExecutable.PEReader
System.Reflection.Metadata.Ecma335.MetadataBuilder
System.Reflection.PortableExecutable.PEBuilder
System.Reflection.PortableExecutable.ManagedPEBuilder
|
22 |
|
Microsoft.CodeAnalysis.Common
A shared package used by the Microsoft .NET Compiler Platform ("Roslyn").
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/6a5a63bbc9f4449d9bd1e95a8f9624939c3ccdc3.
|
22 |
|
HtmlSanitizer
Cleans HTML from constructs that can be used for cross-site scripting (XSS)
|
20 |
|
Nito.Disposables
IDisposable and IAsyncDisposable helper types.
|
19 |
|
Volo.Abp.Core
Package Description
|
18 |
|
OpenIddict.Abstractions
Abstractions and primitives used by the OpenIddict components.
|
15 |
|
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
|
13 |
|
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
|
11 |
|
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
|
10 |
|
Volo.Abp.Core
Package Description
|
10 |
|
Volo.Abp.Core
Package Description
|
9 |
|
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C# (.NET Framework, .NET 6, Unity, Xamarin).
|
8 |
.NET Framework 4.6.2
- System.Memory (>= 4.6.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.0)
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.
.NET 10.0
- No dependencies.
.NET Standard 2.0
- System.Memory (>= 4.6.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.0)