System Collections Immutable
This is an upload of System.Collections.Immutable.dll.
About this mod Author’s original text
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 colors = ImmutableHashSet.Create("Red", "Green", "Blue");
// Create a new set by adding and removing items from the original set
ImmutableHashSet 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.ImmutableArray
- System.Collections.Immutable.ImmutableArray
- System.Collections.Immutable.ImmutableDictionary
- System.Collections.Immutable.ImmutableDictionary
- System.Collections.Immutable.ImmutableHashSet
- System.Collections.Immutable.ImmutableHashSet
- System.Collections.Immutable.ImmutableList
- System.Collections.Immutable.ImmutableList
- System.Collections.Immutable.ImmutableQueue
- System.Collections.Immutable.ImmutableQueue
- System.Collections.Immutable.ImmutableSortedDictionary
- System.Collections.Immutable.ImmutableSortedDictionary
- System.Collections.Immutable.ImmutableSortedSet
- System.Collections.Immutable.ImmutableSortedSet
- System.Collections.Immutable.ImmutableStack
- System.Collections.Immutable.ImmutableStack
- System.Collections.Frozen.FrozenDictionary
- System.Collections.Frozen.FrozenDictionary
- System.Collections.Frozen.FrozenSet
- System.Collections.Frozen.FrozenSet
Additional Documentation
- Collections and Data Structures
- API 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.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.