IImmutableList<T> インターフェイス
定義
変更できない要素のリストを表します。Represents a list of elements that cannot be modified.
NuGet パッケージ:System.Collections.Immutable (変更できないコレクションの概要とインストール方法)NuGet package: System.Collections.Immutable (about immutable collections and how to install)
generic <typename T>
public interface class IImmutableList : System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IReadOnlyCollection<T>, System::Collections::Generic::IReadOnlyList<T>
public interface IImmutableList<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>
type IImmutableList<'T> = interface
interface seq<'T>
interface IEnumerable
interface IReadOnlyCollection<'T>
interface IReadOnlyList<'T>
Public Interface IImmutableList(Of T)
Implements IEnumerable(Of T), IReadOnlyCollection(Of T), IReadOnlyList(Of T)
型パラメーター
- T
リスト内の要素の型。The type of elements in the list.
- 派生
- 実装
注釈
からIImmutableList<T>項目を追加または削除すると、元の一覧のコピーが作成され、変更が適用されます。When you add or remove items from an IImmutableList<T>, a copy of the original list is created, with the changes applied. リストに対する増分変更は、以前のバージョンのリストで可能な限り多くのメモリを共有し、ガベージコレクションを有効にして、参照されなくなった一意のリストデータをクリーンアップします。Incremental changes to a list share as much memory as possible with earlier versions of a list and enable garbage collection to clean up any unique list data that is no longer being referenced.
IImmutableList<T>
実装の作成の詳細についてSystem.Collections.Immutable.ImmutableList<T>は、「」を参照してください。For information on creating an IImmutableList<T>
implementation, see System.Collections.Immutable.ImmutableList<T>.
プロパティ
Count |
コレクション内の要素の数を取得します。Gets the number of elements in the collection. (継承元 IReadOnlyCollection<T>) |
Item[Int32] |
読み取り専用のリスト内の指定したインデックスにある要素を取得します。Gets the element at the specified index in the read-only list. (継承元 IReadOnlyList<T>) |
メソッド
Add(T) |
リストのコピーを作成し、コピーしたリストの末尾に、指定されたオブジェクトを追加します。Makes a copy of the list, and adds the specified object to the end of the copied list. |
AddRange(IEnumerable<T>) |
リストのコピーを作成し、コピーしたリストの末尾に、指定されたオブジェクトを追加します。Makes a copy of the list and adds the specified objects to the end of the copied list. |
Clear() |
すべての項目が削除されたリストを作成します。ただし、並べ替えと順序付けのセマンティクスは、このリストと同じになります。Creates a list with all the items removed, but with the same sorting and ordering semantics as this list. |
GetEnumerator() |
コレクションを反復処理する列挙子を返します。Returns an enumerator that iterates through a collection. (継承元 IEnumerable) |
IndexOf(T, Int32, Int32, IEqualityComparer<T>) |
指定したインデックスから始まり、指定した数の要素が含まれる IImmutableList<T> の要素範囲内で、指定したオブジェクトを検索し、最初に出現する位置の 0 から始まるインデックス番号を返します。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the IImmutableList<T> that starts at the specified index and contains the specified number of elements. |
Insert(Int32, T) |
指定した要素を、変更できないリストの指定したインデックス位置に挿入します。Inserts the specified element at the specified index in the immutable list. |
InsertRange(Int32, IEnumerable<T>) |
指定した要素を、変更できないリストの指定したインデックス位置に挿入します。Inserts the specified elements at the specified index in the immutable list. |
LastIndexOf(T, Int32, Int32, IEqualityComparer<T>) |
IImmutableList<T> のうち、指定した要素数が含まれ、指定したインデックスの位置で終了する要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the IImmutableList<T> that contains the specified number of elements and ends at the specified index. |
Remove(T, IEqualityComparer<T>) |
この変更できないリストから、指定したオブジェクトのうち最初に出現したものを削除します。Removes the first occurrence of a specified object from this immutable list. |
RemoveAll(Predicate<T>) |
指定した述語によって定義される条件に一致するすべての要素を削除します。Removes all the elements that match the conditions defined by the specified predicate. |
RemoveAt(Int32) |
変更できないリストの指定したインデックス位置にある要素を削除します。Removes the element at the specified index of the immutable list. |
RemoveRange(IEnumerable<T>, IEqualityComparer<T>) |
指定したオブジェクトをリストから削除します。Removes the specified object from the list. |
RemoveRange(Int32, Int32) |
IImmutableList<T> から要素の範囲を削除します。Removes a range of elements from the IImmutableList<T>. |
Replace(T, T, IEqualityComparer<T>) |
リスト内で最初に一致した要素が、指定した要素に置き換えられた、新しいリストを返します。Returns a new list with the first matching element in the list replaced with the specified element. |
SetItem(Int32, T) |
リスト内の指定された位置にある要素を、指定した要素に置換します。Replaces an element in the list at a given position with the specified element. |
拡張メソッド
IndexOf<T>(IImmutableList<T>, T) |
リスト内で指定したオブジェクトを検索し、最初に見つかったオブジェクトの 0 から始まるインデックスを返します。Searches for the specified object and returns the zero-based index of the first occurrence within the list. |
IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) |
リスト内で指定したオブジェクトを検索し、最初に見つかったオブジェクトの 0 から始まるインデックスを返します。Searches for the specified object and returns the zero-based index of the first occurrence within the list. |
IndexOf<T>(IImmutableList<T>, T, Int32) |
変更できないリストのうち、指定したインデックスから最後の要素までの要素範囲の中から、指定したオブジェクトを検索し、最初に出現する位置の 0 から始まるインデックス番号を返します。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. |
IndexOf<T>(IImmutableList<T>, T, Int32, Int32) |
変更できないリストのうち、指定したインデックスから最後の要素までの要素範囲の中から、指定したオブジェクトを検索し、最初に出現する位置の 0 から始まるインデックス番号を返します。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element. |
LastIndexOf<T>(IImmutableList<T>, T) |
変更できないリスト全体から、指定したオブジェクトを検索し、最後に見つかったオブジェクトの 0 から始まるインデックスを返します。Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. |
LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) |
変更できないリスト全体から、指定したオブジェクトを検索し、最後に見つかったオブジェクトの 0 から始まるインデックスを返します。Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. |
LastIndexOf<T>(IImmutableList<T>, T, Int32) |
変更できないリストのうち、最初の要素から指定したインデックスまでの要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. |
LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) |
変更できないリストのうち、最初の要素から指定したインデックスまでの要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. |
Remove<T>(IImmutableList<T>, T) |
指定した値をこのリストから削除します。Removes the specified value from this list. |
RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) |
指定した値をこのリストから削除します。Removes the specified values from this list. |
Replace<T>(IImmutableList<T>, T, T) |
リスト内で最初に一致する要素を、指定した要素に置換します。Replaces the first equal element in the list with the specified element. |
CopyToDataTable<T>(IEnumerable<T>) |
指定した入力 DataTable オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
指定された型に基づいて IEnumerable の要素をフィルター処理します。Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
クエリの並列化を有効にします。Enables parallelization of a query. |
AsQueryable(IEnumerable) |
IEnumerable を IQueryable に変換します。Converts an IEnumerable to an IQueryable. |
Ancestors<T>(IEnumerable<T>) |
ソース コレクション内のすべてのノードの先祖が格納された、要素のコレクションを返します。Returns a collection of elements that contains the ancestors of every node in the source collection. |
Ancestors<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべてのノードの先祖が格納され、フィルター処理された要素のコレクションを返します。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
DescendantNodes<T>(IEnumerable<T>) |
ソース コレクション内のすべてのドキュメントおよび要素の子孫ノードのコレクションを返します。Returns a collection of the descendant nodes of every document and element in the source collection. |
Descendants<T>(IEnumerable<T>) |
ソース コレクション内のすべての要素とドキュメントの子孫要素が格納された要素のコレクションを返します。Returns a collection of elements that contains the descendant elements of every element and document in the source collection. |
Descendants<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべての要素とドキュメントの子孫要素が格納され、フィルター処理された要素のコレクションを返します。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
Elements<T>(IEnumerable<T>) |
ソース コレクション内のすべての要素およびドキュメントの子要素のコレクションを返します。Returns a collection of the child elements of every element and document in the source collection. |
Elements<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべての要素およびドキュメントの、フィルター処理された子要素のコレクションを返します。Returns a filtered collection of the child elements of every element and document in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
InDocumentOrder<T>(IEnumerable<T>) |
ソース コレクション内のすべてのノードがドキュメント順に並べ替えて格納された、ノードのコレクションを返します。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order. |
Nodes<T>(IEnumerable<T>) |
ソース コレクション内のすべてのドキュメントおよび要素の子ノードのコレクションを返します。Returns a collection of the child nodes of every document and element in the source collection. |
Remove<T>(IEnumerable<T>) |
ソース コレクション内の親ノードからすべてのノードを削除します。Removes every node in the source collection from its parent node. |