Exemplo n.º 1
0
        public EntityDef InternEntityDef(Token token, Expression atomTypeExpr)
        {
            string    key = token.ToString();
            EntityDef entityDef;

            if (!EntityDictionary.TryGetValue(key, out entityDef))
            {
                entityDef = new EntityDef(token);
                entityDef.AtomTypeExpr = atomTypeExpr;
                EntityDictionary.Add(key, entityDef);
            }
            return(entityDef);
        }
Exemplo n.º 2
0
 public void AddEntityDef(EntityDef entityDef)
 {
     EntityDictionary[entityDef.Token.ToString()] = entityDef;
 }