-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdvanced Use of TSL Attribute
26 lines (24 loc) · 1.48 KB
/
Advanced Use of TSL Attribute
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// TSL cell structs
[HyperGraphNode]
cell struct UIShellViewModelKnowledgeInfoSet
{
Guid StateId;
string StateName;
[HyperEdge: isPartOfAggergation<UIShellRegistrationInfoSet>]
CellId ShellRegistrationInfoSet;
[HyperEdge: isPartOfAggergation<UIViewModelRegistrationInfoSet>]
CellId ViewModelRegistrationInfoSet;
[MultiGraphEdge: isPartOfAggergation<UIShellCommandInfoSet>]
CellId ShellCommandInfoSet;
[MultiGraphEdge: isPartOfAggergation<ShellViewModelRelationship>]
List<ShellViewModelRelationship> ShellViewModelRelationships; // Add the relationships to the cell struct
}
Using the TSL attribute to convey meta-information and meta-meaning to the edges in your model. By using the
[MultiGraphEdge: isPartOfAggergation<ShellViewModelRelationship>] attribute, you are indicating that the edge
can represent a multigraph with self-cycles. This allows for a more expressive and flexible representation of
relationships in your data model.
In this case, the edge can have multiple connections between the same pair of nodes, as well as self-cycles,
which are connections from a node to itself. By using the isPartOfAggergation<ShellViewModelRelationship>
attribute, you are also expressing that the edge is part of an aggregation of ShellViewModelRelationship entities.
This design enhances the expressiveness and richness of the relationships you can represent in your data model,
allowing for a more accurate and comprehensive representation of complex relationships.