From 549c615e0e7fbc4fa284de533db673e7e2fd665b Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 19 Feb 2009 14:54:21 +0000
Subject: * reverted the revert of the revert. What can I say? I'm calling this
a day, and will get back up on the horse tomorrow.
---
Prebuild/src/Core/Nodes/DataNode.cs | 59 ++++++++-----------------------------
1 file changed, 12 insertions(+), 47 deletions(-)
(limited to 'Prebuild/src/Core/Nodes/DataNode.cs')
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs
index 763e6c3..60ed122 100644
--- a/Prebuild/src/Core/Nodes/DataNode.cs
+++ b/Prebuild/src/Core/Nodes/DataNode.cs
@@ -23,24 +23,31 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
*/
#endregion
+#region CVS Information
+/*
+ * $Source$
+ * $Author: jendave $
+ * $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
+ * $Revision: 71 $
+ */
+#endregion
+
using System;
using System.Xml;
using Prebuild.Core.Attributes;
using Prebuild.Core.Interfaces;
-using System.IO;
namespace Prebuild.Core.Nodes
{
///
///
///
- public abstract class DataNode : IDataNode
+ public class DataNode : IDataNode
{
#region Fields
private IDataNode parent;
- string[] m_WebTypes = new string[] { "aspx", "ascx", "master", "ashx", "asmx" };
#endregion
@@ -61,10 +68,7 @@ namespace Prebuild.Core.Nodes
parent = value;
}
}
- public string[] WebTypes
- {
- get { return m_WebTypes; }
- }
+
///
/// Parses the specified node.
///
@@ -72,46 +76,7 @@ namespace Prebuild.Core.Nodes
public virtual void Parse(XmlNode node)
{
}
- public BuildAction GetBuildActionByFileName(string fileName)
- {
- string extension = Path.GetExtension(fileName).ToLower();
- foreach (string type in WebTypes)
- {
- if (extension == type)
- return BuildAction.Content;
- }
- return BuildAction.Compile;
- }
- ///
- /// Parses the file type to figure out what type it is
- ///
- ///
- public SubType GetSubTypeByFileName(string fileName)
- {
- string extension = System.IO.Path.GetExtension(fileName).ToLower();
- string designer = String.Format(".designer{0}", extension);
- string path = fileName.ToLower();
- if (extension == ".resx")
- {
- return SubType.Designer;
- }
- else if (path.EndsWith(".settings"))
- {
- return SubType.Settings;
- }
- else
- {
-
- foreach (string type in WebTypes)
- {
- if (path.EndsWith(string.Format("{0}{1}", type, extension)))
- {
- return SubType.CodeBehind;
- }
- }
- }
- return SubType.Code;
- }
+
#endregion
}
}
--
cgit v1.1