aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/src/Core/Nodes/MatchNode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Prebuild/src/Core/Nodes/MatchNode.cs')
-rw-r--r--Prebuild/src/Core/Nodes/MatchNode.cs51
1 files changed, 34 insertions, 17 deletions
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs
index 656d7d0..aeaf3c1 100644
--- a/Prebuild/src/Core/Nodes/MatchNode.cs
+++ b/Prebuild/src/Core/Nodes/MatchNode.cs
@@ -23,8 +23,16 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: borrillis $
30 * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
31 * $Revision: 243 $
32 */
33#endregion
34
26using System; 35using System;
27using System.Collections.Generic;
28using System.Collections.Specialized; 36using System.Collections.Specialized;
29using System.IO; 37using System.IO;
30using System.Text.RegularExpressions; 38using System.Text.RegularExpressions;
@@ -45,16 +53,29 @@ namespace Prebuild.Core.Nodes
45 { 53 {
46 #region Fields 54 #region Fields
47 55
48 private readonly StringCollection m_Files = new StringCollection(); 56 private StringCollection m_Files;
49 private Regex m_Regex; 57 private Regex m_Regex;
50 private BuildAction? m_BuildAction; 58 private BuildAction m_BuildAction = BuildAction.Compile;
51 private SubType? m_SubType; 59 private SubType m_SubType = SubType.Code;
52 string m_ResourceName = ""; 60 string m_ResourceName = "";
53 private CopyToOutput m_CopyToOutput; 61 private CopyToOutput m_CopyToOutput;
54 private bool m_Link; 62 private bool m_Link;
55 private string m_LinkPath; 63 private string m_LinkPath;
56 private bool m_PreservePath; 64 private bool m_PreservePath;
57 private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); 65 private ArrayList m_Exclusions;
66
67 #endregion
68
69 #region Constructors
70
71 /// <summary>
72 ///
73 /// </summary>
74 public MatchNode()
75 {
76 m_Files = new StringCollection();
77 m_Exclusions = new ArrayList();
78 }
58 79
59 #endregion 80 #endregion
60 81
@@ -74,7 +95,7 @@ namespace Prebuild.Core.Nodes
74 /// <summary> 95 /// <summary>
75 /// 96 ///
76 /// </summary> 97 /// </summary>
77 public BuildAction? BuildAction 98 public BuildAction BuildAction
78 { 99 {
79 get 100 get
80 { 101 {
@@ -85,7 +106,7 @@ namespace Prebuild.Core.Nodes
85 /// <summary> 106 /// <summary>
86 /// 107 ///
87 /// </summary> 108 /// </summary>
88 public SubType? SubType 109 public SubType SubType
89 { 110 {
90 get 111 get
91 { 112 {
@@ -146,7 +167,7 @@ namespace Prebuild.Core.Nodes
146 /// <param name="pattern">The pattern.</param> 167 /// <param name="pattern">The pattern.</param>
147 /// <param name="recurse">if set to <c>true</c> [recurse].</param> 168 /// <param name="recurse">if set to <c>true</c> [recurse].</param>
148 /// <param name="useRegex">if set to <c>true</c> [use regex].</param> 169 /// <param name="useRegex">if set to <c>true</c> [use regex].</param>
149 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions) 170 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, ArrayList exclusions)
150 { 171 {
151 Match match; 172 Match match;
152 Boolean excludeFile; 173 Boolean excludeFile;
@@ -258,14 +279,10 @@ namespace Prebuild.Core.Nodes
258 string pattern = Helper.AttributeValue(node, "pattern", "*"); 279 string pattern = Helper.AttributeValue(node, "pattern", "*");
259 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); 280 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false"));
260 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); 281 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false"));
261 string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); 282 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
262 if (buildAction != string.Empty) 283 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
263 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); 284 m_SubType = (SubType)Enum.Parse(typeof(SubType),
264 285 Helper.AttributeValue(node, "subType", m_SubType.ToString()));
265 //TODO: Figure out where the subtype node is being assigned
266 //string subType = Helper.AttributeValue(node, "subType", string.Empty);
267 //if (subType != String.Empty)
268 // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
269 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); 286 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
270 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); 287 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
271 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 288 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
@@ -312,7 +329,7 @@ namespace Prebuild.Core.Nodes
312 if(dataNode is ExcludeNode) 329 if(dataNode is ExcludeNode)
313 { 330 {
314 ExcludeNode excludeNode = (ExcludeNode)dataNode; 331 ExcludeNode excludeNode = (ExcludeNode)dataNode;
315 m_Exclusions.Add( excludeNode ); 332 m_Exclusions.Add( dataNode );
316 } 333 }
317 } 334 }
318 335