Partager via


DomainRole Class

Definition

DomainClass DomainRole Defines a role of a domain relationship. A relationship has exactly two roles.

public ref class DomainRole sealed : Microsoft::VisualStudio::Modeling::DslDefinition::NamedDomainElement
[Microsoft.VisualStudio.Modeling.Design.DescriptionResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.Description", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")]
[Microsoft.VisualStudio.Modeling.Design.DisplayNameResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.DisplayName", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")]
[Microsoft.VisualStudio.Modeling.DomainModelOwner(typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel))]
[Microsoft.VisualStudio.Modeling.DomainObjectId("c6d5aac1-1499-4882-83a8-7b94de09c984")]
[System.CLSCompliant(true)]
public sealed class DomainRole : Microsoft.VisualStudio.Modeling.DslDefinition.NamedDomainElement
[Microsoft.VisualStudio.Modeling.Design.DescriptionResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.Description", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")]
[Microsoft.VisualStudio.Modeling.Design.DisplayNameResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.DisplayName", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")]
[Microsoft.VisualStudio.Modeling.DomainModelOwner(typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel))]
[Microsoft.VisualStudio.Modeling.DomainObjectId("c6d5aac1-1499-4882-83a8-7b94de09c984")]
[Microsoft.VisualStudio.Modeling.Validation.ValidationState(Microsoft.VisualStudio.Modeling.Validation.ValidationState.Enabled)]
[System.CLSCompliant(true)]
public sealed class DomainRole : Microsoft.VisualStudio.Modeling.DslDefinition.NamedDomainElement
[<Microsoft.VisualStudio.Modeling.Design.DescriptionResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.Description", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")>]
[<Microsoft.VisualStudio.Modeling.Design.DisplayNameResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.DisplayName", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")>]
[<Microsoft.VisualStudio.Modeling.DomainModelOwner(typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel))>]
[<Microsoft.VisualStudio.Modeling.DomainObjectId("c6d5aac1-1499-4882-83a8-7b94de09c984")>]
[<System.CLSCompliant(true)>]
type DomainRole = class
    inherit NamedDomainElement
[<Microsoft.VisualStudio.Modeling.Design.DescriptionResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.Description", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")>]
[<Microsoft.VisualStudio.Modeling.Design.DisplayNameResource("Microsoft.VisualStudio.Modeling.DslDefinition.DomainRole.DisplayName", typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel), "Microsoft.VisualStudio.Modeling.DslDefinition.GeneratedCode.DomainModelResx")>]
[<Microsoft.VisualStudio.Modeling.DomainModelOwner(typeof(Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDomainModel))>]
[<Microsoft.VisualStudio.Modeling.DomainObjectId("c6d5aac1-1499-4882-83a8-7b94de09c984")>]
[<Microsoft.VisualStudio.Modeling.Validation.ValidationState(Microsoft.VisualStudio.Modeling.Validation.ValidationState.Enabled)>]
[<System.CLSCompliant(true)>]
type DomainRole = class
    inherit NamedDomainElement
Public NotInheritable Class DomainRole
Inherits NamedDomainElement
Inheritance
Attributes

Constructors

DomainRole(Partition, PropertyAssignment[])

Constructor

DomainRole(Store, PropertyAssignment[])

Constructor

Fields

CategoryDomainPropertyId

Category domain property Id.

DomainClassId

DomainRole domain class Id.

IsMultiplicityTrackingDomainPropertyId

IsMultiplicityTracking domain property Id.

IsNameTrackingDomainPropertyId

IsNameTracking domain property Id.

IsPropagatesCopyTrackingDomainPropertyId

IsPropagatesCopyTracking domain property Id.

IsPropagatesDeleteTrackingDomainPropertyId

IsPropagatesDeleteTracking domain property Id.

IsPropertyBrowsableDomainPropertyId

IsPropertyBrowsable domain property Id.

IsPropertyDisplayNameTrackingDomainPropertyId

IsPropertyDisplayNameTracking domain property Id.

IsPropertyGeneratorDomainPropertyId

IsPropertyGenerator domain property Id.

IsPropertyNameTrackingDomainPropertyId

IsPropertyNameTracking domain property Id.

IsPropertyUIReadOnlyDomainPropertyId

IsPropertyUIReadOnly domain property Id.

MultiplicityDomainPropertyId

Multiplicity domain property Id.

PropagatesCopyDomainPropertyId

PropagatesCopy domain property Id.

PropagatesDeleteDomainPropertyId

PropagatesDelete domain property Id.

PropertyCustomAttributesDomainPropertyId

PropertyCustomAttributes domain property Id.

PropertyDisplayNameDomainPropertyId

PropertyDisplayName domain property Id.

PropertyGetterAccessModifierDomainPropertyId

PropertyGetterAccessModifier domain property Id.

PropertyNameDomainPropertyId

PropertyName domain property Id.

PropertySetterAccessModifierDomainPropertyId

PropertySetterAccessModifier domain property Id.

Properties

Attributes

Gets a list of Attributes.

(Inherited from AttributedDomainElement)
BaseRole

Gets the base role for this role

Category

Gets or sets the value of Category domain property. Category under which the generated property appears in the properties window.

CollectionType

Gets or sets CollectionType. External type used as the collection type for the generated property from this role.

CustomAttributes

Gets or sets the value of CustomAttributes domain property. Used to attribute the code generated from this element.

(Inherited from AttributedDomainElement)
Description

Gets or sets the value of Description domain property. Used in the UI and in the code documentation of the generated designer.

(Inherited from AttributedDomainElement)
DisplayName

Gets or sets the value of DisplayName domain property. The name that will be displayed in the generated designer for this element.

(Inherited from NamedDomainElement)
HelpKeyword

Gets or sets the value of HelpKeyword domain property. Optional keyword used to index F1 help for this element.

(Inherited from NamedDomainElement)
Id

Unique identifier of this element.

(Inherited from ModelElement)
IsActive

Returns true if the Element is currently active within the model, false if the element has been deleted or is in the process of being deleted.

(Inherited from ModelElement)
IsDeleted

Has the element been deleted from the model. (Deleted elements are not immediately destroyed so that the undo command may undo deleting the element.)

(Inherited from ModelElement)
IsDeleting

Has the element been deleted from the model. (Deleted elements are not immediately destroyed so that the undo command may undo deleting the element.)

(Inherited from ModelElement)
IsDescriptionTracking

Gets or sets the value of IsDescriptionTracking domain property. If True, the Description property tracks other data in the DSL definition.

(Inherited from AttributedDomainElement)
IsDisplayNameTracking

Gets or sets the value of IsDisplayNameTracking domain property. If True, the DisplayName property tracks other data in the DSL definition.

(Inherited from NamedDomainElement)
IsEmbedded

Checks if this role is the target role, and the relationship is an embedding relationship

IsEmbedding

Checks if this role is the source role, and the relationship is an embedding relationship

IsMany

Returns true if the multiplicity of this role is ZeroMany or OneMany.

IsMultiplicityTracking

Gets or sets the value of IsMultiplicityTracking domain property. If True, the Multiplicity property tracks other data in the DSL definition.

IsNameTracking

Gets or sets the value of IsNameTracking domain property. If True, the Name property tracks other data in the DSL definition.

IsPropagatesCopyTracking

Gets or sets the value of IsPropagatesCopyTracking domain property. If True, the PropagatesCopy property tracks other data in the DSL definition.

IsPropagatesDeleteTracking

Gets or sets the value of IsPropagatesDeleteTracking domain property. If True, the PropagatesDelete property tracks other data in the DSL definition.

IsPropertyBrowsable

Gets or sets the value of IsPropertyBrowsable domain property. If True, the generated property is marked as browsable in its corresponding property descriptor. As a result, it can be browsed through the properties window.

IsPropertyDisplayNameTracking

Gets or sets the value of IsPropertyDisplayNameTracking domain property. If True, the PropertyDisplayName property tracks other data in the DSL definition.

IsPropertyGenerator

Gets or sets the value of IsPropertyGenerator domain property. If True, a property on the role player of this role is generated.

IsPropertyNameTracking

Gets or sets the value of IsPropertyNameTracking domain property. If True, the PropertyName property tracks other data in the DSL definition.

IsPropertyUIReadOnly

Gets or sets the value of IsPropertyUIReadOnly domain property. If True, the generated property can not be edited through the UI when browsed.

IsSource

Checks if this role is the source role

Multiplicity

Gets or sets the value of Multiplicity domain property. Constrains the number of links for which an element may play this role. If multiplicity is 0..* or 1..*, the generated property represents a collection.

Name

Gets or sets the value of Name domain property. Name of this element.

(Inherited from NamedDomainElement)
Notes

Gets or sets the value of Notes domain property. Informal notes associated with this element.

(Inherited from DomainElement)
Opposite

The opposite role

Partition

Gets or sets the Partition instance that contains this element.

(Inherited from ModelElement)
PropagatesCopy

Gets or sets the value of PropagatesCopy domain property. If True, an element playing this role in a link is copied when the link is copied.

PropagatesDelete

Gets or sets the value of PropagatesDelete domain property. If True, an element playing this role in a link is deleted when the link is deleted.

PropertyAttributes

Gets a list of PropertyAttributes.

PropertyCustomAttributes

Gets or sets the value of PropertyCustomAttributes domain property. Used to attribute the property generated in the implementation of the role player class

PropertyDisplayName

Gets or sets the value of PropertyDisplayName domain property. The name that will be displayed in the generated designer for the generated property.

PropertyGetterAccessModifier

Gets or sets the value of PropertyGetterAccessModifier domain property. Determines the access modifier for the getter of the generated property.

PropertyName

Gets or sets the value of PropertyName domain property. Name of the generated property.

PropertySetterAccessModifier

Gets or sets the value of PropertySetterAccessModifier domain property. Determines the access modifier for the setter of the generated property.

ProxyIsNameTracking

Virtualized version of IsNameTracking to cope with the fact that derived classes own the IsNameTracking flags

(Inherited from NamedDomainElement)
Relationship

Gets or sets Relationship. Relationship defining the role.

RolePlayer

Gets or sets RolePlayer. Class of element playing this role in the relationship.

Store

Get the Store instance that contains this element.

(Inherited from ModelElement)

Methods

CalculateDescription()

Calculates the value of Description

(Inherited from AttributedDomainElement)
CalculateName()

Calculates the value of Name

(Inherited from NamedDomainElement)
CanMerge(ProtoElementBase, ElementGroupPrototype)

Returns a value indicating whether the source element represented by the specified root ProtoElement can be added to this element.

(Inherited from ModelElement)
ChooseMergeTarget(ElementGroup)

Gets the ModelElement to be used as the target for the ElementGroup merge process.
This is called by the merge process when this element is the target of the merge.
This provides this element with the opportunity to change the target to something other than itself.

(Inherited from ModelElement)
ChooseMergeTarget(ElementGroupPrototype)

Gets the ModelElement to be used as the target for the ElementGroupPrototype merge process.
This is called by the merge process when this element is the target of the merge.
This provides this element with the opportunity to change the target to something other than itself.

(Inherited from ModelElement)
Copy()

Creates a copy of the element in the model.

(Inherited from ModelElement)
Copy(IEnumerable<Guid>)

Creates a copy of the element in the model.

(Inherited from ModelElement)
Delete()

Deletes the element from the model.

(Inherited from ModelElement)
Delete(Guid[])

Deletes the element from the model.

(Inherited from ModelElement)
GetDomainClass()

Gets the most-derived domain class for this element.

(Inherited from ModelElement)
GetRoleCollection<TCollection,TElement>(Guid)

Gets or creates the linked element collection

(Inherited from ModelElement)
MergeConfigure(ElementGroup)

Called by the Merge process to allow this model element to configure itself immediately after the Merge process has related it to the target element.

(Inherited from ModelElement)
MergeDisconnect(ModelElement)

Performs operation opposite to MergeRelate - i.e. disconnects a given element from the current one (removes links created by MergeRelate).

(Inherited from ModelElement)
MergeRelate(ModelElement, ElementGroup)

Called by the Merge process to create a relationship between this target element and the specified source element. Typically, a parent-child relationship is established between the target element (the parent) and the source element (the child), but any relationship can be established.

(Inherited from ModelElement)
OnCopy(ModelElement)

Called when a copy of the element has been created. The method is called on the duplicate element.

(Inherited from ModelElement)
OnDeleted()

Called by the model after the element has been deleted.

(Inherited from ModelElement)
OnDeleting()

Called by the model before the element is deleted.

(Inherited from ModelElement)
OnNameChanged(String, String)

Called when the Name of a NamedDomainElement changes

(Inherited from NamedDomainElement)
OnResurrected()

Called by the model after the element has been resurrected (placed back into the store).

(Inherited from ModelElement)
OnRolePlayerPositionChanged(DomainRoleInfo, ElementLink, Int32, Int32)

Virtual method for notifying when role player position has changed.

(Inherited from ModelElement)
OnRolePlayerPositionChanging(DomainRoleInfo, ElementLink, Int32, Int32)

Virtual method for notifying when role player position will be changing.

(Inherited from ModelElement)

Explicit Interface Implementations

IMergeElements.CanMerge(ProtoElementBase, ElementGroupPrototype) (Inherited from ModelElement)
IMergeElements.ChooseMergeTarget(ElementGroup) (Inherited from ModelElement)
IMergeElements.ChooseMergeTarget(ElementGroupPrototype) (Inherited from ModelElement)
IMergeElements.MergeConfigure(ElementGroup) (Inherited from ModelElement)
IMergeElements.MergeDisconnect(ModelElement) (Inherited from ModelElement)
IMergeElements.MergeRelate(ModelElement, ElementGroup) (Inherited from ModelElement)

Extension Methods

AddExtension(ModelElement, DomainClassInfo)

Extend this ModelElement with a newly instantiated extension of the specified domain type. An InvalidOperationException will be thrown if the element already has an extension of that type.

AddExtension(ModelElement, ExtensionElement)

Extend this ModelElement with a specific extension. An InvalidOperationException will be thrown if the element already has an extension of the same type.

AddExtension(ModelElement, Guid)

Extend this ModelElement with newly instantiated extension of the identified domain type. An InvalidOperationException will be thrown if the element already has an extension of that type.

AddExtension(ModelElement, Type)

Extend this ModelElement with a newly instantiated extension of the specified type. An InvalidOperationException will be thrown if the element already has an extension of that type.

AddExtension<T>(ModelElement)

Extend this ModelElement with a newly instantiated extension of a particular type. An InvalidOperationException will be thrown if the element already has an extension of the same type.

GetAllExtensions(ModelElement)

Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in this ModelElement.

GetBaseElement(ModelElement)

Returns the root of the virtual MEL in which the specified ModelElement is participating.

GetExtension(ModelElement, DomainClassInfo)
GetExtension(ModelElement, Guid)
GetExtension(ModelElement, Type)

Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If the element has no such extension then an InvalidOperationException will be raised.

GetExtension<T>(ModelElement)

Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If the element has no such extension then an InvalidOperationException will be raised.

IsExtendedBy(ModelElement, DomainClassInfo)

Query whether this ModelElement is currently extended by an ExtensionElement of a particular type.

IsExtendedBy(ModelElement, Guid)

Query whether this ModelElement is currently extended by an ExtensionElement of a particular type.

IsExtendedBy(ModelElement, Type)

Query whether this ModelElement is currently extended by an ExtensionElement of a particular type.

RemoveExtension(ModelElement, DomainClassInfo)

Remove any extension of the specified ModelElement that is of a particular type.

RemoveExtension(ModelElement, ExtensionElement)

Remove a specified ExtensionElement from the extensions of this ModelElement.

RemoveExtension(ModelElement, Guid)

Remove any extension of the specified ModelElement that is of a particular type.

RemoveExtension(ModelElement, Type)

Remove any extension of this ModelElement that is of a particular type.

TryGetExtension(ModelElement, DomainClassInfo)
TryGetExtension(ModelElement, Guid)
TryGetExtension(ModelElement, Type)
TryGetExtension<T>(ModelElement)

Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If this element has no such extension then the result will be null.

CanDelete(ModelElement, Guid[])

Deletes the element from the model.

GetLocks(ModelElement)

Get the lock flags for this element. This will include any locks enabled on the Partition containing the element.

IsLocked(ModelElement, Locks)

Test whether this element has any of a specified set of locks

SetLocks(ModelElement, Locks)

Set the lock flags of this element

Applies to