Exemplo n.º 1
0
 public EntityCacheItem(CkTypeInfo ckTypeInfo)
 {
     CkId                 = ckTypeInfo.CkId;
     IsFinal              = ckTypeInfo.IsFinal;
     IsAbstract           = ckTypeInfo.IsAbstract;
     ScopeId              = ckTypeInfo.ScopeId;
     DerivedTypes         = new List <EntityCacheItem>();
     Attributes           = new Dictionary <string, AttributeCacheItem>();
     TextSearchLanguages  = new List <TextSearchLanguageCacheItem>();
     OutboundAssociations = new Dictionary <string, List <AssociationCacheItem> >();
     InboundAssociations  = new Dictionary <string, List <AssociationCacheItem> >();
 }
Exemplo n.º 2
0
        private void BuildInheritanceGraph(CkTypeInfo ckTypeInfo, EntityCacheItem entityCacheItem)
        {
            Logger.Debug($"Building inheritance graph '{entityCacheItem.CkId}'");

            foreach (var ckBaseTypeInfo in ckTypeInfo.BaseTypes)
            {
                if (ckBaseTypeInfo.OriginCkId == entityCacheItem.CkId)
                {
                    continue;
                }

                Logger.Debug($"Building inheritance graph '{entityCacheItem.CkId}', base type {ckBaseTypeInfo.OriginCkId}");
                var baseType = _metaCache[ckBaseTypeInfo.OriginCkId];
                if (ckBaseTypeInfo.TargetCkId == entityCacheItem.CkId)
                {
                    entityCacheItem.BaseType = baseType;
                }

                baseType.DerivedTypes.Add(entityCacheItem);
            }
        }