aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/src/Core/Nodes/FileNode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Prebuild/src/Core/Nodes/FileNode.cs')
-rw-r--r--Prebuild/src/Core/Nodes/FileNode.cs42
1 files changed, 18 insertions, 24 deletions
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs
index 1520fcb..083dba5 100644
--- a/Prebuild/src/Core/Nodes/FileNode.cs
+++ b/Prebuild/src/Core/Nodes/FileNode.cs
@@ -23,6 +23,15 @@ 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.IO; 36using System.IO;
28using System.Xml; 37using System.Xml;
@@ -30,7 +39,6 @@ using System.Xml;
30using Prebuild.Core.Attributes; 39using Prebuild.Core.Attributes;
31using Prebuild.Core.Interfaces; 40using Prebuild.Core.Interfaces;
32using Prebuild.Core.Utilities; 41using Prebuild.Core.Utilities;
33using Prebuild.Core.Targets;
34 42
35namespace Prebuild.Core.Nodes 43namespace Prebuild.Core.Nodes
36{ 44{
@@ -85,11 +93,7 @@ namespace Prebuild.Core.Nodes
85 /// <summary> 93 /// <summary>
86 /// 94 ///
87 /// </summary> 95 /// </summary>
88 UserControl, 96 UserControl
89 /// <summary>
90 ///
91 /// </summary>
92 CodeBehind,
93 } 97 }
94 98
95 public enum CopyToOutput 99 public enum CopyToOutput
@@ -109,9 +113,9 @@ namespace Prebuild.Core.Nodes
109 113
110 private string m_Path; 114 private string m_Path;
111 private string m_ResourceName = ""; 115 private string m_ResourceName = "";
112 private BuildAction? m_BuildAction; 116 private BuildAction m_BuildAction = BuildAction.Compile;
113 private bool m_Valid; 117 private bool m_Valid;
114 private SubType? m_SubType; 118 private SubType m_SubType = SubType.Code;
115 private CopyToOutput m_CopyToOutput = CopyToOutput.Never; 119 private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
116 private bool m_Link = false; 120 private bool m_Link = false;
117 private string m_LinkPath = string.Empty; 121 private string m_LinkPath = string.Empty;
@@ -151,11 +155,7 @@ namespace Prebuild.Core.Nodes
151 { 155 {
152 get 156 get
153 { 157 {
154 if (m_BuildAction != null) 158 return m_BuildAction;
155 return m_BuildAction.Value;
156 else
157 return GetBuildActionByFileName(this.Path);
158
159 } 159 }
160 } 160 }
161 161
@@ -189,10 +189,7 @@ namespace Prebuild.Core.Nodes
189 { 189 {
190 get 190 get
191 { 191 {
192 if (m_SubType != null) 192 return m_SubType;
193 return m_SubType.Value;
194 else
195 return GetSubTypeByFileName(this.Path);
196 } 193 }
197 } 194 }
198 195
@@ -230,13 +227,10 @@ namespace Prebuild.Core.Nodes
230 /// <param name="node"></param> 227 /// <param name="node"></param>
231 public override void Parse(XmlNode node) 228 public override void Parse(XmlNode node)
232 { 229 {
233 string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); 230 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
234 if (buildAction != string.Empty) 231 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
235 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); 232 m_SubType = (SubType)Enum.Parse(typeof(SubType),
236 string subType = Helper.AttributeValue(node, "subType", string.Empty); 233 Helper.AttributeValue(node, "subType", m_SubType.ToString()));
237 if (subType != String.Empty)
238 m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
239
240 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); 234 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
241 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 235 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
242 if ( this.m_Link == true ) 236 if ( this.m_Link == true )