Share via


ProtoRolePlayer.CreateRoleAssignment Method

Definition

Creates a RoleAssignment for the rolePlayer in the link that is being created. If the idDictionary does not contain an id for the reconstituted rolePlayer, use the original rolePlayer from which this ProtoRolePlayer was created, if CanUseExistingRolePlayer method returns true.

public:
 Microsoft::VisualStudio::Modeling::RoleAssignment ^ CreateRoleAssignment(System::Collections::Generic::Dictionary<Guid, Guid> ^ idDictionary, Microsoft::VisualStudio::Modeling::Partition ^ partition);
public Microsoft.VisualStudio.Modeling.RoleAssignment CreateRoleAssignment (System.Collections.Generic.Dictionary<Guid,Guid> idDictionary, Microsoft.VisualStudio.Modeling.Partition partition);
member this.CreateRoleAssignment : System.Collections.Generic.Dictionary<Guid, Guid> * Microsoft.VisualStudio.Modeling.Partition -> Microsoft.VisualStudio.Modeling.RoleAssignment
Public Function CreateRoleAssignment (idDictionary As Dictionary(Of Guid, Guid), partition As Partition) As RoleAssignment

Parameters

idDictionary
Dictionary<Guid,Guid>

Map from the original element ID's to the clone element ID's

partition
Partition

The partition in which the link is being created (the source role player's partition)

Returns

RoleAssignment

Exceptions

Thrown if RoleAssignment could not be created.

Applies to