If assembly could not be found, search in datafile-directory.

This commit is contained in:
alpinechough 2011-01-16 06:24:13 +08:00 коммит произвёл Zoltan Varga
Родитель 89fa165e8b
Коммит 3b711c42ed
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -1,6 +1,7 @@
2011-01-15 Andreas Windischer
* gui/gtk/CoverageView.cs: Expand on double click fix.
* CoverageModel.cs: If assembly could not be found, search in datafile-directory.
2011-01-12 Andreas Windischer

Просмотреть файл

@ -16,6 +16,7 @@ public delegate void CoverageProgress (string item, double percent);
public class CoverageModel : CoverageItem {
private string dataFileName;
private Hashtable namespaces;
private Hashtable classes;
private Hashtable sources;
@ -32,6 +33,7 @@ public class CoverageModel : CoverageItem {
public CoverageModel ()
{
dataFileName = string.Empty;
namespaces = new Hashtable ();
classes = new Hashtable ();
sources = new Hashtable ();
@ -94,6 +96,12 @@ public class CoverageModel : CoverageItem {
string filename = n.Attributes ["filename"].Value;
MonoSymbolFile symbolFile;
if (!File.Exists (filename)) {
string newFilename = Path.Combine(Path.GetDirectoryName (dataFileName), Path.GetFileName (filename));
if (File.Exists (newFilename))
filename = newFilename;
}
#if USE_REFLECTION
Assembly assembly = Assembly.Load (assemblyName);
@ -190,6 +198,7 @@ public class CoverageModel : CoverageItem {
public void ReadFromFile (string fileName)
{
dataFileName = fileName;
namespaces = new Hashtable ();
classes = new Hashtable ();