System.Collections.Immutable 10.0.0-preview.7.25380.108
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.Azure.Cosmos
This client library enables client applications to connect to Azure Cosmos DB via the NoSQL API. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/.
|
36 |
|
Microsoft.VisualStudio.Text.UI
Microsoft® Visual Studio® Editor Platform
|
36 |
|
HTTPlease.Core
HTTPlease.Core
|
34 |
|
Microsoft.VisualStudio.Text.UI
Microsoft® Visual Studio® Editor Platform
|
29 |
|
protobuf-net.Core
Provides simple access to fast and efficient "Protocol Buffers" serialization from .NET applications
|
24 |
|
Microsoft.Azure.Cosmos
This client library enables client applications to connect to Azure Cosmos DB via the NoSQL API. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/.
|
20 |
|
Microsoft.Azure.Cosmos
This client library enables client applications to connect to Azure Cosmos via the SQL API. Azure Cosmos is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/.
|
20 |
|
StreamJsonRpc
A cross-platform .NET portable library that implements the JSON-RPC wire protocol and can use System.IO.Stream or WebSocket so you can use it with any transport.
|
20 |
|
Microsoft.VisualStudio.SDK
Visual Studio SDK meta-package. Reference this to get references to most other Visual Studio extensibility packages.
|
20 |
|
Microsoft.VisualStudio.Workspace
Extensibility APIs for Open Folder in Visual Studio.
|
20 |
|
Microsoft.NETCore.App
A set of .NET API's that are included in the default .NET Core application model.
d6a56162401485f1c898ce7e78f95641954997b3
When using NuGet 3.x this package requires at least version 3.4.
|
20 |
|
Microsoft.VisualStudio.Extensibility.Editor.Contracts
Microsoft® Visual Studio® Editor Platform
|
20 |
|
Microsoft.NETCore.App
A set of .NET API's that are included in the default .NET Core application model.
When using NuGet 3.x this package requires at least version 3.4.
|
20 |
|
Microsoft.NETCore.App
A set of .NET API's that are included in the default .NET Core application model.
40c565230930ead58a50719c0ec799df77bddee9
When using NuGet 3.x this package requires at least version 3.4.
|
20 |
|
Microsoft.Azure.Cosmos
This client library enables client applications to connect to Azure Cosmos DB via the NoSQL API. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/.
|
19 |
|
Microsoft.CodeAnalysis.VisualBasic
.NET Compiler Platform ("Roslyn") support for Visual Basic, Microsoft.CodeAnalysis.VisualBasic.dll.
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/bf8791d0d1be92c24e56cefa52aa139e2b5340c2.
|
19 |
|
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C# (.NET Framework, .NET 6, Unity, Xamarin).
|
19 |
|
MessagePack
Extremely Fast MessagePack(MsgPack) Serializer for C#(.NET, .NET Core, Unity, Xamarin).
|
19 |
.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)