Permalink
Browse files

[webdoc] Add method back into the plugin code that was eaten up by th…

…e rebase.
  • Loading branch information...
1 parent 852e509 commit 5e63d145c2d4cea8a8ebe0a14fe0d6a54e095251 @vyedin vyedin committed Mar 5, 2013
Showing with 16 additions and 0 deletions.
  1. +16 −0 webdoc/App_Code/Plugins/Plugin.cs
@@ -124,5 +124,21 @@ static List<string> ParseExternalDefinition (string definitionPath, string crite
//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;
+ }
}
}

0 comments on commit 5e63d14

Please sign in to comment.