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); }
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); }
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; }