protected GetFilePath ( IAssemblyDescriptor descriptor ) : string | ||
descriptor | IAssemblyDescriptor | The assembly to resolve. |
return | string |
protected virtual string GetFilePath(IAssemblyDescriptor descriptor)
{
if (descriptor.PublicKeyToken != null)
{
foreach (var gacDirectory in GacDirectories)
{
var filePath = gacDirectory.GetFilePath(descriptor);
if (File.Exists(filePath))
return filePath;
}
}
foreach (var directory in SearchDirectories)
{
var path = Path.Combine(directory, descriptor.Name);
if (File.Exists(path + ".dll"))
return path + ".dll";
if (File.Exists(path + ".dll"))
return path + ".dll";
}
return null;
}