Beispiel #1
0
        public ICollection <TypeSymbol> ImportMetadata(ICollection <string> references, SymbolSet symbols)
        {
            Debug.Assert(references != null);
            Debug.Assert(symbols != null);

            _symbols = symbols;

            MetadataSource mdSource      = new MetadataSource();
            bool           hasLoadErrors = mdSource.LoadReferences(references, _errorHandler);

            ICollection <TypeSymbol> importedTypes = null;

            if (hasLoadErrors == false)
            {
                importedTypes = ImportAssemblies(mdSource);
            }

            if (_resolveError)
            {
                return(null);
            }

#if STATIC_ARRAY_EXTENSIONS
            // Update instance members that need to be generated as static methods
            ConvertInstanceMembersToStaticMembers();
#endif // STATIC_ARRAY_EXTENSIONS

            return(importedTypes);
        }
Beispiel #2
0
        public ICollection <TypeSymbol> ImportMetadata(ICollection <string> references, SymbolSet symbols)
        {
            Debug.Assert(references != null);
            Debug.Assert(symbols != null);

            _symbols = symbols;

            MetadataSource mdSource      = new MetadataSource();
            bool           hasLoadErrors = mdSource.LoadReferences(references, _errorHandler);

            ICollection <TypeSymbol> importedTypes = null;

            if (hasLoadErrors == false)
            {
                importedTypes = ImportAssemblies(mdSource);
            }

            if (_resolveError)
            {
                return(null);
            }

            return(importedTypes);
        }
        public ICollection<TypeSymbol> ImportMetadata(ICollection<string> references, SymbolSet symbols)
        {
            Debug.Assert(references != null);
            Debug.Assert(symbols != null);

            _symbols = symbols;

            MetadataSource mdSource = new MetadataSource();
            bool hasLoadErrors = mdSource.LoadReferences(references, _errorHandler);

            ICollection<TypeSymbol> importedTypes = null;
            if (hasLoadErrors == false) {
                importedTypes = ImportAssemblies(mdSource);
            }

            if (_resolveError) {
                return null;
            }

            #if STATIC_ARRAY_EXTENSIONS
                // Update instance members that need to be generated as static methods
                ConvertInstanceMembersToStaticMembers();
            #endif // STATIC_ARRAY_EXTENSIONS

            return importedTypes;
        }