MultiChildrenCollection<T> クラス
複数の子の保持をコンポジションで提供するコレクション。追加・削除時にownerへのAdopt/Dropを行い、 ライフサイクル(Attach/Detach/Visit)の転送ヘルパーを提供する。
名前空間: FloatSoda.RenderObjects
アセンブリ: FloatSoda.dll
public class MultiChildrenCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : RenderObject型パラメーター
Section titled “型パラメーター”T
object ← MultiChildrenCollection<T>
実装するインターフェイス
Section titled “実装するインターフェイス”ICollection<T>, IEnumerable<T>, IEnumerable
継承したメンバー
Section titled “継承したメンバー”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
拡張メソッド
Section titled “拡張メソッド”MultiChildrenCollectionExtensions.AddErased<T>(MultiChildrenCollection<T>, RenderObject), MultiChildrenCollectionExtensions.InsertErased<T>(MultiChildrenCollection<T>, RenderObject, RenderObject?), MultiChildrenCollectionExtensions.MoveErased<T>(MultiChildrenCollection<T>, RenderObject, RenderObject?), MultiChildrenCollectionExtensions.RemoveErased<T>(MultiChildrenCollection<T>, RenderObject), MultiChildrenCollectionExtensions.Swap<T>(MultiChildrenCollection<T>, ReadOnlySpan<T>)
コンストラクター
Section titled “コンストラクター”MultiChildrenCollection(RenderObject)
Section titled “MultiChildrenCollection(RenderObject)”複数の子の保持をコンポジションで提供するコレクション。追加・削除時にownerへのAdopt/Dropを行い、 ライフサイクル(Attach/Detach/Visit)の転送ヘルパーを提供する。
public MultiChildrenCollection(RenderObject owner)パラメーター
Section titled “パラメーター”owner RenderObject
子を所有し、追加と削除の通知を受け取るRenderObject。
保持している子の数を取得する。
public int Count { get; }プロパティの値
Section titled “プロパティの値”IsReadOnly
Section titled “IsReadOnly”コレクションが読み取り専用かどうかを取得する。
public bool IsReadOnly { get; }プロパティの値
Section titled “プロパティの値”Add(T)
Section titled “Add(T)”子を末尾に追加する。
public void Add(T child)パラメーター
Section titled “パラメーター”child T
所有者をLayout Dirtyとしてマークし、次のパイプライン更新時に再レイアウトを要求します。
Attach(RenderPipeline?)
Section titled “Attach(RenderPipeline?)”全ての子をRenderPipelineへアタッチする。ownerのAttachから呼ぶ。
public void Attach(RenderPipeline? pipeline)パラメーター
Section titled “パラメーター”pipeline RenderPipeline?
Clear()
Section titled “Clear()”全ての子を取り除く。
public void Clear()子を一つ取り除くたびに所有者へLayout Dirtyを要求します。 コレクションが空の場合、Dirty状態は変更されません。
Contains(T)
Section titled “Contains(T)”指定した子を保持しているかを判定する。
public bool Contains(T item)パラメーター
Section titled “パラメーター”item T
検索する子。
指定した子を保持している場合はtrue、それ以外の場合はfalse。
CopyTo(T[], int)
Section titled “CopyTo(T[], int)”保持している子を指定した配列へコピーする。
public void CopyTo(T[] array, int arrayIndex)パラメーター
Section titled “パラメーター”array T[]
子をコピーする配列。
arrayIndex int
コピーを開始する配列の位置。
Detach()
Section titled “Detach()”全ての子をデタッチする。ownerのDetachから呼ぶ。
public void Detach()GetEnumerator()
Section titled “GetEnumerator()”保持している子を列挙する反復子を取得する。
public IEnumerator<T> GetEnumerator()IEnumerator<T>
子を列挙する反復子。
Insert(T, T?)
Section titled “Insert(T, T?)”子をafterの次へ挿入する。afterがnullなら先頭へ挿入する。
public void Insert(T child, T? after)パラメーター
Section titled “パラメーター”child T
after T?
所有者をLayout Dirtyとしてマークし、次のパイプライン更新時に再レイアウトを要求します。
afterがこのコレクションの子ではありません。
Move(T, T?)
Section titled “Move(T, T?)”保持している子をafterの次へ移動する。afterがnullなら先頭へ移動する。
public void Move(T child, T? after)パラメーター
Section titled “パラメーター”child T
after T?
位置が変わった場合、所有者をLayout Dirtyとしてマークします。既にその位置にある場合、Dirty状態は変更されません。
childまたはafterがこのコレクションの子ではありません。
Remove(T)
Section titled “Remove(T)”子を取り除く。
public bool Remove(T child)パラメーター
Section titled “パラメーター”child T
子が削除された場合、所有者をLayout Dirtyとしてマークし、 次のパイプライン更新時に再レイアウトを要求します。 子が見つからなかった場合、Dirty状態は変更されません。
VisitChildren(Action<RenderObject>)
Section titled “VisitChildren(Action<RenderObject>)”全ての子にvisitorを適用する。
public void VisitChildren(Action<RenderObject> visitor)パラメーター
Section titled “パラメーター”visitor Action<RenderObject>