public override ArrayListSerialized Trace(NodesCollection c, NodeDescriptor d, string arcName) { arcName = (arcName == null) ? null : arcName.ToLower(); ArrayListSerialized res = new ArrayListSerialized(); int x = arcName.IndexOf(":"); string ns = ""; if (x >= 0) { ns = arcName.Substring(0, x).Trim(); arcName = arcName.Substring(x + 1).Trim(); } if (d.SubNodes == null) d.SubNodes = new ArrayListSerialized(); if (ns == "special") { if (arcName == "functions") { res = Functions(c, d); } else if (arcName == "vars") { res = Vars(c, d); } d.SubNodes.AddRange(res); } return res; }
protected virtual ArrayListSerialized Vars(NodesCollection c, NodeDescriptor d) { ArrayListSerialized res = new ArrayListSerialized(); ILisp l = Lisp.Current; foreach (Symbol s in l.Interpreter.CurrentPackage.ExternalTable.GetSymbols()) { if (s.IsDefined && !(s.GlobalValue is Front.Lisp.Closure)) { NodeDescriptor n = c.GetDescriptor(s.GlobalValue); n.NodePath = s.Name; n.NodeName = s.Name; res.Add(n); c.Add(n); } } foreach (Symbol s in l.Interpreter.CurrentPackage.InternalTable.GetSymbols()) { if (s.IsDefined && !(s.GlobalValue is Front.Lisp.Closure)) { NodeDescriptor n = c.GetDescriptor(s.GlobalValue); n.NodePath = s.Name; n.NodeName = s.Name; res.Add(n); c.Add(n); } } return res; }
public ArrayListSerialized TraceArc(long key, string arkName) { ArrayListSerialized ar = new ArrayListSerialized(); ar = InnerResultNodes.TraceArc(key, arkName); return ar; }
public ArrayListSerialized GetAllChilds(long key) { if (InnerResultNodes.ContainsKey(key)) { ArrayListSerialized ar = InnerResultNodes.GetAllChilds(key); if (ar == null) return null; ArrayListSerialized arKeys = new ArrayListSerialized(); foreach (object node in ar){ arKeys.Add (((NodeDescriptor) node).Key); } return arKeys; } else { return null; } }
public override ArrayListSerialized Trace(NodesCollection c, NodeDescriptor d, string arcName) { arcName = (arcName == null) ? null : arcName.ToLower(); ArrayListSerialized res = new ArrayListSerialized(); int x = arcName.IndexOf(":"); string ns = ""; if (x >= 0) { ns = arcName.Substring(0, x).Trim(); arcName = arcName.Substring(x + 1).Trim(); } if (ns == "special") { if (arcName == "subnodes") { // TODO: рефлектим на запчасти! res = SubNodes(c, d); } } else { if (ns == "") { // TODO: ищем Member'ы c именем arcName } else { // TODO: пока ничего... потом придумаем :-) } } return res; }
public override ArrayListSerialized Trace(NodesCollection c, NodeDescriptor d, string arcName) { ArrayListSerialized res = new ArrayListSerialized(); return res; }