ModelElement.GetRoleCollection Method

Definition

Overloads

GetRoleCollection<TCollection,TElement>(Guid)

Gets or creates the linked element collection

GetRoleCollection<TCollection,TElement>(ModelElement, Guid)

Gets or creates the linked element collection

GetRoleCollection<TCollection,TElement>(Guid)

Gets or creates the linked element collection

C++
protected:
generic <typename TCollection, typename TElement>
 where TCollection : Microsoft::VisualStudio::Modeling::ReadOnlyLinkedElementCollection<TElement> where TElement : Microsoft::VisualStudio::Modeling::ModelElement TCollection GetRoleCollection(Guid domainRoleId);

Type Parameters

TCollection

The collection type to instanciate

TElement

The type for each of the elements in the collection

Parameters

domainRoleId
Guid

The role id

Returns

TCollection

A linked element collection using the source role id domainRoleId

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2017, 2019, 2022

GetRoleCollection<TCollection,TElement>(ModelElement, Guid)

Gets or creates the linked element collection

C++
protected:
generic <typename TCollection, typename TElement>
 where TCollection : Microsoft::VisualStudio::Modeling::ReadOnlyLinkedElementCollection<TElement> where TElement : Microsoft::VisualStudio::Modeling::ModelElement static TCollection GetRoleCollection(Microsoft::VisualStudio::Modeling::ModelElement ^ modelElement, Guid domainRoleId);

Type Parameters

TCollection

The collection type to instanciate

TElement

The type for each of the elements in the collection

Parameters

modelElement
ModelElement

The source role player

domainRoleId
Guid

The role id

Returns

TCollection

A linked element collection using the source role player as modelElement

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2017, 2019, 2022