LinkedElementCollection<T> Class

 

Provides a collection of all elements that are linked to an element.

Namespace:   Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

System::Object
  Microsoft.VisualStudio.Modeling::ReadOnlyLinkedElementCollection<T>
    Microsoft.VisualStudio.Modeling::LinkedElementCollection<T>

generic<typename T>
where T : ModelElement
public ref class LinkedElementCollection : ReadOnlyLinkedElementCollection<T>, 
	IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, 
	ICollection, IBindingList

NameDescription
System_CAPS_protmethodLinkedElementCollection<T>()

Initializes a new instance of the LinkedElementCollection<T> class used for data binding.

System_CAPS_pubmethodLinkedElementCollection<T>(ModelElement^, Guid)

Initializes a new instance of the LinkedElementCollection<T> class for a specified element.

NameDescription
System_CAPS_pubpropertyCommittedCount

Gets the actual number of role players in collection (after commit)(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubpropertyCount

Gets the number of role players in the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubpropertyIntermediateCount

Gets the intermediate number of role players in collection(during commit).(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubpropertyItem[Int32]

Gets or sets the role at a specified index in a collection of linked elements.

System_CAPS_pubpropertySourceDomainRole

Gets the source role of the relationship that this collection represents.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubpropertySourceElement

Gets the source role player which was inherited by this collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubpropertyTargetDomainRole

Gets the target role of the relationship that this collection represents.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_protpropertyTypeForAddNew

NameDescription
System_CAPS_pubmethodAdd(T)

Appends a new role to the end of the collection.

System_CAPS_pubmethodAddNew()

Add and merge in a new element to the collection

System_CAPS_protmethodAddNewCore()

Common implementation of logic to add and merge in a new element to the collection

System_CAPS_pubmethodAddRange(IEnumerable<T>^)

Appends a range of elements to the end of the collection.

System_CAPS_pubmethodAsReadOnly()

Gets a read-only collection of linked elements.

System_CAPS_pubmethodClear()

Removes all roles from the collection.

System_CAPS_pubmethodContains(T)

Gets whether a specified role player belongs to the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodCopyTo(array<T>^, Int32)

Copies all role players to an array.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_pubmethodExists(Predicate<T>^)

Determines whether there is at least one element for which a given condition is true.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodFind(Predicate<T>^)

Finds the first element in the collection which matches a given condition.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodFindAll(Predicate<T>^)

Finds all elements which satisfy a given condition.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodFindIndex(Predicate<T>^)

Finds the first element which satisfies a given condition.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodForEach(Action<T>^)

Runs the specified action on all elements in the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodGetEnumerator()

Gets a strongly-typed enumerator for this collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetItemProperties(array<PropertyDescriptor^>^)

Returns a complete set of browsable properties for the item type of the collection. If real items exists in the collection, then replace the reflective ones with IMS ones where possible to allow transacted updates through them.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIndexOf(T)

Gets the index of a role player inside the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodInsert(Int32, T)

Inserts a role into the collection at a specified index.

System_CAPS_pubmethodInsertRange(Int32, IEnumerable<T>^)

Inserts a range of elements into the collection at a specific index.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodMove(T, Int32)

Moves a role to a new position inside the collection.

System_CAPS_pubmethodMove(Int32, Int32)

Moves a role to a new position inside the collection.

System_CAPS_pubmethodRemove(T)

Removes the specified role from the collection.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the role at a specified index from the collection.

System_CAPS_pubmethodRemoveRange(Int32, Int32)

Removes a range of elements from the collection.

System_CAPS_pubmethodReplaceAt(Int32, T)

Replaces a role at a specified index with a new role.

System_CAPS_pubmethodSort()

Sorts the elements in the collection of element links.

System_CAPS_pubmethodSort(Comparison<T>^)

Sorts the elements in the collection of element links.

System_CAPS_pubmethodSort(IComparer<T>^)

Sorts the elements in the collection of element links.

System_CAPS_pubmethodSort(Int32, Int32, IComparer<T>^)

Sorts a range of elements in the collection of element links.

System_CAPS_pubmethodToArray()

Creates an array and copies all role players in the collection into it.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTrueForAll(Predicate<T>^)

Checks if a given condition is true for all elements in the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::Add(T)
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::Clear()
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::Remove(T)
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable<T>::GetEnumerator()
System_CAPS_pubinterfaceSystem_CAPS_privmethodIList<T>::Insert(Int32, T)
System_CAPS_pubinterfaceSystem_CAPS_privmethodIList<T>::RemoveAt(Int32)
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection::CopyTo(Array^, Int32)
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable::GetEnumerator()
System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::Add(Object^)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::Clear()
System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::Contains(Object^)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::IndexOf(Object^)
System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::Insert(Int32, Object^)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::Remove(Object^)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList::RemoveAt(Int32)
System_CAPS_pubinterfaceSystem_CAPS_privmethodIBindingList::AddIndex(PropertyDescriptor^)

Adds the specified property to the set used for indexing the collection when it is searched.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIBindingList::AddNew()

Creates a new element.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIBindingList::ApplySort(PropertyDescriptor^, ListSortDirection)

This method is not supported.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIBindingList::Find(PropertyDescriptor^, Object^)

This method is not supported.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIBindingList::RemoveIndex(PropertyDescriptor^)

This method is not supported.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIBindingList::RemoveSort()

This method is not supported.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodITypedList::GetItemProperties(array<PropertyDescriptor^>^)

Returns a complete set of browsable properties for the item type of the collection. If real items exists in the collection, then replace the reflective ones with IMS ones where possible to allow transacted updates through them.(Inherited from ReadOnlyLinkedElementCollection<T>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodITypedList::GetListName(array<PropertyDescriptor^>^)

Returns the name of the list.(Inherited from ReadOnlyLinkedElementCollection<T>.)

This is a strongly typed collection that refers to the opposite element instances for a relationship in which a particular element participates.

This collection provides navigation to all elements linked to an element.

This example assumes class A can have a multiplicity of class B instances. Also, class A has a property named C that represents elements linked to an instance of A.

// A a;
// B b1, b2, b3;
LinkedElementCollection<B> elementsLinkedToA = a.C;

// If class A has a multiplicity allowing only one B, the property type will be B.
// B elementLinkedToA = a.B;

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: