Class EdgeDescriptor<TTransition>
Denotes the base class to describe the appearance of transitions
public abstract class EdgeDescriptor<TTransition> : ElementDescriptor<TTransition>
Type Parameters
TTransitionThe semantic element type of the transition
- Inheritance
-
ElementDescriptor<TTransition>EdgeDescriptor<TTransition>
- Derived
- Inherited Members
Constructors
EdgeDescriptor()
Creates a new instance
protected EdgeDescriptor()
Properties
RouterKind
Gets the router kind
protected virtual RouterKind RouterKind { get; }
Property Value
Methods
CalculateTypeHints()
Calculates type hints for this rule
protected override IEnumerable<TypeHint> CalculateTypeHints()
Returns
- IEnumerable<TypeHint>
A collection of type hints
Label(Expression<Func<TTransition, string>>, string, bool, Expression<Func<TTransition, bool>>)
Specifies that a GLabel element should be created under the current node
protected IEdgeLabelSyntax<TTransition> Label(Expression<Func<TTransition, string>> labelSelector, string type = "label", bool canEdit = true, Expression<Func<TTransition, bool>> guard = null)
Parameters
labelSelectorExpression<Func<TTransition, string>>An expression calculating the text of the label
typestringThe GElement type of the label
canEditboolTrue, if the label can be added, otherwise False
guardExpression<Func<TTransition, bool>>An expression to guard the visibility of the label, or null
Returns
- IEdgeLabelSyntax<TTransition>
Remarks
This method is intended to be used inside of DefineLayout()
SourceNode<TSource>(NodeDescriptor<TSource>, Expression<Func<TTransition, TSource>>, bool)
Sets the source of the edge represented by this descriptor
protected void SourceNode<TSource>(NodeDescriptor<TSource> descriptor, Expression<Func<TTransition, TSource>> selector, bool canChangeSource = true)
Parameters
descriptorNodeDescriptor<TSource>The descriptor to describe which source node should be used
selectorExpression<Func<TTransition, TSource>>An expression to calculate the source node from the semantic model of the transition
canChangeSourceboolTrue, if the source element can be changed, otherwise False
Type Parameters
TSourceThe semantic type of the source node
TargetNode<TTarget>(NodeDescriptor<TTarget>, Expression<Func<TTransition, TTarget>>, bool)
Sets the target of the edge represented by this descriptor
protected void TargetNode<TTarget>(NodeDescriptor<TTarget> descriptor, Expression<Func<TTransition, TTarget>> selector, bool canChangeTarget = true)
Parameters
descriptorNodeDescriptor<TTarget>The descriptor to describe which target node should be used
selectorExpression<Func<TTransition, TTarget>>An expression to calculate the target element from the semantic model of the transition
canChangeTargetboolTrue, if the target element can be changed, otherwise False
Type Parameters
TTargetThe semantic type of the target node