Exemplo n.º 1
0
        protected void resolve_help(string listname)
        {
            var info = this.get_info(listname);

            if (null != info)
            {
                info.get(out Queue <string> name_list);
                foreach (var name in name_list)
                {
                    doc_spec item = (doc_spec)(doc_list.get(name));
                    if (null != item)
                    {
                        if ("parent_spec" == listname)
                        {
                            no_duplicate_add(ref this.parents, item);
                            no_duplicate_add(ref item.children, this);
                        }
                        else if ("child_spec" == listname)
                        {
                            no_duplicate_add(ref this.children, item);
                            no_duplicate_add(ref item.parents, this);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        public static void create(string uniq_id, string doc_type, Queue <string> category_info = null)
        {
            doc_list.remove(uniq_id);
            doc doc_instance = null;

            if (doc_type == "spec")
            {
                doc_instance = new doc_spec(uniq_id, doc_type);
            }
            else
            {
                doc_instance = new doc(uniq_id, doc_type);
            }
            doc_instance.category_info = category_info;
            doc_list.add(doc_instance);
        }