private MetadataTypeCatalog CreateTypeCatalog()
 {
     if (this._assembly == null)
     {
         return(MetadataTypeCatalog.Create(this._codeBase, _definitionOrigin));
     }
     else
     {
         return(MetadataTypeCatalog.Create(this.Assembly, _definitionOrigin));
     }
 }
Beispiel #2
0
        private IEnumerable <MemberInfo> GetDeclaredOnlyImportMembers(Type type, out bool shouldBreak)
        {
            shouldBreak = false;

            if (type.IsGenericType)
            {
                type = type.GetGenericTypeDefinition();
            }

            var metadata         = metadataInfo;
            var assemblyFullName = type.Assembly.FullName;

            if (assemblyFullName != metadataInfo.AssemblyFullName)
            {
                metadata = MetadataTypeCatalog.GetOrCreateMetadataInfoByAssemblyFullName(assemblyFullName);
                if (metadata == null)
                {
                    shouldBreak = true;
                    return(Enumerable.Empty <MemberInfo>());
                }
            }

            return(metadata.GetImportedMembers(type));
        }