ImmutableList<T>.Enumerator 構造体
定義
バイナリ ツリーの内容を列挙します。Enumerates the contents of a binary tree.
NuGet パッケージ: System.Collections.Immutable (変更できないコレクションの概要とインストール方法)NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public: value class ImmutableList<T>::Enumerator : System::Collections::Generic::IEnumerator<T>
public struct ImmutableList<T>.Enumerator : System.Collections.Generic.IEnumerator<T>
type ImmutableList<'T>.Enumerator = struct
interface IEnumerator<'T>
interface IEnumerator
interface IDisposable
Public Structure ImmutableList(Of T).Enumerator
Implements IEnumerator(Of T)
型パラメーター
- T
- 継承
- 実装
注釈
この構造体は、他の2つのバイナリツリーの列挙子 (および) と同期しておく必要があり System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.Enumerator System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator ます。This structure should be kept synchronized with the other two binary tree enumerators: System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.Enumerator and System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator.
注意事項
この列挙子が値型として使用されている場合 (つまり、ボックス化されていない場合)、2番目の変数に代入するか、別のメソッドに渡すことによってコピーしないでください。When this enumerator is used as a value type (that is, when it isn't boxed), do not copy it by assigning it to a second variable or by passing it to another method. この列挙子が破棄されると、変更可能な参照型のスタックがリソースプールに返されます。値の型の列挙子がコピーされた場合 (その値を渡すと誤って発生する可能性があります)、リソースプールに既に戻されているスタックは、列挙子のコピーの1つでも使用されている可能性がでは、データの破損または例外が発生します。When this enumerator is disposed of, it returns a mutable reference type stack to a resource pool, and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around), there is a risk that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data corruption or exceptions.
プロパティ
Current |
列挙子の現在位置の要素を取得します。Gets the element at the current position of the enumerator. |
メソッド
Dispose() |
ImmutableList<T>.Enumerator クラスの現在のインスタンスによって使用されているリソースを解放します。Releases the resources used by the current instance of the ImmutableList<T>.Enumerator class. |
MoveNext() |
列挙体を、変更できないリストの次の要素に進めます。Advances enumeration to the next element of the immutable list. |
Reset() |
列挙子を初期位置、つまり変更できないリストの最初の要素の前に設定します。Sets the enumerator to its initial position, which is before the first element in the immutable list. |
明示的なインターフェイスの実装
IEnumerator.Current |
現在の要素。The current element. |
適用対象
スレッド セーフ
この型はスレッド セーフです。This type is thread safe.