ReadOnlyLinkedElementCollection<T> Class

Definition

Read-only 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 ReadOnlyLinkedElementCollection : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList, System::Collections::Specialized::INotifyCollectionChanged, System::ComponentModel::IBindingList, System::ComponentModel::INotifyPropertyChanged, System::ComponentModel::IRaiseItemChangedEvents, System::ComponentModel::ITypedList
[System.Diagnostics.DebuggerDisplay("Count = {Count}, {targetRole.oppositeDomainRole.Name,nq}->{targetRole.Name,nq}")]
[System.Diagnostics.DebuggerTypeProxy(typeof(Microsoft.VisualStudio.Modeling.ReadOnlyLinkedElementCollection<>+DebugView))]
public class ReadOnlyLinkedElementCollection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.IBindingList, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.IRaiseItemChangedEvents, System.ComponentModel.ITypedList where T : ModelElement
[<System.Diagnostics.DebuggerDisplay("Count = {Count}, {targetRole.oppositeDomainRole.Name,nq}->{targetRole.Name,nq}")>]
[<System.Diagnostics.DebuggerTypeProxy(typeof(Microsoft.VisualStudio.Modeling.ReadOnlyLinkedElementCollection<>+DebugView))>]
type ReadOnlyLinkedElementCollection<'T (requires 'T :> ModelElement)> = class
    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
    interface ITypedList
    interface IRaiseItemChangedEvents
    interface INotifyCollectionChanged
    interface INotifyPropertyChanged
Public Class ReadOnlyLinkedElementCollection(Of T)
Implements IBindingList, ICollection(Of T), IEnumerable(Of T), IList, IList(Of T), INotifyCollectionChanged, INotifyPropertyChanged, IRaiseItemChangedEvents, ITypedList

Type Parameters

T

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

Inheritance
ReadOnlyLinkedElementCollection<T>
Derived
Attributes
Implements

Constructors

ReadOnlyLinkedElementCollection<T>(ModelElement, Guid)

Creates an instance of the LinkedElementCollection class.

Fields

listChangedHandler

Properties

CommittedCount

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

Count

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

IntermediateCount

Gets the intermediate number of role players in collection(during commit).

Item[Int32]

Gets or sets role player at specified index inside collection.

SourceDomainRole

Gets source role of the relationship this collection represents.

SourceElement

Gets the source role player which originates this collection.

TargetDomainRole

Gets taregt role of the relationship this collection represents.

Methods

Contains(T)

Gets whether a specified role player belongs to the collection.

CopyTo(T[], Int32)

Copies all role players to the given array.

Exists(Predicate<T>)

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

Find(Predicate<T>)

Finds first element in collection which matches given condition.

FindAll(Predicate<T>)

Finds all elements which satisfy a given condition.

FindIndex(Predicate<T>)

Finds first element which satisfies a given condition.

ForEach(Action<T>)

Runs specified action on all elements in collection.

GetEnumerator()

Gets strongly-typed enumerator for this collection.

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.

IndexOf(T)

Gets the index of a role player inside collection.

ToArray()

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

TrueForAll(Predicate<T>)

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

Explicit Interface Implementations

IBindingList.AddIndex(PropertyDescriptor)

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

IBindingList.AddNew()

This method is not supported because this is a read-only collection.

IBindingList.AllowEdit

This method is not supported because this is a read-only collection.

IBindingList.AllowNew

Returns false because the collection does not support adding new elements.

IBindingList.AllowRemove

Returns false because the collection does not support removal of items.

IBindingList.ApplySort(PropertyDescriptor, ListSortDirection)

This method is not supported.

IBindingList.Find(PropertyDescriptor, Object)

This method is not supported.

IBindingList.IsSorted

Sorting is not supported.

IBindingList.ListChanged
IBindingList.RemoveIndex(PropertyDescriptor)

This method is not supported.

IBindingList.RemoveSort()

This method is not supported.

IBindingList.SortDirection

Sorting is not supported.

IBindingList.SortProperty

This collection does not support sorting.

IBindingList.SupportsChangeNotification

This collection does not support ListChange events

IBindingList.SupportsSearching

This collection does not support seaching.

IBindingList.SupportsSorting

This collection does not support sorting.

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

This collection does not raise ItemChange events from its members.

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.

ITypedList.GetListName(PropertyDescriptor[])

Returns the name of the list.

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Applies to