Condividi tramite


ChainingElementVisitorFilter.ShouldVisitRelationship Method

Definition

Called to ask the filter if a particular relationship from a source element should be included in the traversal.

public:
 virtual Microsoft::VisualStudio::Modeling::VisitorFilterResult ShouldVisitRelationship(Microsoft::VisualStudio::Modeling::ElementWalker ^ walker, Microsoft::VisualStudio::Modeling::ModelElement ^ sourceElement, Microsoft::VisualStudio::Modeling::DomainRoleInfo ^ sourceRoleInfo, Microsoft::VisualStudio::Modeling::DomainRelationshipInfo ^ domainRelationshipInfo, Microsoft::VisualStudio::Modeling::ElementLink ^ targetRelationship);
public Microsoft.VisualStudio.Modeling.VisitorFilterResult ShouldVisitRelationship (Microsoft.VisualStudio.Modeling.ElementWalker walker, Microsoft.VisualStudio.Modeling.ModelElement sourceElement, Microsoft.VisualStudio.Modeling.DomainRoleInfo sourceRoleInfo, Microsoft.VisualStudio.Modeling.DomainRelationshipInfo domainRelationshipInfo, Microsoft.VisualStudio.Modeling.ElementLink targetRelationship);
abstract member ShouldVisitRelationship : Microsoft.VisualStudio.Modeling.ElementWalker * Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.DomainRoleInfo * Microsoft.VisualStudio.Modeling.DomainRelationshipInfo * Microsoft.VisualStudio.Modeling.ElementLink -> Microsoft.VisualStudio.Modeling.VisitorFilterResult
override this.ShouldVisitRelationship : Microsoft.VisualStudio.Modeling.ElementWalker * Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.DomainRoleInfo * Microsoft.VisualStudio.Modeling.DomainRelationshipInfo * Microsoft.VisualStudio.Modeling.ElementLink -> Microsoft.VisualStudio.Modeling.VisitorFilterResult
Public Function ShouldVisitRelationship (walker As ElementWalker, sourceElement As ModelElement, sourceRoleInfo As DomainRoleInfo, domainRelationshipInfo As DomainRelationshipInfo, targetRelationship As ElementLink) As VisitorFilterResult

Parameters

walker
ElementWalker

ElementWalker that is traversing the model

sourceElement
ModelElement

Model Element playing the source role.

sourceRoleInfo
DomainRoleInfo

DomainRoleInfo of the role that the source element is playing in the relationship.

domainRelationshipInfo
DomainRelationshipInfo

DomainRelationshipInfo for the ElementLink in question.

targetRelationship
ElementLink

Relationship in question.

Returns

Yes if the relationship should be traversed, false otherwise.

Implements

Remarks

Walk the chain asking each filter in turn until one returns that it cares. Generally this means that filters shoudl be added in ascending order of specificity.

Applies to