コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj is UserDefFunction)
            {
                UserDefFunction other = (UserDefFunction)obj;
                return((this.name == other.name) && (this.parameters == other.parameters) &&
                       (this.codeblock == other.codeblock));
            }

            return(false);
        }
コード例 #2
0
        private static string ToDot(string parent, UserDefFunction node)
        {
            string name = String.Format("FunctionDef{0}", counter++);

            text.AppendFormat("  subgraph cluster_{0}_cond {{ style=dotted; color=lightgrey; label=\"Parameters\";\n", name);
            string parametersName = ToDot(name, node.Parameters);

            text.AppendFormat("  }}\n");

            text.AppendFormat("  subgraph cluster_{0}_true {{ style=dotted; color=lightgrey; label=\"CodeBlock\";\n", name);
            string codeblockName = ToDot(name, node.Codeblock);

            text.AppendFormat("  }}\n");

            text.AppendFormat("  {0} -> {1};\n", name, parametersName);
            text.AppendFormat("  {0} -> {1};\n", name, codeblockName);

            return(name);
        }
コード例 #3
0
        private static string ToDot(string parent, UserDefFunction node)
        {
            string name = String.Format("FunctionDef{0}", counter++);

            text.AppendFormat("  subgraph cluster_{0}_cond {{ style=dotted; color=lightgrey; label=\"Parameters\";\n", name);
            string parametersName = ToDot(name, node.Parameters);
            text.AppendFormat("  }}\n");

            text.AppendFormat("  subgraph cluster_{0}_true {{ style=dotted; color=lightgrey; label=\"CodeBlock\";\n", name);
            string codeblockName = ToDot(name, node.Codeblock);
            text.AppendFormat("  }}\n");

            text.AppendFormat("  {0} -> {1};\n", name, parametersName);
            text.AppendFormat("  {0} -> {1};\n", name, codeblockName);

            return name;
        }