diff options
Diffstat (limited to 'Prebuild/src/Core/Nodes/SolutionNode.cs')
-rw-r--r-- | Prebuild/src/Core/Nodes/SolutionNode.cs | 120 |
1 files changed, 32 insertions, 88 deletions
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 | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | #region CVS Information | ||
27 | /* | ||
28 | * $Source$ | ||
29 | * $Author: jendave $ | ||
30 | * $Date: 2006-03-01 01:15:42 +0900 (Wed, 01 Mar 2006) $ | ||
31 | * $Revision: 92 $ | ||
32 | */ | ||
33 | #endregion | ||
34 | |||
26 | using System; | 35 | using System; |
27 | using System.Collections; | 36 | using System.Collections; |
28 | using System.Collections.Generic; | ||
29 | using System.Diagnostics; | 37 | using System.Diagnostics; |
30 | using System.IO; | 38 | using System.IO; |
31 | using System.Xml; | 39 | using System.Xml; |
@@ -40,62 +48,40 @@ namespace Prebuild.Core.Nodes | |||
40 | /// | 48 | /// |
41 | /// </summary> | 49 | /// </summary> |
42 | [DataNode("Solution")] | 50 | [DataNode("Solution")] |
43 | [DataNode("EmbeddedSolution")] | ||
44 | [DebuggerDisplay("{Name}")] | ||
45 | public class SolutionNode : DataNode | 51 | public class SolutionNode : DataNode |
46 | { | 52 | { |
47 | #region Fields | 53 | #region Fields |
48 | 54 | ||
49 | private Guid m_Guid = Guid.NewGuid(); | ||
50 | private string m_Name = "unknown"; | 55 | private string m_Name = "unknown"; |
51 | private string m_Path = ""; | 56 | private string m_Path = ""; |
52 | private string m_FullPath = ""; | 57 | private string m_FullPath = ""; |
53 | private string m_ActiveConfig = "Debug"; | 58 | private string m_ActiveConfig = "Debug"; |
54 | private string m_Version = "1.0.0"; | 59 | private string m_Version = "1.0.0"; |
55 | 60 | ||
56 | private OptionsNode m_Options; | 61 | private OptionsNode m_Options; |
57 | private FilesNode m_Files; | 62 | private FilesNode m_Files; |
58 | private readonly Hashtable m_Configurations = new Hashtable(); | 63 | private Hashtable m_Configurations; |
59 | private readonly Hashtable m_Projects = new Hashtable(); | 64 | private Hashtable m_Projects; |
60 | private readonly Hashtable m_DatabaseProjects = new Hashtable(); | 65 | private ArrayList m_ProjectsOrder; |
61 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); | 66 | |
62 | private readonly Hashtable m_Solutions = new Hashtable(); | 67 | #endregion |
68 | |||
69 | #region Constructors | ||
70 | |||
71 | /// <summary> | ||
72 | /// Initializes a new instance of the <see cref="SolutionNode"/> class. | ||
73 | /// </summary> | ||
74 | public SolutionNode() | ||
75 | { | ||
76 | m_Configurations = new Hashtable(); | ||
77 | m_Projects = new Hashtable(); | ||
78 | m_ProjectsOrder = new ArrayList(); | ||
79 | } | ||
63 | 80 | ||
64 | #endregion | 81 | #endregion |
65 | 82 | ||
66 | #region Properties | 83 | #region Properties |
67 | public override IDataNode Parent | 84 | |
68 | { | ||
69 | get | ||
70 | { | ||
71 | return base.Parent; | ||
72 | } | ||
73 | set | ||
74 | { | ||
75 | if (value is SolutionNode) | ||
76 | { | ||
77 | SolutionNode solution = (SolutionNode)value; | ||
78 | foreach (ConfigurationNode conf in solution.Configurations) | ||
79 | { | ||
80 | m_Configurations[conf.Name] = conf.Clone(); | ||
81 | } | ||
82 | } | ||
83 | |||
84 | base.Parent = value; | ||
85 | } | ||
86 | } | ||
87 | |||
88 | public Guid Guid | ||
89 | { | ||
90 | get | ||
91 | { | ||
92 | return m_Guid; | ||
93 | } | ||
94 | set | ||
95 | { | ||
96 | m_Guid = value; | ||
97 | } | ||
98 | } | ||
99 | /// <summary> | 85 | /// <summary> |
100 | /// Gets or sets the active config. | 86 | /// Gets or sets the active config. |
101 | /// </summary> | 87 | /// </summary> |
@@ -209,36 +195,7 @@ namespace Prebuild.Core.Nodes | |||
209 | return m_Configurations; | 195 | return m_Configurations; |
210 | } | 196 | } |
211 | } | 197 | } |
212 | /// <summary> | 198 | |
213 | /// Gets the database projects. | ||
214 | /// </summary> | ||
215 | public ICollection DatabaseProjects | ||
216 | { | ||
217 | get | ||
218 | { | ||
219 | return m_DatabaseProjects.Values; | ||
220 | } | ||
221 | } | ||
222 | /// <summary> | ||
223 | /// Gets the nested solutions. | ||
224 | /// </summary> | ||
225 | public ICollection Solutions | ||
226 | { | ||
227 | get | ||
228 | { | ||
229 | return m_Solutions.Values; | ||
230 | } | ||
231 | } | ||
232 | /// <summary> | ||
233 | /// Gets the nested solutions hash table. | ||
234 | /// </summary> | ||
235 | public Hashtable SolutionsTable | ||
236 | { | ||
237 | get | ||
238 | { | ||
239 | return this.m_Solutions; | ||
240 | } | ||
241 | } | ||
242 | /// <summary> | 199 | /// <summary> |
243 | /// Gets the projects. | 200 | /// Gets the projects. |
244 | /// </summary> | 201 | /// </summary> |
@@ -269,7 +226,7 @@ namespace Prebuild.Core.Nodes | |||
269 | /// Gets the projects table. | 226 | /// Gets the projects table. |
270 | /// </summary> | 227 | /// </summary> |
271 | /// <value>The projects table.</value> | 228 | /// <value>The projects table.</value> |
272 | public List<ProjectNode> ProjectsTableOrder | 229 | public ArrayList ProjectsTableOrder |
273 | { | 230 | { |
274 | get | 231 | get |
275 | { | 232 | { |
@@ -330,21 +287,8 @@ namespace Prebuild.Core.Nodes | |||
330 | else if(dataNode is ProjectNode) | 287 | else if(dataNode is ProjectNode) |
331 | { | 288 | { |
332 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; | 289 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; |
333 | m_ProjectsOrder.Add((ProjectNode)dataNode); | 290 | m_ProjectsOrder.Add(dataNode); |
334 | } | 291 | } |
335 | else if(dataNode is SolutionNode) | ||
336 | { | ||
337 | m_Solutions[((SolutionNode)dataNode).Name] = dataNode; | ||
338 | } | ||
339 | else if (dataNode is ProcessNode) | ||
340 | { | ||
341 | ProcessNode p = (ProcessNode)dataNode; | ||
342 | Kernel.Instance.ProcessFile(p, this); | ||
343 | } | ||
344 | else if (dataNode is DatabaseProjectNode) | ||
345 | { | ||
346 | m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = dataNode; | ||
347 | } | ||
348 | } | 292 | } |
349 | } | 293 | } |
350 | finally | 294 | finally |