提交 2a459c4f 编写于 作者: K Kevin Halverson

Merge pull request #1215 from KevinH-MS/master

Small optimization for ModuleMetadata matching...
...@@ -129,6 +129,8 @@ private static PortableExecutableReference MakeAssemblyMetadata(ModuleMetadata m ...@@ -129,6 +129,8 @@ private static PortableExecutableReference MakeAssemblyMetadata(ModuleMetadata m
foreach (var handle in reader.AssemblyFiles) foreach (var handle in reader.AssemblyFiles)
{ {
var assemblyFile = reader.GetAssemblyFile(handle); var assemblyFile = reader.GetAssemblyFile(handle);
if (assemblyFile.ContainsMetadata)
{
var name = reader.GetString(assemblyFile.Name); var name = reader.GetString(assemblyFile.Name);
// Find the assembly file in the set of netmodules with that name. // Find the assembly file in the set of netmodules with that name.
// The file may be missing if the file is not a module (say a resource) // The file may be missing if the file is not a module (say a resource)
...@@ -146,6 +148,7 @@ private static PortableExecutableReference MakeAssemblyMetadata(ModuleMetadata m ...@@ -146,6 +148,7 @@ private static PortableExecutableReference MakeAssemblyMetadata(ModuleMetadata m
} }
} }
} }
}
catch (Exception e) when (IsBadMetadataException(e)) catch (Exception e) when (IsBadMetadataException(e))
{ {
// Ignore modules with "bad" metadata. // Ignore modules with "bad" metadata.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册