private static IMetadataScope GetMetadataScope(ModuleDefinition module, TypeParser.Type type_info) { if (string.IsNullOrEmpty(type_info.assembly)) { return(module.TypeSystem.CoreLibrary); } AssemblyNameReference assemblyNameReference = AssemblyNameReference.Parse(type_info.assembly); AssemblyNameReference result; if (!module.TryGetAssemblyNameReference(assemblyNameReference, out result)) { return(assemblyNameReference); } return(result); }