提交 d859def6 编写于 作者: C CyrusNajmabadi

Simplify code.

上级 0339e313
......@@ -335,11 +335,13 @@ private bool TryGetFileMappingFromMetadataImporter(FileKey fileKey, out IMetaDat
moduleBuilder.Add(metadata);
}
var modules = moduleBuilder.Count > 0
? moduleBuilder.ToImmutable()
: ImmutableArray.Create(manifestModule);
moduleBuilder.Free();
return AssemblyMetadata.Create(modules);
if (moduleBuilder.Count == 0)
{
moduleBuilder.Add(manifestModule);
}
return AssemblyMetadata.Create(
moduleBuilder.ToImmutableAndFree());
}
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册