-
Notifications
You must be signed in to change notification settings - Fork 35
T_CodeJam_Collections_OwnedCollection_2
Andrew Koryavchenko edited this page Jun 17, 2018
·
2 revisions
Collection type that allows to associate collection items with the owner.
System.Object
System.Collections.ObjectModel.Collection(TItem)
CodeJam.Collections.OwnedCollectionBase(TOwner, TItem)
CodeJam.Collections.OwnedCollection(TOwner, TItem)
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public class OwnedCollection<TOwner, TItem> : OwnedCollectionBase<TOwner, TItem>
where TOwner : class
where TItem : class
VB
Public Class OwnedCollection(Of TOwner As Class, TItem As Class)
Inherits OwnedCollectionBase(Of TOwner, TItem)
F#
type OwnedCollection<'TOwner, 'TItem when 'TOwner : not struct when 'TItem : not struct> =
class
inherit OwnedCollectionBase<'TOwner, 'TItem>
end
- TOwner
- The type of the owner.
- TItem
- The type of the item.
Name | Description | |
---|---|---|
OwnedCollection(TOwner, TItem) | Initializes a new instance of the OwnedCollection(TOwner, TItem) class. |
Name | Description | |
---|---|---|
Count | Gets the number of elements actually contained in the Collection(T). (Inherited from Collection(TItem).) | |
Item | Gets or sets the element at the specified index. (Inherited from Collection(TItem).) | |
Items | Gets a IList(T) wrapper around the Collection(T). (Inherited from Collection(TItem).) | |
Owner | Gets owner for the collection. (Inherited from OwnedCollectionBase(TOwner, TItem).) |
Name | Description | |
---|---|---|
Add | Adds an object to the end of the Collection(T). (Inherited from Collection(TItem).) | |
Clear | Removes all elements from the Collection(T). (Inherited from Collection(TItem).) | |
ClearItems | Removes all elements from the Collection(T). Clears owner for the items being removed. (Inherited from OwnedCollectionBase(TOwner, TItem).) | |
Contains | Determines whether an element is in the Collection(T). (Inherited from Collection(TItem).) | |
CopyTo | Copies the entire Collection(T) to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from Collection(TItem).) | |
Equals | Determines whether the specified object is equal to the current object. (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 Collection(T). (Inherited from Collection(TItem).) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetOwner | Gets the owner of the item. (Overrides OwnedCollectionBase(TOwner, TItem).GetOwner(TItem).) | |
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 Collection(T). (Inherited from Collection(TItem).) | |
Insert | Inserts an element into the Collection(T) at the specified index. (Inherited from Collection(TItem).) | |
InsertItem | Inserts an element into the Collection(T) at the specified index. Sets owner for the items being added. (Inherited from OwnedCollectionBase(TOwner, TItem).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove | Removes the first occurrence of a specific object from the Collection(T). (Inherited from Collection(TItem).) | |
RemoveAt | Removes the element at the specified index of the Collection(T). (Inherited from Collection(TItem).) | |
RemoveItem | Removes the element at the specified index of the Collection(T). Clears owner for the item being removed. (Inherited from OwnedCollectionBase(TOwner, TItem).) | |
SetItem | Replaces the element at the specified index. Sets owner for the items being added. Clears owner for the item being removed. (Inherited from OwnedCollectionBase(TOwner, TItem).) | |
SetOwner | Sets the owner of the item. (Overrides OwnedCollectionBase(TOwner, TItem).SetOwner(TItem, TOwner).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
CodeJam.Collections Namespace
System.Collections.ObjectModel.Collection(T)