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