public EntityTemplate(string uid, Category cat) { Uid = uid; _cat = cat; _attrProps = new List<AttrProperty>(); foreach (var id in _cat.AttrIDs) { var desc = AttrDesc.DescList.ContainsKey(id.Name) ? AttrDesc.DescList[id.Name] : new AttrDesc(); if (desc.InstanceOnly) continue; _attrProps.Add(new AttrProperty(id, desc)); if (id.Name == "GUID") _guidProp = _attrProps.Last(); } }
public Entity(string uid, Category cat, bool existing) { _isExisting = (uid.Length > 0) && existing; _uid = uid; _cat = cat; _attrProps = new List<AttrProperty>(); foreach (var id in _cat.AttrIDs) { AttrDesc desc; if (!AttrDesc.DescList.TryGetValue(id.Name, out desc)) desc = new AttrDesc(); _attrProps.Add(new AttrProperty(id, desc)); if (id.Name == "GUID") _guidProp = _attrProps.Last(); } }
public AttrPropertyDescriptor(AttrProperty prop, Attribute[] attrs) : base(prop.Name, attrs) { _prop = prop; }