System Collections Immutable

版本 v5.0.0·更新於 2025-04-06

This is an upload of System.Collections.Immutable.dll.

模組介紹 作者原文

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.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

檔案與校驗

檔案名稱
System_Collections_Immutable-5.0.0.zip
檔案大小
79.9 KiB