示例#1
0
        public void addAttr(FcaAttribute attr)
        {
            bool contains = false;
            foreach(FcaAttribute o in attribs)
            {
                if (o.getName().Equals(attr.getName()))
                    contains = true;
            }

            if(!contains)
                attribs.Add(attr);
        }
示例#2
0
        public void addAttribute(FcaAttribute attr, FcaObject obj)
        {
            bool contains = false;
            foreach (FcaAttribute at in attributes)
            {
                if (at.getName().Equals(attr.getName()))
                {
                    getObjByName(obj.getName()).addAttr(at);
                    contains = true;
                }
            }

            if (!contains)
            {
                attr.setId(attributes.Count);
                getObjByName(obj.getName()).addAttr(attr);
                attributes.Add(attr);
            }
        }