示例#1
0
        /// <summary>
        /// Формирует программу на языке DOT
        /// </summary>
        /// <param name="subGraph"></param>
        /// <returns></returns>
        public string Generate(SubGraph subGraph)
        {
            Graph g;

            if (subGraph is Graph)
            {
                g = (Graph)subGraph;
            }
            else
            {
                g = new Graph();
                g.AddSubGraph(subGraph);
            }
            return(GraphRender.Create(g).GenerateGraphScript());
        }
示例#2
0
        /// <summary>
        /// Возвращает скрипт графа на целевом языке
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public string GenerateGraphScript(GraphOptions parameters)
        {
            var render = GraphRender.Create(this, parameters);

            return(render.GenerateGraphScript(parameters));
        }