LinkedElementCollection<T> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
Extension Methods
EmptyIfNull<T>(IEnumerable<T>) |
Return this enumeration in case it is not null. In case it is null return empty enumeration. |