コード例 #1
0
 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();
     }
 }
コード例 #2
0
ファイル: Entity.cs プロジェクト: niello/deusexmachina
 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();
        }
 }
コード例 #3
0
 public AttrPropertyDescriptor(AttrProperty prop, Attribute[] attrs)
     : base(prop.Name, attrs)
 {
     _prop = prop;
 }