Esempio n. 1
0
        public DotEdge SetLogicalTail(DotSubGraph value)
        {
            if (value.IsCluster == false)
            {
                throw new InvalidOperationException("This can only be a cluster");
            }

            AttrValues.SetAttribute("ltail", value.SubGraphName.ValueToQuotedLiteral());

            return(this);
        }
Esempio n. 2
0
        internal void GenerateDotCode(DotSubGraph graph)
        {
            if (String.IsNullOrEmpty(graph.SubGraphName) == false)
            {
                TextComposer
                .Append("subgraph ")
                .Append(ToDotId(graph.SubGraphName));
            }

            TextComposer
            .AppendLine()
            .Append("{")
            .IncreaseIndentation();

            foreach (var statement in graph.StatementsList)
            {
                GenerateDotCode(statement);
            }

            TextComposer
            .DecreaseIndentation()
            .AppendLine()
            .Append("}");
        }