Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNina Vyedin <nina.vyedin@gmail.com>2013-03-05 09:57:51 +0400
committerNina Vyedin <nina.vyedin@gmail.com>2013-03-05 09:57:51 +0400
commit5e63d145c2d4cea8a8ebe0a14fe0d6a54e095251 (patch)
treee7ac925f7d61a5719ac68f8b123b169b5a5128fc
parent852e509508788c14692f826abe16c2ac45bb0655 (diff)
[webdoc] Add method back into the plugin code that was eaten up by the rebase.
-rw-r--r--webdoc/App_Code/Plugins/Plugin.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/webdoc/App_Code/Plugins/Plugin.cs b/webdoc/App_Code/Plugins/Plugin.cs
index 4580a407..93a37e41 100644
--- a/webdoc/App_Code/Plugins/Plugin.cs
+++ b/webdoc/App_Code/Plugins/Plugin.cs
@@ -124,5 +124,21 @@ namespace Mono.Website {
//returns a list of directories in which to look for plugin resources
return files;
}
+
+ //eats whatever .def file you feed it
+ static List<string> ParseExternalDefinition (string definitionPath)
+ {
+ //if definitionPath is undefined, or def file does not exist, don't bother
+ if (string.IsNullOrEmpty (definitionPath) || !File.Exists (definitionPath))
+ return null;
+ // read out the file
+ var lines = File.ReadAllLines (definitionPath);
+ //build our list
+ var directories = lines.Where (line => !string.IsNullOrEmpty (line) && line[0] != '#') // Take non-empty, non-comment lines
+ .Where (file_path => file_path != null && file_path.Length > 2)
+ .ToList ();
+ //returns a list of directories in which to look for plugin resources
+ return directories;
+ }
}
}