From dd9640cda82bca8125289f292238ea6b447cc6e9 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 19 Feb 2009 12:48:38 +0000
Subject: === PREBUILD UPSTREAMS UPDATE : POTENTIAL BREAKAGE ===
* Applied upstreams changes to allow for auditing and debugging in our various environments.
* This should, in theory, bring back 'multiple ref dirs'.
* Temporarily Removed xmlns because prebuild-1.7 schema does not allow for multiple solutions per prebuild node (This will be a moot issue once the Prebuild node is moved out of prebuild.xml)
* Autotools target: Various minor fixes
* MonoDevelop Target : No changes.
* Nant Target: Various minor fixes, support for net-3.5 and mono-2.0/3.5 targets
* Sharpdevelop targets: No changes.
* VS Targets: Refactored into using VSGenericTarget, and supports 2.0-3.5
* XCode Target: No changes.
--- Regressions and outstanding issues ---
* The Solution is assigned a random Guid - will lead to unnecessary reloads and loss of user settings.
--- New features of Prebuild 2.0.4 ---
* (Better) support for Web, WinForms and Database Projects and build actions
* Conditional Framework Version compilation support (1.1, 2.0-3.5)
* ArrayList -> List<>, ICollection -> IList
(this means Prebuild can generate 1.1 solutions, but can't itself be built under 1.1 - how very meta)
* Added preprocessor directive.
---
Prebuild/src/Core/Nodes/MatchNode.cs | 51 ++++++++++++------------------------
1 file changed, 17 insertions(+), 34 deletions(-)
(limited to 'Prebuild/src/Core/Nodes/MatchNode.cs')
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs
index aeaf3c1..656d7d0 100644
--- a/Prebuild/src/Core/Nodes/MatchNode.cs
+++ b/Prebuild/src/Core/Nodes/MatchNode.cs
@@ -23,16 +23,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
*/
#endregion
-#region CVS Information
-/*
- * $Source$
- * $Author: borrillis $
- * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
- * $Revision: 243 $
- */
-#endregion
-
using System;
+using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Text.RegularExpressions;
@@ -53,29 +45,16 @@ namespace Prebuild.Core.Nodes
{
#region Fields
- private StringCollection m_Files;
+ private readonly StringCollection m_Files = new StringCollection();
private Regex m_Regex;
- private BuildAction m_BuildAction = BuildAction.Compile;
- private SubType m_SubType = SubType.Code;
+ private BuildAction? m_BuildAction;
+ private SubType? m_SubType;
string m_ResourceName = "";
private CopyToOutput m_CopyToOutput;
private bool m_Link;
private string m_LinkPath;
private bool m_PreservePath;
- private ArrayList m_Exclusions;
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- ///
- public MatchNode()
- {
- m_Files = new StringCollection();
- m_Exclusions = new ArrayList();
- }
+ private readonly List m_Exclusions = new List();
#endregion
@@ -95,7 +74,7 @@ namespace Prebuild.Core.Nodes
///
///
///
- public BuildAction BuildAction
+ public BuildAction? BuildAction
{
get
{
@@ -106,7 +85,7 @@ namespace Prebuild.Core.Nodes
///
///
///
- public SubType SubType
+ public SubType? SubType
{
get
{
@@ -167,7 +146,7 @@ namespace Prebuild.Core.Nodes
/// The pattern.
/// if set to true [recurse].
/// if set to true [use regex].
- private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, ArrayList exclusions)
+ private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List exclusions)
{
Match match;
Boolean excludeFile;
@@ -279,10 +258,14 @@ namespace Prebuild.Core.Nodes
string pattern = Helper.AttributeValue(node, "pattern", "*");
bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false"));
bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false"));
- m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
- Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
- m_SubType = (SubType)Enum.Parse(typeof(SubType),
- Helper.AttributeValue(node, "subType", m_SubType.ToString()));
+ string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty);
+ if (buildAction != string.Empty)
+ m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction);
+
+ //TODO: Figure out where the subtype node is being assigned
+ //string subType = Helper.AttributeValue(node, "subType", string.Empty);
+ //if (subType != String.Empty)
+ // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
@@ -329,7 +312,7 @@ namespace Prebuild.Core.Nodes
if(dataNode is ExcludeNode)
{
ExcludeNode excludeNode = (ExcludeNode)dataNode;
- m_Exclusions.Add( dataNode );
+ m_Exclusions.Add( excludeNode );
}
}
--
cgit v1.1