From e36c452d4e891073768fd70915a65531f806f831 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 19 Feb 2009 14:16:22 +0000
Subject: * Reverted Prebuild commit due to strange run-time errors.
---
Prebuild/src/Core/Nodes/ProjectNode.cs | 169 ++++++++++++++-------------------
1 file changed, 73 insertions(+), 96 deletions(-)
(limited to 'Prebuild/src/Core/Nodes/ProjectNode.cs')
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs
index 0a24abf..e98ab5f 100644
--- a/Prebuild/src/Core/Nodes/ProjectNode.cs
+++ b/Prebuild/src/Core/Nodes/ProjectNode.cs
@@ -23,9 +23,17 @@ 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: 2007-05-26 06:58:26 +0900 (Sat, 26 May 2007) $
+ * $Revision: 244 $
+ */
+#endregion
+
using System;
using System.Collections;
-using System.Collections.Generic;
using System.IO;
using System.Xml;
@@ -51,11 +59,7 @@ namespace Prebuild.Core.Nodes
///
/// The project is a library
///
- Library,
- ///
- /// The project is a website
- ///
- Web,
+ Library
}
///
@@ -72,25 +76,7 @@ namespace Prebuild.Core.Nodes
///
Mono
}
- ///
- /// The version of the .NET framework to use (Required for VS2008)
- /// We don't need .NET 1.1 in here, it'll default when using vs2003.
- ///
- public enum FrameworkVersion
- {
- ///
- /// .NET 2.0
- ///
- v2_0,
- ///
- /// .NET 3.0
- ///
- v3_0,
- ///
- /// .NET 3.5
- ///
- v3_5,
- }
+
///
/// The Node object representing /Prebuild/Solution/Project elements
///
@@ -109,45 +95,49 @@ namespace Prebuild.Core.Nodes
private string m_Language = "C#";
private ProjectType m_Type = ProjectType.Exe;
private ClrRuntime m_Runtime = ClrRuntime.Microsoft;
- private FrameworkVersion m_Framework = FrameworkVersion.v2_0;
private string m_StartupObject = "";
private string m_RootNamespace;
private string m_FilterGroups = "";
private string m_Version = "";
private Guid m_Guid;
- private string m_DebugStartParameters;
- private Hashtable m_Configurations = new Hashtable();
- private readonly List m_ReferencePaths = new List();
- private readonly List m_References = new List();
- private readonly List m_Authors = new List();
+ private Hashtable m_Configurations;
+ private ArrayList m_ReferencePaths;
+ private ArrayList m_References;
+ private ArrayList m_Authors;
private FilesNode m_Files;
#endregion
- #region Properties
+ #region Constructors
///
- /// Gets the name.
+ /// Initializes a new instance of the class.
///
- /// The name.
- public string Name
+ public ProjectNode()
{
- get
- {
- return m_Name;
- }
+ m_Configurations = new Hashtable();
+ m_ReferencePaths = new ArrayList();
+ m_References = new ArrayList();
+ m_Authors = new ArrayList();
}
+
+ #endregion
+
+ #region Properties
+
///
- /// The version of the .NET Framework to compile under
+ /// Gets the name.
///
- public FrameworkVersion FrameworkVersion
+ /// The name.
+ public string Name
{
get
{
- return this.m_Framework;
+ return m_Name;
}
}
+
///
/// Gets the path.
///
@@ -220,17 +210,17 @@ namespace Prebuild.Core.Nodes
}
}
- ///
- /// Gets the app icon.
- ///
- /// The app icon.
- public string ConfigFile
- {
- get
- {
- return m_ConfigFile;
- }
- }
+ ///
+ /// Gets the app icon.
+ ///
+ /// The app icon.
+ public string ConfigFile
+ {
+ get
+ {
+ return m_ConfigFile;
+ }
+ }
///
///
@@ -279,22 +269,22 @@ namespace Prebuild.Core.Nodes
}
}
- private bool m_GenerateAssemblyInfoFile = false;
-
- ///
- ///
- ///
- public bool GenerateAssemblyInfoFile
- {
- get
- {
- return m_GenerateAssemblyInfoFile;
- }
- set
- {
- m_GenerateAssemblyInfoFile = value;
- }
- }
+ private bool m_GenerateAssemblyInfoFile = false;
+
+ ///
+ ///
+ ///
+ public bool GenerateAssemblyInfoFile
+ {
+ get
+ {
+ return m_GenerateAssemblyInfoFile;
+ }
+ set
+ {
+ m_GenerateAssemblyInfoFile = value;
+ }
+ }
///
/// Gets the startup object.
@@ -324,7 +314,7 @@ namespace Prebuild.Core.Nodes
/// Gets the configurations.
///
/// The configurations.
- public IList Configurations
+ public ICollection Configurations
{
get
{
@@ -350,11 +340,11 @@ namespace Prebuild.Core.Nodes
/// Gets the reference paths.
///
/// The reference paths.
- public List ReferencePaths
+ public ArrayList ReferencePaths
{
get
{
- List tmp = new List(m_ReferencePaths);
+ ArrayList tmp = new ArrayList(m_ReferencePaths);
tmp.Sort();
return tmp;
}
@@ -364,11 +354,11 @@ namespace Prebuild.Core.Nodes
/// Gets the references.
///
/// The references.
- public List References
+ public ArrayList References
{
get
{
- List tmp = new List(m_References);
+ ArrayList tmp = new ArrayList(m_References);
tmp.Sort();
return tmp;
}
@@ -378,7 +368,7 @@ namespace Prebuild.Core.Nodes
/// Gets the Authors list.
///
/// The list of the project's authors.
- public List Authors
+ public ArrayList Authors
{
get
{
@@ -434,15 +424,7 @@ namespace Prebuild.Core.Nodes
}
}
- public string DebugStartParameters
- {
- get
- {
- return m_DebugStartParameters;
- }
- }
-
- #endregion
+ #endregion
#region Private Methods
@@ -488,18 +470,13 @@ namespace Prebuild.Core.Nodes
m_Language = Helper.AttributeValue(node, "language", m_Language);
m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type);
m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
- m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework);
m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
-
+ m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
+
int hash = m_Name.GetHashCode();
- Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString());
- m_Guid = new Guid(guid);
+ m_Guid = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
- m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty);
-
if(m_AssemblyName == null || m_AssemblyName.Length < 1)
{
m_AssemblyName = m_Name;
@@ -539,15 +516,15 @@ namespace Prebuild.Core.Nodes
}
else if(dataNode is ReferencePathNode)
{
- m_ReferencePaths.Add((ReferencePathNode)dataNode);
+ m_ReferencePaths.Add(dataNode);
}
else if(dataNode is ReferenceNode)
{
- m_References.Add((ReferenceNode)dataNode);
+ m_References.Add(dataNode);
}
else if(dataNode is AuthorNode)
{
- m_Authors.Add((AuthorNode)dataNode);
+ m_Authors.Add(dataNode);
}
else if(dataNode is FilesNode)
{
@@ -571,6 +548,6 @@ namespace Prebuild.Core.Nodes
return this.m_Name.CompareTo(that.m_Name);
}
- #endregion
+ #endregion
}
}
--
cgit v1.1