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/SolutionNode.cs | 120 +++++++++----------------------- 1 file changed, 32 insertions(+), 88 deletions(-) (limited to 'Prebuild/src/Core/Nodes/SolutionNode.cs') diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs index 2a1b8e2..9473fe6 100644 --- a/Prebuild/src/Core/Nodes/SolutionNode.cs +++ b/Prebuild/src/Core/Nodes/SolutionNode.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: 2006-03-01 01:15:42 +0900 (Wed, 01 Mar 2006) $ + * $Revision: 92 $ + */ +#endregion + using System; using System.Collections; -using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Xml; @@ -40,62 +48,40 @@ namespace Prebuild.Core.Nodes /// /// [DataNode("Solution")] - [DataNode("EmbeddedSolution")] - [DebuggerDisplay("{Name}")] public class SolutionNode : DataNode { #region Fields - - private Guid m_Guid = Guid.NewGuid(); + private string m_Name = "unknown"; private string m_Path = ""; private string m_FullPath = ""; private string m_ActiveConfig = "Debug"; private string m_Version = "1.0.0"; - + private OptionsNode m_Options; private FilesNode m_Files; - private readonly Hashtable m_Configurations = new Hashtable(); - private readonly Hashtable m_Projects = new Hashtable(); - private readonly Hashtable m_DatabaseProjects = new Hashtable(); - private readonly List m_ProjectsOrder = new List(); - private readonly Hashtable m_Solutions = new Hashtable(); + private Hashtable m_Configurations; + private Hashtable m_Projects; + private ArrayList m_ProjectsOrder; + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public SolutionNode() + { + m_Configurations = new Hashtable(); + m_Projects = new Hashtable(); + m_ProjectsOrder = new ArrayList(); + } #endregion #region Properties - public override IDataNode Parent - { - get - { - return base.Parent; - } - set - { - if (value is SolutionNode) - { - SolutionNode solution = (SolutionNode)value; - foreach (ConfigurationNode conf in solution.Configurations) - { - m_Configurations[conf.Name] = conf.Clone(); - } - } - - base.Parent = value; - } - } - - public Guid Guid - { - get - { - return m_Guid; - } - set - { - m_Guid = value; - } - } + /// /// Gets or sets the active config. /// @@ -209,36 +195,7 @@ namespace Prebuild.Core.Nodes return m_Configurations; } } - /// - /// Gets the database projects. - /// - public ICollection DatabaseProjects - { - get - { - return m_DatabaseProjects.Values; - } - } - /// - /// Gets the nested solutions. - /// - public ICollection Solutions - { - get - { - return m_Solutions.Values; - } - } - /// - /// Gets the nested solutions hash table. - /// - public Hashtable SolutionsTable - { - get - { - return this.m_Solutions; - } - } + /// /// Gets the projects. /// @@ -269,7 +226,7 @@ namespace Prebuild.Core.Nodes /// Gets the projects table. /// /// The projects table. - public List ProjectsTableOrder + public ArrayList ProjectsTableOrder { get { @@ -330,21 +287,8 @@ namespace Prebuild.Core.Nodes else if(dataNode is ProjectNode) { m_Projects[((ProjectNode)dataNode).Name] = dataNode; - m_ProjectsOrder.Add((ProjectNode)dataNode); + m_ProjectsOrder.Add(dataNode); } - else if(dataNode is SolutionNode) - { - m_Solutions[((SolutionNode)dataNode).Name] = dataNode; - } - else if (dataNode is ProcessNode) - { - ProcessNode p = (ProcessNode)dataNode; - Kernel.Instance.ProcessFile(p, this); - } - else if (dataNode is DatabaseProjectNode) - { - m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = dataNode; - } } } finally -- cgit v1.1