2006-03-29 Marek Sieradzki <marek.sieradzki@gmail.com>
authorMarek Sieradzki <msierad@mono-cvs.ximian.com>
Wed, 29 Mar 2006 12:38:45 +0000 (12:38 -0000)
committerMarek Sieradzki <msierad@mono-cvs.ximian.com>
Wed, 29 Mar 2006 12:38:45 +0000 (12:38 -0000)
        * BuildItem.cs, BuildItemGroup.cs: Coding style fixes.

svn path=/trunk/mcs/; revision=58722

mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItem.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog

index 7d9ad6ba7f51557b68f63e3471d1e9a11b6e3f6d..6e9545b0039a8518b4f9e8d1d6d4baa474a50406 100644 (file)
@@ -48,12 +48,6 @@ namespace Microsoft.Build.BuildEngine {
                IDictionary     evaluatedMetadata;
                IDictionary     unevaluatedMetadata;
 
-               internal bool FromXml {
-                       get {
-                               return itemElement != null;
-                       }
-               }
-       
                private BuildItem ()
                {
                }
@@ -131,10 +125,13 @@ namespace Microsoft.Build.BuildEngine {
                {
                        if (metadataName == null)
                                throw new ArgumentNullException ("metadataName");
+                       
                        if (TaskItem.IsReservedMetadataName (metadataName))
                                throw new ArgumentException ("Can't remove reserved metadata.");
+                       
                        if (evaluatedMetadata.Contains (metadataName))
                                evaluatedMetadata.Remove (metadataName);
+                       
                        if (unevaluatedMetadata.Contains (metadataName))
                                unevaluatedMetadata.Remove (metadataName);
                }
@@ -153,10 +150,13 @@ namespace Microsoft.Build.BuildEngine {
                {
                        if (metadataName == null)
                                throw new ArgumentNullException ("metadataName");
+                       
                        if (metadataValue == null)
                                throw new ArgumentNullException ("metadataValue");
+                       
                        if (TaskItem.IsReservedMetadataName (metadataName))
                                throw new ArgumentException ("Can't modify reserved metadata.");
+                       
                        RemoveMetadata (metadataName);
                        unevaluatedMetadata.Add (metadataName, metadataValue);
                        Expression finalValue = new Expression (parentItemGroup.Project, metadataValue);
@@ -167,10 +167,13 @@ namespace Microsoft.Build.BuildEngine {
                {
                        if (xmlElement == null)
                                throw new ArgumentNullException ("xmlElement");
+                       
                        this.itemElement = xmlElement;
                        this.name = xmlElement.Name;
+                       
                        if (Include == String.Empty)
                                throw new InvalidProjectFileException ("Item must have Include attribute.");
+                       
                        foreach (XmlElement xe in xmlElement.ChildNodes) {
                                this.SetMetadata (xe.Name, xe.InnerText);
                        }
@@ -285,6 +288,12 @@ namespace Microsoft.Build.BuildEngine {
                        get { return name; }
                        set { name = value; }
                }
+               
+               internal bool FromXml {
+                       get {
+                               return itemElement != null;
+                       }
+               }
        }
 }
 
index dd56ab3a27bf033124e065fddac7570068e9ac7c..ffa6b0885c731beed3202a0b955ffede15566cd3 100644 (file)
@@ -142,7 +142,7 @@ namespace Microsoft.Build.BuildEngine {
                {
                        BuildItem[] array;
                        array = new BuildItem [Count];
-                       buildItems.CopyTo (array,0);
+                       buildItems.CopyTo (array, 0);
                        return array;
                }
                
@@ -152,7 +152,7 @@ namespace Microsoft.Build.BuildEngine {
                        int i = 0;
                        foreach (BuildItem bi in  buildItems)
                                items [i++] = bi.ToString (transform);
-                       return String.Join (separator,items);
+                       return String.Join (separator, items);
                }
                
                internal ITaskItem[] ToITaskItemArray (Expression transform)
@@ -192,7 +192,7 @@ namespace Microsoft.Build.BuildEngine {
                        }
                }
 
-               public BuildItem this[int index] {
+               public BuildItem this [int index] {
                        get {
                                return (BuildItem) buildItems [index];
                        }
index 5c06a9dc062817ea65f3c3bdc420f9c8af1fd8cf..09cd03574798b5c08fa0d94e5b9753505a9eca39 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-29  Marek Sieradzki  <marek.sieradzki@gmail.com>
+
+       * BuildItem.cs, BuildItemGroup.cs: Coding style fixes.
+
 2006-03-29  Crestez Leonard  <cdleonard@gmail.com>
        
        * BuildItem.cs: Fix typo?