LinkedElementCollection<T> Class

Definition

Strongly typed collection for storing opposite element instances for a relationship in which a particular element participates.

generic <typename T>
 where T : ModelElementpublic ref class LinkedElementCollection : Microsoft::VisualStudio::Modeling::ReadOnlyLinkedElementCollection<T>, System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList, System::ComponentModel::IBindingList
public class LinkedElementCollection<T> : Microsoft.VisualStudio.Modeling.ReadOnlyLinkedElementCollection<T>, System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList, System.ComponentModel.IBindingList where T : ModelElement
type LinkedElementCollection<'T (requires 'T :> ModelElement)> = class
    inherit ReadOnlyLinkedElementCollection<'T (requires 'T :> ModelElement)>
    interface IList<'T (requires 'T :> ModelElement)>
    interface ICollection<'T (requires 'T :> ModelElement)>
    interface seq<'T (requires 'T :> ModelElement)>
    interface IEnumerable
    interface IList
    interface ICollection
    interface IBindingList
Public Class LinkedElementCollection(Of T)
Inherits ReadOnlyLinkedElementCollection(Of T)
Implements IBindingList, ICollection(Of T), IEnumerable(Of T), IList, IList(Of T)

Type Parameters

T

Type type of target (opposite) element of domain relationship.

Inheritance
LinkedElementCollection<T>
Implements

Constructors

LinkedElementCollection<T>()

Protected constructor to be used for data binding.

LinkedElementCollection<T>(ModelElement, Guid)

Creates an instance of the LinkedElementCollection class.

Fields

listChangedHandler (Inherited from ReadOnlyLinkedElementCollection<T>)

Properties

CommittedCount

Gets the actual number of role players in collection (after commit)

(Inherited from ReadOnlyLinkedElementCollection<T>)
Count

During the collection notification returns the intermediate count, otherwise returns the commited count.

(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 role player at specified index inside collection.

SourceDomainRole

Gets source role of the relationship this collection represents.

(Inherited from ReadOnlyLinkedElementCollection<T>)
SourceElement

Gets the source role player which originates this collection.

(Inherited from ReadOnlyLinkedElementCollection<T>)
TargetDomainRole

Gets taregt role of the relationship this collection represents.

(Inherited from ReadOnlyLinkedElementCollection<T>)
TypeForAddNew

Override point for changing the type which AddNew creates.

Methods

Add(T)

Appends a new role player to the end of 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 collection.

AsReadOnly()

Gets a read-only collection synchronized to this one.

Clear()

Removes all role players from collection.

Contains(T)

Gets whether a specified role player belongs to the collection.

(Inherited from ReadOnlyLinkedElementCollection<T>)
CopyTo(T[], Int32)

Copies all role players to the given array.

(Inherited from ReadOnlyLinkedElementCollection<T>)
Exists(Predicate<T>)

Returns true if there's at least one element for which a given condition is true.

(Inherited from ReadOnlyLinkedElementCollection<T>)
Find(Predicate<T>)

Finds first element in collection which matches 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 first element which satisfies a given condition.

(Inherited from ReadOnlyLinkedElementCollection<T>)
ForEach(Action<T>)

Runs specified action on all elements in collection.

(Inherited from ReadOnlyLinkedElementCollection<T>)
GetEnumerator()

Gets strongly-typed enumerator for this collection.

(Inherited from ReadOnlyLinkedElementCollection<T>)
GetItemProperties(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>)
IndexOf(T)

Gets the index of a role player inside collection.

(Inherited from ReadOnlyLinkedElementCollection<T>)
Insert(Int32, T)

Inserts role player into collection at specified index.

InsertRange(Int32, IEnumerable<T>)

Inserts a range of elements into collection at given index.

Move(Int32, Int32)

Moves role player to a new position inside the collection.

Move(T, Int32)

Moves role player to a new position inside the collection.

Remove(T)

Removes specified role player from collection.

RemoveAt(Int32)

Removes role player at specified index from collection.

RemoveRange(Int32, Int32)

Removes a range of elements from collection.

ReplaceAt(Int32, T)

Replaces a role player at specified index with the given one.

Sort()

Sorts the elements in the entire linked element collection.

Sort(Comparison<T>)

Sorts the elements in the entire linked element collection using the specified System.Comparison<T>.

Sort(IComparer<T>)

Sorts the elements in the entire linked element collection using the specified comparer.

Sort(Int32, Int32, IComparer<T>)

Sorts the elements in a range of the linked element collection using the specified comparer.

ToArray()

Creates an array and copies all role players in collection into it.

(Inherited from ReadOnlyLinkedElementCollection<T>)
TrueForAll(Predicate<T>)

Retursn true if a given condition is true for all elements in collection.

(Inherited from ReadOnlyLinkedElementCollection<T>)

Explicit Interface Implementations

IBindingList.AddIndex(PropertyDescriptor)

Adds the specified property to the set used for indexing the collection when it is searched.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.AddNew()

Creates a new element.

IBindingList.AllowEdit

Returns true because the collection supports modification of the elements in the collection.

IBindingList.AllowNew

Returns true because the collection supports adding new elements.

IBindingList.AllowRemove

Returns true because the collection supports removal of elements.

IBindingList.ApplySort(PropertyDescriptor, ListSortDirection)

This method is not supported.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.Find(PropertyDescriptor, Object)

This method is not supported.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.IsSorted

Sorting is not supported.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.ListChanged
IBindingList.RemoveIndex(PropertyDescriptor)

This method is not supported.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.RemoveSort()

This method is not supported.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.SortDirection

Sorting is not supported.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.SortProperty

This collection does not support sorting.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.SupportsChangeNotification

Returns true because the collection supports change notification

IBindingList.SupportsSearching

This collection does not support seaching.

(Inherited from ReadOnlyLinkedElementCollection<T>)
IBindingList.SupportsSorting

This collection does not support sorting.

(Inherited from ReadOnlyLinkedElementCollection<T>)
ICollection.CopyTo(Array, Int32) (Inherited from ReadOnlyLinkedElementCollection<T>)
ICollection.IsSynchronized (Inherited from ReadOnlyLinkedElementCollection<T>)
ICollection.SyncRoot (Inherited from ReadOnlyLinkedElementCollection<T>)
ICollection<T>.Add(T) (Inherited from ReadOnlyLinkedElementCollection<T>)
ICollection<T>.Clear() (Inherited from ReadOnlyLinkedElementCollection<T>)
ICollection<T>.IsReadOnly
ICollection<T>.Remove(T) (Inherited from ReadOnlyLinkedElementCollection<T>)
IEnumerable.GetEnumerator() (Inherited from ReadOnlyLinkedElementCollection<T>)
IEnumerable<T>.GetEnumerator() (Inherited from ReadOnlyLinkedElementCollection<T>)
IList.Add(Object)
IList.Clear() (Inherited from ReadOnlyLinkedElementCollection<T>)
IList.Contains(Object)
IList.IndexOf(Object) (Inherited from ReadOnlyLinkedElementCollection<T>)
IList.Insert(Int32, Object)
IList.IsFixedSize (Inherited from ReadOnlyLinkedElementCollection<T>)
IList.IsReadOnly
IList.Item[Int32]
IList.Remove(Object)
IList.RemoveAt(Int32) (Inherited from ReadOnlyLinkedElementCollection<T>)
IList<T>.Insert(Int32, T) (Inherited from ReadOnlyLinkedElementCollection<T>)
IList<T>.RemoveAt(Int32) (Inherited from ReadOnlyLinkedElementCollection<T>)
INotifyCollectionChanged.CollectionChanged (Inherited from ReadOnlyLinkedElementCollection<T>)
INotifyPropertyChanged.PropertyChanged (Inherited from ReadOnlyLinkedElementCollection<T>)
IRaiseItemChangedEvents.RaisesItemChangedEvents

This collection does not raise ItemChange events from its members.

(Inherited from ReadOnlyLinkedElementCollection<T>)
ITypedList.GetItemProperties(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>)
ITypedList.GetListName(PropertyDescriptor[])

Returns the name of the list.

(Inherited from ReadOnlyLinkedElementCollection<T>)

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Applies to