diff options
author | lbsa71 | 2009-02-19 14:35:11 +0000 |
---|---|---|
committer | lbsa71 | 2009-02-19 14:35:11 +0000 |
commit | 40d88ce9057babd28074afe803086bf415527dca (patch) | |
tree | 3fb229561ebd2c8a49c1839e630275dd8b0c7a3b /Prebuild/src/Core/Nodes/SolutionNode.cs | |
parent | * Reverted Prebuild commit due to strange run-time errors. (diff) | |
download | opensim-SC-40d88ce9057babd28074afe803086bf415527dca.zip opensim-SC-40d88ce9057babd28074afe803086bf415527dca.tar.gz opensim-SC-40d88ce9057babd28074afe803086bf415527dca.tar.bz2 opensim-SC-40d88ce9057babd28074afe803086bf415527dca.tar.xz |
* Reverted the revert, as it seems the problem was the 1.0.* in the separate projects.
Diffstat (limited to 'Prebuild/src/Core/Nodes/SolutionNode.cs')
-rw-r--r-- | Prebuild/src/Core/Nodes/SolutionNode.cs | 120 |
1 files changed, 88 insertions, 32 deletions
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs index 9473fe6..2a1b8e2 100644 --- a/Prebuild/src/Core/Nodes/SolutionNode.cs +++ b/Prebuild/src/Core/Nodes/SolutionNode.cs | |||
@@ -23,17 +23,9 @@ 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 | |||
35 | using System; | 26 | using System; |
36 | using System.Collections; | 27 | using System.Collections; |
28 | using System.Collections.Generic; | ||
37 | using System.Diagnostics; | 29 | using System.Diagnostics; |
38 | using System.IO; | 30 | using System.IO; |
39 | using System.Xml; | 31 | using System.Xml; |
@@ -48,40 +40,62 @@ namespace Prebuild.Core.Nodes | |||
48 | /// | 40 | /// |
49 | /// </summary> | 41 | /// </summary> |
50 | [DataNode("Solution")] | 42 | [DataNode("Solution")] |
43 | [DataNode("EmbeddedSolution")] | ||
44 | [DebuggerDisplay("{Name}")] | ||
51 | public class SolutionNode : DataNode | 45 | public class SolutionNode : DataNode |
52 | { | 46 | { |
53 | #region Fields | 47 | #region Fields |
54 | 48 | ||
49 | private Guid m_Guid = Guid.NewGuid(); | ||
55 | private string m_Name = "unknown"; | 50 | private string m_Name = "unknown"; |
56 | private string m_Path = ""; | 51 | private string m_Path = ""; |
57 | private string m_FullPath = ""; | 52 | private string m_FullPath = ""; |
58 | private string m_ActiveConfig = "Debug"; | 53 | private string m_ActiveConfig = "Debug"; |
59 | private string m_Version = "1.0.0"; | 54 | private string m_Version = "1.0.0"; |
60 | 55 | ||
61 | private OptionsNode m_Options; | 56 | private OptionsNode m_Options; |
62 | private FilesNode m_Files; | 57 | private FilesNode m_Files; |
63 | private Hashtable m_Configurations; | 58 | private readonly Hashtable m_Configurations = new Hashtable(); |
64 | private Hashtable m_Projects; | 59 | private readonly Hashtable m_Projects = new Hashtable(); |
65 | private ArrayList m_ProjectsOrder; | 60 | private readonly Hashtable m_DatabaseProjects = new Hashtable(); |
66 | 61 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); | |
67 | #endregion | 62 | private readonly Hashtable m_Solutions = new Hashtable(); |
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 | } | ||
80 | 63 | ||
81 | #endregion | 64 | #endregion |
82 | 65 | ||
83 | #region Properties | 66 | #region Properties |
84 | 67 | public override IDataNode Parent | |
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 | } | ||
85 | /// <summary> | 99 | /// <summary> |
86 | /// Gets or sets the active config. | 100 | /// Gets or sets the active config. |
87 | /// </summary> | 101 | /// </summary> |
@@ -195,7 +209,36 @@ namespace Prebuild.Core.Nodes | |||
195 | return m_Configurations; | 209 | return m_Configurations; |
196 | } | 210 | } |
197 | } | 211 | } |
198 | 212 | /// <summary> | |
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 | } | ||
199 | /// <summary> | 242 | /// <summary> |
200 | /// Gets the projects. | 243 | /// Gets the projects. |
201 | /// </summary> | 244 | /// </summary> |
@@ -226,7 +269,7 @@ namespace Prebuild.Core.Nodes | |||
226 | /// Gets the projects table. | 269 | /// Gets the projects table. |
227 | /// </summary> | 270 | /// </summary> |
228 | /// <value>The projects table.</value> | 271 | /// <value>The projects table.</value> |
229 | public ArrayList ProjectsTableOrder | 272 | public List<ProjectNode> ProjectsTableOrder |
230 | { | 273 | { |
231 | get | 274 | get |
232 | { | 275 | { |
@@ -287,8 +330,21 @@ namespace Prebuild.Core.Nodes | |||
287 | else if(dataNode is ProjectNode) | 330 | else if(dataNode is ProjectNode) |
288 | { | 331 | { |
289 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; | 332 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; |
290 | m_ProjectsOrder.Add(dataNode); | 333 | m_ProjectsOrder.Add((ProjectNode)dataNode); |
291 | } | 334 | } |
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 | } | ||
292 | } | 348 | } |
293 | } | 349 | } |
294 | finally | 350 | finally |