comparison Tools/DocGen/Program.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 using System;
2 using System.IO;
3
4 namespace DocGen
5 {
6 partial class Program
7 {
8 public static string rss = Path.GetFullPath(@"..\..\content\rss.xml");
9 public static string destPath = @"c:\temp\bltoolkit\";
10
11 static void Main()
12 {
13 var root = new FileItem();
14
15 new Generator().Generate(
16 root,
17 _template, new string[] {}, destPath, @"..\..\content", true, false,
18 fileName =>
19 {
20 var name = Path.GetFileName(fileName).ToLower();
21
22 switch (name)
23 {
24 case "rss.xml" : return FileAction.Copy;
25 case "chmtemplate.html": return FileAction.Skip;
26 case "webtemplate.html": return FileAction.Skip;
27 }
28
29 var fileAction = FilterFile(fileName);
30
31 if (fileAction != FileAction.Process)
32 return fileAction;
33
34 var ext = Path.GetExtension(fileName).ToLower();
35
36 switch (ext)
37 {
38 case ".cs":
39 case ".config":
40 case ".xml":
41 case ".sql": return FileAction.Skip;
42 case ".htm": return FileAction.Process;
43 default : return FileAction.Copy;
44 }
45 });
46
47 root.Prepare();
48
49 CreateTarget(root);
50 }
51 }
52 }