LinkedElementCollection<T> Class
Provides a collection of all elements that are linked to an element.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)
Microsoft.VisualStudio.Modeling::ReadOnlyLinkedElementCollection<T>
Microsoft.VisualStudio.Modeling::LinkedElementCollection<T>
| Name | Description | |
|---|---|---|
![]() | LinkedElementCollection<T>() | Initializes a new instance of the LinkedElementCollection<T> class used for data binding. |
![]() | LinkedElementCollection<T>(ModelElement^, Guid) | Initializes a new instance of the LinkedElementCollection<T> class for a specified element. |
| Name | Description | |
|---|---|---|
![]() | CommittedCount | Gets the actual number of role players in collection (after commit)(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | Count | Gets the number of role players in the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | IntermediateCount | Gets the intermediate number of role players in collection(during commit).(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | Item[Int32] | Gets or sets the role at a specified index in a collection of linked elements. |
![]() | SourceDomainRole | Gets the source role of the relationship that this collection represents.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | SourceElement | Gets the source role player which was inherited by this collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | TargetDomainRole | Gets the target role of the relationship that this collection represents.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | TypeForAddNew |
| Name | Description | |
|---|---|---|
![]() | Add(T) | Appends a new role to the end of the collection. |
![]() | AddNew() | Add and merge in a new element to the collection |
![]() | AddNewCore() | Common implementation of logic to add and merge in a new element to the collection |
![]() | AddRange(IEnumerable<T>^) | Appends a range of elements to the end of the collection. |
![]() | AsReadOnly() | Gets a read-only collection of linked elements. |
![]() | Clear() | Removes all roles from the collection. |
![]() | Contains(T) | Gets whether a specified role player belongs to the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | CopyTo(array<T>^, Int32) | Copies all role players to an array.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Exists(Predicate<T>^) | Determines whether there is at least one element for which a given condition is true.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | Find(Predicate<T>^) | Finds the first element in the collection which matches a given condition.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | FindAll(Predicate<T>^) | Finds all elements which satisfy a given condition.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | FindIndex(Predicate<T>^) | Finds the first element which satisfies a given condition.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | ForEach(Action<T>^) | Runs the specified action on all elements in the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | GetEnumerator() | Gets a strongly-typed enumerator for this collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | 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>.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IndexOf(T) | Gets the index of a role player inside the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | Insert(Int32, T) | Inserts a role into the collection at a specified index. |
![]() | InsertRange(Int32, IEnumerable<T>^) | Inserts a range of elements into the collection at a specific index. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | Move(T, Int32) | Moves a role to a new position inside the collection. |
![]() | Move(Int32, Int32) | Moves a role to a new position inside the collection. |
![]() | Remove(T) | Removes the specified role from the collection. |
![]() | RemoveAt(Int32) | Removes the role at a specified index from the collection. |
![]() | RemoveRange(Int32, Int32) | Removes a range of elements from the collection. |
![]() | ReplaceAt(Int32, T) | Replaces a role at a specified index with a new role. |
![]() | Sort() | Sorts the elements in the collection of element links. |
![]() | Sort(Comparison<T>^) | Sorts the elements in the collection of element links. |
![]() | Sort(IComparer<T>^) | Sorts the elements in the collection of element links. |
![]() | Sort(Int32, Int32, IComparer<T>^) | Sorts a range of elements in the collection of element links. |
![]() | ToArray() | Creates an array and copies all role players in the collection into it.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
![]() | ToString() | (Inherited from Object.) |
![]() | TrueForAll(Predicate<T>^) | Checks if a given condition is true for all elements in the collection.(Inherited from ReadOnlyLinkedElementCollection<T>.) |
| Name | Description | |
|---|---|---|
![]() | listChangedHandler | (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.






