зеркало из https://github.com/mono/monocov.git
If assembly could not be found, search in datafile-directory.
This commit is contained in:
Родитель
89fa165e8b
Коммит
389006e14e
|
@ -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 ();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче