Click or drag to resize
DigitalRuneChildCollectionTParent, TChild Class
Represents a collection of children.
Inheritance Hierarchy
SystemObject
  System.Collections.ObjectModelCollectionTChild
    DigitalRune.CollectionsChildCollectionTParent, TChild
      DigitalRune.AnimationAnimationInstanceCollection
      DigitalRune.Game.UI.ControlsVisualChildCollection
      DigitalRune.Graphics.SceneGraphSceneNodeCollection
      DigitalRune.GraphicsSubmeshCollection
      DigitalRune.GraphicsTerrainTileCollection

Namespace: DigitalRune.Collections
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax
public abstract class ChildCollection<TParent, TChild> : Collection<TChild>
where TParent : class
where TChild : class

Type Parameters

TParent
The type of the parent object.
TChild
The type of the child object.

The ChildCollectionTParent, TChild type exposes the following members.

Constructors
  NameDescription
Protected methodChildCollectionTParent, TChild(TParent)
Initializes a new instance of the ChildCollectionTParent, TChild class.
Protected methodChildCollectionTParent, TChild(TParent, Int32)
Initializes a new instance of the ChildCollectionTParent, TChild class that has the specified initial capacity.
Top
Methods
  NameDescription
Public methodAdd (Inherited from CollectionTChild.)
Public methodClear (Inherited from CollectionTChild.)
Protected methodClearItems
Removes all elements from the collection.
(Overrides CollectionTClearItems.)
Public methodContains (Inherited from CollectionTChild.)
Public methodCopyTo (Inherited from CollectionTChild.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the ChildCollectionTParent, TChild.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetParent
Gets the parent of an object.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf (Inherited from CollectionTChild.)
Public methodInsert (Inherited from CollectionTChild.)
Protected methodInsertItem
Inserts an element into the collection at the specified index.
(Overrides CollectionTInsertItem(Int32, T).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMove
Moves the item at the specified index to a new location in the collection.
Protected methodMoveItem
Moves the item at the specified index to a new location in the collection.
Public methodRemove (Inherited from CollectionTChild.)
Public methodRemoveAt (Inherited from CollectionTChild.)
Protected methodRemoveItem
Removes the element at the specified index of the collection.
(Overrides CollectionTRemoveItem(Int32).)
Protected methodSetItem
Replaces the element at the specified index.
(Overrides CollectionTSetItem(Int32, T).)
Protected methodSetParent
Sets the parent of the given object.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCount (Inherited from CollectionTChild.)
Public propertyItem
Gets or sets the element at the specified index.
(Inherited from CollectionTChild.)
Protected propertyItems (Inherited from CollectionTChild.)
Public propertyParent
Gets (or sets) the parent which owns this child collection.
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIListAdd
Adds an item to the IList.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate methodIListContains
Determines whether the IList contains a specific value.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate methodICollectionCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate methodIEnumerableGetEnumerator
Returns an enumerator that iterates through a collection.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate methodIListIndexOf
Determines the index of a specific item in the IList.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate methodIListInsert
Inserts an item into the IList at the specified index.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate propertyIListIsFixedSize
Gets a value indicating whether the IList has a fixed size.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate propertyICollectionTIsReadOnly (Inherited from CollectionTChild.)
Explicit interface implementationPrivate propertyIListIsReadOnly
Gets a value indicating whether the IList is read-only.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate propertyICollectionIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate propertyIListItem
Gets or sets the element at the specified index.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate methodIListRemove
Removes the first occurrence of a specific object from the IList.
(Inherited from CollectionTChild.)
Explicit interface implementationPrivate propertyICollectionSyncRoot
Gets an object that can be used to synchronize access to the ICollection.
(Inherited from CollectionTChild.)
Top
Remarks

When a new object is added to or removed from the ChildCollectionTParent, TChild the method SetParent(TChild, TParent) is called to set the parent property of the child object.

Duplicates items or are not allowed.

See Also