예제 #1
0
        private PEModuleSymbol(AssemblySymbol assemblySymbol, PEModule module, MetadataImportOptions importOptions, int ordinal)
        {
            Debug.Assert((object)assemblySymbol != null);
            Debug.Assert(module != null);

            _assemblySymbol    = assemblySymbol;
            _ordinal           = ordinal;
            _module            = module;
            this.ImportOptions = importOptions;
            _globalNamespace   = new PEGlobalNamespaceSymbol(this);

            this.MetadataLocation = ImmutableArray.Create <MetadataLocation>(new MetadataLocation(this));
        }
예제 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name">
        /// Name of the namespace, must be not empty.
        /// </param>
        /// <param name="containingNamespace">
        /// Containing namespace.
        /// </param>
        /// <param name="typesByNS">
        /// The sequence of groups of TypeDef row ids for types contained within the namespace,
        /// recursively including those from nested namespaces. The row ids are grouped by the
        /// fully-qualified namespace name case-sensitively. There could be multiple groups
        /// for each fully-qualified namespace name. The groups are sorted by their
        /// key in case-sensitive manner. Empty string is used as namespace name for types
        /// immediately contained within Global namespace. Therefore, all types in this namespace, if any,
        /// will be in several first IGroupings.
        /// </param>
        internal PENestedNamespaceSymbol(
            string name,
            PENamespaceSymbol containingNamespace,
            IEnumerable <IGrouping <string, TypeDefinitionHandle> > typesByNS)
        {
            Debug.Assert(name != null);
            Debug.Assert((object)containingNamespace != null);
            Debug.Assert(typesByNS != null);

            _containingNamespaceSymbol = containingNamespace;
            _name      = name;
            _typesByNS = typesByNS;
        }