System.Collections.Immutable 10.0.0-rc.2.25502.107
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 |
|---|---|
|
ZiggyCreatures.FusionCache
FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features.
|
6 |
|
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/e595ee276d14e14bfb3eb323fb57f2aa668bddea
|
4 |
|
Microsoft.CodeAnalysis.Workspaces.MSBuild
.NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
of the following packages to add the appropriate language support:
- Microsoft.CodeAnalysis.CSharp.Workspaces
- Microsoft.CodeAnalysis.VisualBasic.Workspaces
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/6c4a46a31302167b425d5e0a31ea83c9a9aa1d09.
|
4 |
|
HtmlSanitizer
Cleans HTML from constructs that can be used for cross-site scripting (XSS)
|
3 |
|
Microsoft.VisualStudio.Web.CodeGeneration.Contracts
Contains interfaces for Project Model and messaging for scaffolding.
|
3 |
|
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
30ab651fcb4354552bd4891619a0bdd81e0ebdbf
When using NuGet 3.x this package requires at least version 3.4.
|
3 |
|
Microsoft.Extensions.Telemetry
Provides canonical implementations of telemetry abstractions.
|
3 |
|
Microsoft.NETCore.App
A set of .NET API's that are included in the default .NET Core application model.
5e17f34de8b34fce04f665640e046d89e8991d00
When using NuGet 3.x this package requires at least version 3.4.
|
3 |
|
Microsoft.Extensions.Diagnostics.ExceptionSummarization
Lets you retrieve exception summary information.
|
3 |
|
Microsoft.Extensions.Diagnostics.ExceptionSummarization
Lets you retrieve exception summary information.
|
2 |
|
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C# (.NET Framework, .NET 6, Unity, Xamarin).
|
2 |
|
SixLabors.Fonts
A cross-platform library for loading and laying out for processing and measuring; written in C#
|
2 |
|
Grpc.Core
Core C# implementation of gRPC - an RPC library and framework. See project site for more info.
|
2 |
|
Microsoft.Extensions.Telemetry
Provides canonical implementations of telemetry abstractions.
|
2 |
|
Mime-Detective
The ultimate file-extension & mime-type library with over 14,000+ signatures. Quickly detect extensions & mime types from a stream or byte array using magic numbers (file headers) and magic words. A default signature library is included and can be expanded using Mime-Detective.Definitions.Condensed (common signatures) or Mime-Detective.Definitions.Exhaustive (14,000+ signatures).
|
2 |
|
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.
|
2 |
|
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/8de9e4b2beba5b7c0edd6f1e6a4f192a51fdc872.
|
2 |
|
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
|
2 |
.NET Framework 4.6.2
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.
.NET 10.0
- No dependencies.
.NET Standard 2.0
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)