public override ImmutableArray <Symbol> GetMembers()
 {
     if (_lazyMembers.IsDefault)
     {
         HashSet <Symbol> symbols = new HashSet <Symbol>();
         try
         {
             foreach (var model in _module.Models)
             {
                 foreach (var ms in model.Objects)
                 {
                     if (ms.MParent == null)
                     {
                         var symbol = MetaSymbolMap.GetSymbol(ms);
                         symbols.Add(symbol);
                     }
                 }
             }
         }
         finally
         {
             ImmutableInterlocked.InterlockedInitialize(ref _lazyMembers, symbols.ToImmutableArray());
         }
     }
     return(_lazyMembers);
 }
Пример #2
0
 public MetaModuleSymbol(AssemblySymbol owningAssembly, ImmutableModelGroup modelGroup, int ordinal)
 {
     _owningAssembly = owningAssembly;
     _models         = modelGroup.Models.ToImmutableArray();
     _ordinal        = ordinal;
     _symbolMap      = new MetaSymbolMap(this);
 }
Пример #3
0
 public MetaModuleSymbol(AssemblySymbol owningAssembly, ImmutableArray <ImmutableModel> models, int ordinal)
 {
     _owningAssembly = owningAssembly;
     _models         = models;
     _ordinal        = ordinal;
     _symbolMap      = new MetaSymbolMap(this);
 }
Пример #4
0
 public override ImmutableArray <NamedTypeSymbol> GetTypeMembers()
 {
     if (_lazyTypeMembers.IsDefault)
     {
         ImmutableInterlocked.InterlockedInitialize(ref _lazyTypeMembers, MetaSymbolMap.GetNamedTypeSymbols(_metaObject.MChildren.Where(child => child.MId.Descriptor.IsNamedType)));
     }
     return(_lazyTypeMembers);
 }
Пример #5
0
 public override ImmutableArray <Symbol> GetMembers()
 {
     if (_lazyMembers.IsDefault)
     {
         ImmutableInterlocked.InterlockedInitialize(ref _lazyMembers, MetaSymbolMap.GetSymbols(_metaObject.MChildren));
     }
     return(_lazyMembers);
 }
Пример #6
0
        public override ImmutableArray <NamedTypeSymbol> GetDeclaredBaseTypes(ConsList <TypeSymbol> basesBeingResolved)
        {
            var result = ArrayBuilder <NamedTypeSymbol> .GetInstance();

            foreach (var prop in _metaObject.MProperties.Where(p => p.IsBaseScope))
            {
                foreach (var baseType in (IEnumerable <IModelObject>)_metaObject.MGet(prop))
                {
                    result.Add(MetaSymbolMap.GetNamedTypeSymbol(baseType));
                }
            }
            return(result.ToImmutableAndFree());
        }