private static IDictionary <string, IDiagramGraph> CreateDiagramGraphsByRelationshipTransitivityGroup(
     [NotNull] IModelRelationshipFeatureProvider modelRelationshipFeatureProvider,
     [NotNull][ItemNotNull] IImmutableSet <IDiagramNode> nodes,
     [NotNull][ItemNotNull] IImmutableSet <IDiagramConnector> connectors)
 {
     return(connectors.GroupBy(i => modelRelationshipFeatureProvider.GetTransitivityPartitionKey(i.ModelRelationship.Stereotype))
            .ToDictionary(i => i.Key, i => DiagramGraph.Create(nodes, i.ToImmutableHashSet())));
 }
示例#2
0
        private Diagram(
            [NotNull] ILayoutGroup rootLayoutGroup,
            [NotNull] IImmutableDictionary <ModelRelationshipId, IDiagramConnector> crossLayoutGroupConnectors)
        {
            RootLayoutGroup             = rootLayoutGroup;
            _crossLayoutGroupConnectors = crossLayoutGroupConnectors;

            Nodes           = RootLayoutGroup.NodesRecursive;
            Connectors      = RootLayoutGroup.ConnectorsRecursive.Union(CrossLayoutGroupConnectors);
            _allShapesGraph = DiagramGraph.Create(Nodes, Connectors);
        }
示例#3
0
 private Diagram(
     [NotNull] IModel model,
     [NotNull] IImmutableDictionary <ModelNodeId, IDiagramNode> nodes,
     [NotNull] IImmutableDictionary <ModelRelationshipId, IDiagramConnector> connectors)
 {
     Model           = model;
     _nodes          = nodes;
     _connectors     = connectors;
     Nodes           = nodes.Values.ToImmutableHashSet();
     Connectors      = connectors.Values.ToImmutableHashSet();
     Rect            = CalculateRect();
     _allShapesGraph = DiagramGraph.Create(Nodes, Connectors);
 }