System.Collections.Immutable 10.0.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 |
|---|---|
|
Microsoft.CodeAnalysis.Compilers
Compiler layer of the .NET Compiler Platform ("Roslyn").
Install this package to get both C# and Visual Basic support.
If you want just support for one language, install Microsoft.CodeAnalysis.CSharp or Microsoft.CodeAnalysis.VisualBasic.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/e482b6e281d7db727fcb086ebbfae44dcba82c6d.
|
6 |
|
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.
|
6 |
|
WTelegramClient
Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 181
Release Notes:
API Layer 181: Fact check, Message effects, Payment stars...
|
5 |
|
Stripe.net
Stripe.net is a sync/async .NET 4.5+ client, and a portable class library for the Stripe API. (Official Library)
|
5 |
|
WTelegramClient
Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 216
Release Notes:
- API Layer 216: topics methods/updates moved to prefix Messages_* (to support topics for bots), contact notes, groupcall comments, profile color, stargifts stuff
- Collect: Fix Channel losing participants_count
- Change UserStatusOffline.was_online to a DateTime
- Added missing DownloadFileAsync(doc, videoSize)
- Delete alt-session on AUTH_KEY_UNREGISTERED for renegociation
- Removed annoying Peer implicit long operator (reverts #229)
|
5 |
|
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.
|
5 |
|
Microsoft.NETCore
Provides a set of packages that can be used when building portable libraries on .NETCore based platforms.
|
5 |
|
WTelegramClient
Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 179
Release Notes:
- API Layer 179: poll texts with entities, new SentCodeTypes
- Catch/Log sessionStore.Write exceptions (fix #248)
- New method LoginWithQRCode (fix #247)
|
5 |
|
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
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/cf82d399c36008e7936d545cde24141f8d3790fa.
|
5 |
|
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/2fc6a04980f800c59e8ede97e6ae294ff47d666e.
|
5 |
|
WTelegramClient
Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 199
Release Notes:
- API Layer 199: reCAPTCHA, PaidReactionPrivacy
- Fix Messages_GetAllChats to include only your chats
- Added EmojiStatusBase.DocumentId helper
- Added ForumTopicBase.Title helper
- Better support for HTML &entities; in HtmlText
|
5 |
|
Microsoft.CodeAnalysis.Compilers
Compiler layer of the .NET Compiler Platform ("Roslyn").
Install this package to get both C# and Visual Basic support.
If you want just support for one language, install Microsoft.CodeAnalysis.CSharp or Microsoft.CodeAnalysis.VisualBasic.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/2b7d172669b2f7e55803b55f317cfcc2d4279d76.
|
5 |
|
NuGet.Common
Common utilities and interfaces for all NuGet libraries.
|
5 |
|
Stripe.net
Stripe.net is a sync/async .NET 4.5+ client, and a portable class library for the Stripe API. (Official Library)
|
4 |
.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)