ChildCollectionTParent, TChild Class |
Namespace: DigitalRune.Collections
public abstract class ChildCollection<TParent, TChild> : Collection<TChild> where TParent : class where TChild : class
The ChildCollectionTParent, TChild type exposes the following members.
Name | Description | |
---|---|---|
ChildCollectionTParent, TChild(TParent) |
Initializes a new instance of the ChildCollectionTParent, TChild class.
| |
ChildCollectionTParent, TChild(TParent, Int32) |
Initializes a new instance of the ChildCollectionTParent, TChild class that
has the specified initial capacity.
|
Name | Description | |
---|---|---|
Add | Adds an object to the end of the CollectionT. (Inherited from CollectionTChild.) | |
Clear | Removes all elements from the CollectionT. (Inherited from CollectionTChild.) | |
ClearItems |
Removes all elements from the collection.
(Overrides CollectionTClearItems.) | |
Contains | Determines whether an element is in the CollectionT. (Inherited from CollectionTChild.) | |
CopyTo | Copies the entire CollectionT to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from CollectionTChild.) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator |
Returns an enumerator that iterates through the ChildCollectionTParent, TChild.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetParent |
Gets the parent of an object.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf | Searches for the specified object and returns the zero-based index of the first occurrence within the entire CollectionT. (Inherited from CollectionTChild.) | |
Insert | Inserts an element into the CollectionT at the specified index. (Inherited from CollectionTChild.) | |
InsertItem |
Inserts an element into the collection at the specified index.
(Overrides CollectionTInsertItem(Int32, T).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Move |
Moves the item at the specified index to a new location in the collection.
| |
MoveItem |
Moves the item at the specified index to a new location in the collection.
| |
Remove | Removes the first occurrence of a specific object from the CollectionT. (Inherited from CollectionTChild.) | |
RemoveAt | Removes the element at the specified index of the CollectionT. (Inherited from CollectionTChild.) | |
RemoveItem |
Removes the element at the specified index of the collection.
(Overrides CollectionTRemoveItem(Int32).) | |
SetItem |
Replaces the element at the specified index.
(Overrides CollectionTSetItem(Int32, T).) | |
SetParent |
Sets the parent of the given object.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Count | Gets the number of elements actually contained in the CollectionT. (Inherited from CollectionTChild.) | |
Item | Gets or sets the element at the specified index. (Inherited from CollectionTChild.) | |
Items | Gets a IListT wrapper around the CollectionT. (Inherited from CollectionTChild.) | |
Parent |
Gets (or sets) the parent which owns this child collection.
|
Name | Description | |
---|---|---|
IListAdd | Adds an item to the IList. (Inherited from CollectionTChild.) | |
IListContains | Determines whether the IList contains a specific value. (Inherited from CollectionTChild.) | |
ICollectionCopyTo | (Inherited from CollectionTChild.) | |
IEnumerableGetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from CollectionTChild.) | |
IListIndexOf | Determines the index of a specific item in the IList. (Inherited from CollectionTChild.) | |
IListInsert | Inserts an item into the IList at the specified index. (Inherited from CollectionTChild.) | |
IListIsFixedSize | Gets a value indicating whether the IList has a fixed size. (Inherited from CollectionTChild.) | |
ICollectionTIsReadOnly | Gets a value indicating whether the ICollectionT is read-only. (Inherited from CollectionTChild.) | |
IListIsReadOnly | Gets a value indicating whether the IList is read-only. (Inherited from CollectionTChild.) | |
ICollectionIsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from CollectionTChild.) | |
IListItem | Gets or sets the element at the specified index. (Inherited from CollectionTChild.) | |
IListRemove | Removes the first occurrence of a specific object from the IList. (Inherited from CollectionTChild.) | |
ICollectionSyncRoot | Gets an object that can be used to synchronize access to the ICollection. (Inherited from CollectionTChild.) |
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.