Weaver: ILPostProcessorAssemblyResolver comment

This commit is contained in:
mischa 2023-06-19 21:26:50 +08:00 committed by mischa
parent 443d1541d1
commit c960377911

View File

@ -113,6 +113,15 @@ string FindFile(string name)
if (fileName != null) if (fileName != null)
return fileName; return fileName;
// check both in one call without Linq instead of iterating twice like originally
// this throws exceptions for some reason:
// foreach (string r in assemblyReferences)
// {
// string fileName = Path.GetFileName(r);
// if (fileName == dllName || fileName == exeName)
// return fileName;
// }
// Unfortunately the current ICompiledAssembly API only provides direct references. // Unfortunately the current ICompiledAssembly API only provides direct references.
// It is very much possible that a postprocessor ends up investigating a type in a directly // It is very much possible that a postprocessor ends up investigating a type in a directly
// referenced assembly, that contains a field that is not in a directly referenced assembly. // referenced assembly, that contains a field that is not in a directly referenced assembly.