aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/src/Core/Nodes/ReferenceNode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Prebuild/src/Core/Nodes/ReferenceNode.cs')
-rw-r--r--Prebuild/src/Core/Nodes/ReferenceNode.cs144
1 files changed, 0 insertions, 144 deletions
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs
deleted file mode 100644
index 9c5d1a3..0000000
--- a/Prebuild/src/Core/Nodes/ReferenceNode.cs
+++ /dev/null
@@ -1,144 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26using System;
27using System.Xml;
28
29using Prebuild.Core.Attributes;
30using Prebuild.Core.Interfaces;
31using Prebuild.Core.Utilities;
32
33namespace Prebuild.Core.Nodes
34{
35 /// <summary>
36 ///
37 /// </summary>
38 [DataNode("Reference")]
39 public class ReferenceNode : DataNode, IComparable
40 {
41 #region Fields
42
43 private string m_Name = "unknown";
44 private string m_Path;
45 private string m_LocalCopy;
46 private string m_Version;
47
48 #endregion
49
50 #region Properties
51
52 /// <summary>
53 /// Gets the name.
54 /// </summary>
55 /// <value>The name.</value>
56 public string Name
57 {
58 get
59 {
60 return m_Name;
61 }
62 }
63
64 /// <summary>
65 /// Gets the path.
66 /// </summary>
67 /// <value>The path.</value>
68 public string Path
69 {
70 get
71 {
72 return m_Path;
73 }
74 }
75
76 /// <summary>
77 /// Gets a value indicating whether [local copy specified].
78 /// </summary>
79 /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value>
80 public bool LocalCopySpecified
81 {
82 get
83 {
84 return ( m_LocalCopy != null && m_LocalCopy.Length == 0);
85 }
86 }
87
88 /// <summary>
89 /// Gets a value indicating whether [local copy].
90 /// </summary>
91 /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value>
92 public bool LocalCopy
93 {
94 get
95 {
96 if( m_LocalCopy == null)
97 {
98 return false;
99 }
100 return bool.Parse(m_LocalCopy);
101 }
102 }
103
104 /// <summary>
105 /// Gets the version.
106 /// </summary>
107 /// <value>The version.</value>
108 public string Version
109 {
110 get
111 {
112 return m_Version;
113 }
114 }
115
116 #endregion
117
118 #region Public Methods
119
120 /// <summary>
121 /// Parses the specified node.
122 /// </summary>
123 /// <param name="node">The node.</param>
124 public override void Parse(XmlNode node)
125 {
126 m_Name = Helper.AttributeValue(node, "name", m_Name);
127 m_Path = Helper.AttributeValue(node, "path", m_Path);
128 m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy);
129 m_Version = Helper.AttributeValue(node, "version", m_Version);
130 }
131
132 #endregion
133
134 #region IComparable Members
135
136 public int CompareTo(object obj)
137 {
138 ReferenceNode that = (ReferenceNode)obj;
139 return this.m_Name.CompareTo(that.m_Name);
140 }
141
142 #endregion
143 }
144}