internal DotCodeGenContext Reset(DotGraphType graphType) { TextComposer.Clear(); GraphType = graphType; return(this); }
/// <summary> /// Add a graph to the file with a given name. /// </summary> /// <param name="type">The type of the graph to be added, optional, by default <see cref="DotGraphType.DirectedGraph"/>.</param> /// <param name="name">The name of the graph, optional, by default not effective.</param> public void AddGraph(DotGraphType type = DotGraphType.DirectedGraph, string name = null) { //TODO: cleanup switch (type) { case DotGraphType.DirectedGraph: this.Write(DotVisualUtils.DirectedGraphKeyword); break; case DotGraphType.Graph: this.Write(DotVisualUtils.GraphKeyword); break; } this.Write(DotVisualUtils.TokenSeparator); this.WriteLine(DotVisualUtils.ScopeOpen); this.Indent++; }
internal DotCodeGenContext(DotGraphType graphType) { TextComposer = new LinearComposer(); GraphType = graphType; }
/// <summary> /// Add a graph to the file with a given name. /// </summary> /// <param name="type">The type of the graph to be added, optional, by default <see cref="DotGraphType.DirectedGraph"/>.</param> /// <param name="name">The name of the graph, optional, by default not effective.</param> public void AddGraph(DotGraphType type = DotGraphType.DirectedGraph, string name = null) { //TODO: cleanup switch (type) { case DotGraphType.DirectedGraph: this.Write (DotVisualUtils.DirectedGraphKeyword); break; case DotGraphType.Graph: this.Write (DotVisualUtils.GraphKeyword); break; } this.Write (DotVisualUtils.TokenSeparator); this.WriteLine (DotVisualUtils.ScopeOpen); this.Indent++; }
protected DotGraph(DotGraphType graphType, string graphName) { GraphType = graphType; GraphName = graphName; }