Mercurial > pub > bltoolkit
diff Tools/DocGen/Program.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Tools/DocGen/Program.cs Thu Mar 27 21:46:09 2014 +0400 @@ -0,0 +1,52 @@ +using System; +using System.IO; + +namespace DocGen +{ + partial class Program + { + public static string rss = Path.GetFullPath(@"..\..\content\rss.xml"); + public static string destPath = @"c:\temp\bltoolkit\"; + + static void Main() + { + var root = new FileItem(); + + new Generator().Generate( + root, + _template, new string[] {}, destPath, @"..\..\content", true, false, + fileName => + { + var name = Path.GetFileName(fileName).ToLower(); + + switch (name) + { + case "rss.xml" : return FileAction.Copy; + case "chmtemplate.html": return FileAction.Skip; + case "webtemplate.html": return FileAction.Skip; + } + + var fileAction = FilterFile(fileName); + + if (fileAction != FileAction.Process) + return fileAction; + + var ext = Path.GetExtension(fileName).ToLower(); + + switch (ext) + { + case ".cs": + case ".config": + case ".xml": + case ".sql": return FileAction.Skip; + case ".htm": return FileAction.Process; + default : return FileAction.Copy; + } + }); + + root.Prepare(); + + CreateTarget(root); + } + } +}