Delen via


ReadOnlyLinkedElementCollection<T> Class

Represents a strongly-typed read-only collection of element instances on the opposite side of a relationship.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class ReadOnlyLinkedElementCollection(Of T As ModelElement) _
    Implements IList(Of T), ICollection(Of T),  _
    IEnumerable(Of T), IEnumerable, IList, ICollection, IBindingList,  _
    ITypedList, IRaiseItemChangedEvents, INotifyCollectionChanged, INotifyPropertyChanged
public class ReadOnlyLinkedElementCollection<T> : IList<T>, 
    ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, 
    IBindingList, ITypedList, IRaiseItemChangedEvents, INotifyCollectionChanged, INotifyPropertyChanged 
where T : ModelElement
generic<typename T>
where T : ModelElement 
public ref class ReadOnlyLinkedElementCollection : IList<T>, 
    ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, 
    IBindingList, ITypedList, IRaiseItemChangedEvents, INotifyCollectionChanged, INotifyPropertyChanged
type ReadOnlyLinkedElementCollection<'T when 'T : ModelElement> =  
    class 
        interface IList<'T>
        interface ICollection<'T>
        interface IEnumerable<'T>
        interface IEnumerable 
        interface IList 
        interface ICollection 
        interface IBindingList 
        interface ITypedList 
        interface IRaiseItemChangedEvents 
        interface INotifyCollectionChanged 
        interface INotifyPropertyChanged 
    end
JScript does not support generic types or methods.

Type Parameters

  • T

The ReadOnlyLinkedElementCollection<T> type exposes the following members.

Constructors

  Name Description
Public method ReadOnlyLinkedElementCollection<T> Initializes a new instance of the ReadOnlyLinkedElementCollection class.

Top

Properties

  Name Description
Public property CommittedCount Gets the actual number of role players in collection (after commit)
Public property Count Gets the number of role players in the collection.
Public property IntermediateCount Gets the intermediate number of role players in collection(during commit).
Public property Item Gets or sets the role player at a specified index inside the collection.
Public property SourceDomainRole Gets the source role of the relationship that this collection represents.
Public property SourceElement Gets the source role player which was inherited by this collection.
Public property TargetDomainRole Gets the target role of the relationship that this collection represents.

Top

Methods

  Name Description
Public method Contains Gets whether a specified role player belongs to the collection.
Public method CopyTo Copies all role players to an array.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Exists Determines whether there is at least one element for which a given condition is true.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Find Finds the first element in the collection which matches a given condition.
Public method FindAll Finds all elements which satisfy a given condition.
Public method FindIndex Finds the first element which satisfies a given condition.
Public method ForEach Runs the specified action on all elements in the collection.
Public method GetEnumerator Gets a strongly-typed enumerator for this collection.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Protected method GetItemProperties 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.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IndexOf Gets the index of a role player inside the collection.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToArray Creates an array and copies all role players in the collection into it.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TrueForAll Checks if a given condition is true for all elements in the collection.

Top

Fields

  Name Description
Protected field listChangedHandler

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICollection<T>.Add
Explicit interface implemetationPrivate method IList.Add
Explicit interface implemetationPrivate method IBindingList.AddIndex Adds the specified property to the set used for indexing the collection when it is searched.
Explicit interface implemetationPrivate method IBindingList.AddNew This method is not supported because this is a read-only collection.
Explicit interface implemetationPrivate property IBindingList.AllowEdit
Explicit interface implemetationPrivate property IBindingList.AllowNew
Explicit interface implemetationPrivate property IBindingList.AllowRemove
Explicit interface implemetationPrivate method IBindingList.ApplySort This method is not supported.
Explicit interface implemetationPrivate method ICollection<T>.Clear
Explicit interface implemetationPrivate method IList.Clear
Explicit interface implemetationPrivate event INotifyCollectionChanged.CollectionChanged
Explicit interface implemetationPrivate method IList.Contains
Explicit interface implemetationPrivate method ICollection.CopyTo
Explicit interface implemetationPrivate method IBindingList.Find This method is not supported.
Explicit interface implemetationPrivate method IEnumerable<T>.GetEnumerator
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator
Explicit interface implemetationPrivate method ITypedList.GetItemProperties 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.
Explicit interface implemetationPrivate method ITypedList.GetListName Returns the name of the list.
Explicit interface implemetationPrivate method IList.IndexOf
Explicit interface implemetationPrivate method IList<T>.Insert
Explicit interface implemetationPrivate method IList.Insert
Explicit interface implemetationPrivate property IList.IsFixedSize
Explicit interface implemetationPrivate property ICollection<T>.IsReadOnly
Explicit interface implemetationPrivate property IList.IsReadOnly
Explicit interface implemetationPrivate property IBindingList.IsSorted
Explicit interface implemetationPrivate property ICollection.IsSynchronized
Explicit interface implemetationPrivate property IList.Item
Explicit interface implemetationPrivate event IBindingList.ListChanged ListChanged event
Explicit interface implemetationPrivate event INotifyPropertyChanged.PropertyChanged
Explicit interface implemetationPrivate property IRaiseItemChangedEvents.RaisesItemChangedEvents
Explicit interface implemetationPrivate method ICollection<T>.Remove
Explicit interface implemetationPrivate method IList.Remove
Explicit interface implemetationPrivate method IList<T>.RemoveAt
Explicit interface implemetationPrivate method IList.RemoveAt
Explicit interface implemetationPrivate method IBindingList.RemoveIndex This method is not supported.
Explicit interface implemetationPrivate method IBindingList.RemoveSort This method is not supported.
Explicit interface implemetationPrivate property IBindingList.SortDirection
Explicit interface implemetationPrivate property IBindingList.SortProperty
Explicit interface implemetationPrivate property IBindingList.SupportsChangeNotification
Explicit interface implemetationPrivate property IBindingList.SupportsSearching
Explicit interface implemetationPrivate property IBindingList.SupportsSorting
Explicit interface implemetationPrivate property ICollection.SyncRoot

Top

Remarks

Represents a read-only collection of element instances on the opposite side of the links for a relationship in which a particular element participates.

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace