[xbuild] Fix warnings.
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / BuildChoose.cs
index 7abb245ea0a737ecc197cea3c9c08728c3576f00..53725110f80f87e692164f4cd3d46144747e6dda 100644 (file)
@@ -35,14 +35,21 @@ namespace Microsoft.Build.BuildEngine {
        internal class BuildChoose {
                
                BuildWhen       otherwise;
-               Project         project;
-               XmlElement      xmlElement;
+               //Project               project;
+               //ImportedProject       importedProject;
+               //XmlElement    xmlElement;
                List <BuildWhen>        whens;
                
                public BuildChoose (XmlElement xmlElement, Project project)
+                       : this (xmlElement, project, null)
                {
-                       this.xmlElement = xmlElement;
-                       this.project = project;
+               }
+
+               internal BuildChoose (XmlElement xmlElement, Project project, ImportedProject importedProject)
+               {
+                       //this.xmlElement = xmlElement;
+                       //this.project = project;
+                       //this.importedProject = importedProject;
                        this.whens = new List <BuildWhen> ();
 
                        foreach (XmlNode xn in xmlElement.ChildNodes) {
@@ -65,6 +72,9 @@ namespace Microsoft.Build.BuildEngine {
                                        otherwise = new BuildWhen (xe, project);
                                }
                        }
+
+                       DefinedInFileName = importedProject != null ? importedProject.FullFileName :
+                                               project != null ? project.FullFileName : null;
                }
                
                public void Evaluate ()
@@ -85,6 +95,8 @@ namespace Microsoft.Build.BuildEngine {
                        get { return whens; }
                        set { whens = value; }
                }
+
+               internal string DefinedInFileName { get; private set; }
        }
 }